[m-rev.] for review: minor changes for valuetype foreign_types

Tyson Dowd trd at cs.mu.OZ.AU
Thu Jan 24 15:53:19 AEDT 2002


On 22-Jan-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 22-Jan-2002, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > On 21-Jan-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > > On 20-Jan-2002, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > > > A few minor fixes promped by petdr's addition of support for value types
> > > > for foreign_type.
> > > ...
> > > > doc/reference_manual.texi:
> > > > 	Improve the documentation wording for pragma foreign_type, and
> > > > 	remove the XXX saying that we should accept value types, because
> > > > 	we now accept value types.
> > > 
> > > It's not right to remove that XXX, since you've only fixed part of the
> > > problem -- after petdr's change, user-defined value types are supported,
> > > but builtin value types such as `int32' still aren't.
> > 
> > They are.
> > 
> > :- pragma foreign_type(il, int32, "valuetype [mscorlib]System.Int32").
> 
> Won't that violate the MSIL prohibition on using the value type name
> for the builtin types?
> 
> Oh, now I understand -- we parse the IL type name,
> and then convert the value type names for builtin types
> into the appropriate special name.  The documentation change
> you posted is a big improvement.

Yep, this is right.  We *always* output System.Int32 as int32, because
it makes a difference in signatures (where you have to do it), and it
makes no difference anywhere else.

> It would be nice if we could also accept the special name syntax...
> perhaps that should be left as an XXX.

I'll add it as a feature request on the sourceforge page.

I've made the other changes you suggested and will commit soon.

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