[m-rev.] for review: refactor mlds_to_il.m
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Jul 11 19:07:48 AEST 2001
On 09-Jul-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> On 10-Jul-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > On 09-Jul-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> > >
> > > Refactor the top level of mlds_to_il so that we only do one pass over
> > > the MLDS to generate the ILDS. As a side effect of this change nondet
> > > code now works again.
> >
> > Ah, fantastic.
> >
> > > compiler/ml_code_util.m:
> > > Wrapper functions should be static methods not instance methods.
> > > Fix ml_gen_label_func_decl_flags to make this true.
> > ...
> > > ml_gen_label_func_decl_flags = MLDS_DeclFlags :-
> > > Access = private, % XXX if we're using nested functions,
> > > % this should be `local' rather than `private'
> > > - PerInstance = per_instance,
> > > + PerInstance = one_copy,
> >
> > Can you explain in more detail why this is necessary?
> > I don't think this is the right fix.
> >
> > "label" functions are the nested functions used as continuation labels
> > for nondeterministic code. They not "wrapper" functions.
> >
> > Marking nested functions as "one_copy" is wrong,
> > and will break the --gcc-nested-functions option.
>
> This code is *also* called to generate wrapper functions.
>
> I suspect for the case of continuations they are made one_copy when
> ml_elim_nested processes them.
>
> But for wrapper functions they are not.
>
> Perhaps ml_gen_label_func_decl_flags shouldn't be re-used in the case
> of wrapper functions?
OK, that sounds good to me.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list