[m-rev.] diff: IL back-end: add constructors for all classes
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Aug 14 11:29:19 AEST 2001
On 13-Aug-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> On 13-Aug-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > Fix another bug with --high-level-data in the IL back-end.
> >
> > compiler/mlds_to_il.m:
> > If a class doesn't have any constructors, add an empty one.
> >
> > compiler/ml_elim_nested.m:
> > Delete code to add empty constructors for environment types,
> > since this is now handled by mlds_to_il.m.
>
> This looks good, thanks.
This didn't actually solve the problem that I thought it was going
to solve, unfortunately, because mlds_to_il.m was generating calls
to constructors with arguments, rather than calling the default (nullary)
constructor and then generating assignments to the fields.
However I think it is better design to deal with this issue in
mlds_to_il.m rather than in ml_elim_nested, so I think the patch
is an improvement, even if it didn't solve the problem that I
wanted it to solve.
I ended up solving the problem with constructors in `il' grade with a
different patch that makes ml_type_gen.m generate constructors.
I'll post that one shortly.
> BTW this will also (when it makes it onto the dotnet-foreign branch)
> make WebMethod attributes work better, as adding a .ctor was one of the
> things that had to be fixed by hand to use WebMethods from Mercury.
Great.
--
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