[m-rev.] for review: encode invariants in types when creating constant structures

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Mar 13 05:22:50 AEDT 2018


For review by anyone.

The main thing requiring review is the abort in the packing code
when it finds a double-word argument.

This cannot be triggered on 64 bit machines, which have no double word
primitive data types.

It cannot be triggered in hlc.pregen.gc, which boxes both floats
and int64/uint64 arguments.

I don't think it can be triggered for int64/uint64 fields on 32 bit machines,
since those are boxed there as well even when the grade is not pregen.

I think it can be triggered only on 32 bit machines in non-pregen grades
for float fields. However, I believe the existing code in ml_unify_gen.m
generated incorrect code for such fields already, because it treated them
as if their width was a single word. I haven't heard any reports of
such problems. Has anyone else?

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.const_triples
Type: application/octet-stream
Size: 716 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20180313/50fcfd0d/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.const_triples
Type: application/octet-stream
Size: 27214 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20180313/50fcfd0d/attachment-0003.obj>


More information about the reviews mailing list