[m-rev.] for post-commit review: improve mutable inst checks

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Nov 16 22:41:29 AEDT 2015


On Wed, 11 Nov 2015 09:17:02 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
> >> 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?
> 
> No. I was hoping it could be handled more locally at the point at which
> the error message is generated, but slowing down inst expansions is not
> a good trade off for a better error message here.

Actually, you were right, and I was wrong: it is possible to handle
these two insts specially at the point where we do the checks.
The attached diff does that.

Zoltan.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.mutable_inst_check2
Type: application/octet-stream
Size: 404 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20151116/cc99dc49/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.mutable_inst_check2
Type: application/octet-stream
Size: 4647 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20151116/cc99dc49/attachment-0001.obj>


More information about the reviews mailing list