[m-rev.] for review: fix mantis bug #42

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Jun 12 13:23:36 AEST 2008


On Thu, 12 Jun 2008, Peter Wang wrote:

> On 2008-06-11, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>>
>> On Wed, 11 Jun 2008, Peter Wang wrote:
>>
>>> Pending bootcheck.
>>>
>>> Estimated hours taken: 1
>>> Branches: main
>>>
>>> Fix Mantis bug #42.  --optimize-constructor-last-call wouldn't work together
>>> with --no-inline-builtins (or more commonly, --no-inlining).
>>>
>>> We didn't generate a valid definition for `private_builtin.store_at_ref': the
>>> procedure existed but had an empty body.  With `--no-inlining-builtins' the
>>> calls to `store_at_ref' introduced by the LCMC that would normally be replaced
>>> by inline code would go to the out-of-line procedure, which did nothing.
>>
>> Hmmmm, ... it took me a while to see why that works.
>
> Actually, there is a problem.  The predicate is properly added with the body:
>
>    private_builtin.store_at_ref(Ref, T) :-
> 	private_builtin.store_at_ref(Ref, T).
>
> But since `store_at_ref' is not impure, simplify may end up deleting the
> body again.  So I won't commit this fix.  It should wait until
> `store_at_ref' is declared impure, which presents a bit of a
> bootstrapping problem.

Yes.  There was already an XXX about the purity issue this in compiler/lco.m.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list