[m-rev.] for review: java backend abort on private_builtin.m

Peter Wang novalazy at gmail.com
Thu Apr 23 14:45:23 AEST 2009


2009/4/23 Zoltan Somogyi <zs at csse.unimelb.edu.au>:
> On 23-Apr-2009, Peter Wang <novalazy at gmail.com> wrote:
>> Fix an abort when compiling private_builtin.m with the Java backend.
>> `--optimize-constructor-last-call' is incompatible with Java but the
>> declarations for the builtins that it uses are in private_builtin.m, so
>> predicates get added with bodies which aren't handled by the Java backend.
>> Since the predicates won't be called anyway, it's safe to replace the bodies
>> with nothing.
>
> Why did you choose this approach? I would have though the obvious approach
> would be to
>
> - make Java and Erlang imply --no-optimize-constructor-last-call, and
> - define the builtins used by the last constructor transformation as doing
>  nothing for the Java and Erlang backends except abort (in case they get
>  called accidentally).

I forgot that add_pred.add_builtin already treats a few builtins specially.
That would be a better place to fix the problem.  I'll see if I can add in
the aborting behaviour easily.

Peter
--------------------------------------------------------------------------
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