[m-rev.] for review: encode invariants in types when creating constant structures
Peter Wang
novalazy at gmail.com
Thu Mar 29 13:52:10 AEDT 2018
On Thu, 29 Mar 2018 12:40:35 +1100 (AEDT), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> Peter, could you please have a look at the updated diff
> and see if it is ok? The only part that has changed
> is the deletion of the abort. I apologize for the delay,
> I have been sick for the past two weeks.
> Group widths with arg vars and rvals when creating constant data.
>
> compiler/ml_unify_gen.m:
> When transforming const_args into rvals, keep the width of the rval
> associated with it, instead of getting it in a separate list.
>
> Replace the old, indirect method of packing arguments in constant
> structures with new code that does the job directly on the arguments'
> rvals and widths.
>
> The new code exposes the fact that we currently don't handle double-word
> arguments in constant structures, so the code we generate in such cases
> can be right only by accident. Replace the generation of such code
> with a compiler abort, so at least the abort message tells us
> where the problem lies.
Be sure to update the log message. Otherwise, it looks fine.
Peter
More information about the reviews
mailing list