[m-rev.] for post-commit review: improve mutable inst checks
Zoltan Somogyi
zoltan.somogyi at runbox.com
Wed Nov 11 03:49:24 AEDT 2015
On Tue, 10 Nov 2015 11:24:31 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
> > +uniq_mutable.m:024: Error: in the expansion of the named inst `builtin.dead'/0:
> > +uniq_mutable.m:024: the inst `clobbered' is not allowed in `:- mutable'
> > +uniq_mutable.m:024: declarations.
> > +uniq_mutable.m:025: Error: in the expansion of the named inst
> > +uniq_mutable.m:025: `builtin.mostly_dead'/0:
> > +uniq_mutable.m:025: the inst `mostly_clobbered' is not allowed in
> > +uniq_mutable.m:025: `:- mutable' declarations.
>
> I wouldn't expand named insts that are defined in the builtin module,
> particularly for the case of 'dead' and 'mostly_dead' which are what the
> reference manual actually refers to when it defines the restrictions on mutable
> insts.
At the moment, the orig inst field, which is used in the test that
generates the above error message, is expanded out using the
usual code in equiv_type.m. Preventing that expansion would
require either a specialized variant of the code that expands out
inst equivalences, or generalizing the existing code for this expansion,
which would slow down all other inst expansions as well. Are you ok
with that?
> For clarity the reference manual should be changed so the last bit reads:
>
> builtin insts free, unique, mostly_unique, dead (clobbered) or
> mostly_dead (mostly_clobbered).
Done.
Zoltan.
More information about the reviews
mailing list