[m-dev.] for review: The .NET MSIL backend.
Tyson Dowd
trd at cs.mu.OZ.AU
Fri Oct 13 13:27:15 AEDT 2000
> > > > +simple_type_to_value_class_name(class(Name)) = VCName :-
> > > > + ( Name = ["mscorlib", "System", "String"] ->
> > > > + VCName = "String"
> > > > + ;
> > > > + error("unknown class name")
> > > > + ).
> > >
> > > Is `String' really a value class??
> >
> > No. That should be fixed by the caller of this function, converting
> > from Object to String should be a cast, not a call to mr_convert.
>
> OK, is there any reason why this can't just call error/1 if it gets a string?
Only that first I have to fix the caller.
It's the kind of change that will break code without some decent
testing. I'm putting off all changes that require a relatively large
amount of testing -- I want to start with a "known good" compiler and
improve it from there.
> OK, so at very least please add an XXX comment...
> it would be even better if at least the magic number was
> abstracted out into a single function called from both places.
I actually fixed it, sorry if I gave the impression that I wasn't going
to.
> The other place where you assume that references to global variables
> must have type int32 is in load/4 in mlds_to_il.m:
Thanks, I'll fix that then.
--
Tyson Dowd #
# Surreal humour isn't everyone's cup of fur.
trd at cs.mu.oz.au #
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list