[m-rev.] for review: Arrays for the .NET backend

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Aug 5 16:12:38 AEST 2001


On 03-Aug-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> On 03-Aug-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > On 02-Aug-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > > Index: compiler/mlds_to_java.m
> > > @@ -1206,6 +1207,10 @@
> > >  
> > >  output_type(mercury_type(Type, TypeCategory)) -->
> > >  	output_mercury_type(Type, TypeCategory).
> > > +
> > > +output_type(mercury_array_type(_MLDSType)) -->
> > > +	io__write_string("java.lang.Object").
> > 
> > The code here definitely doesn't match the log message.
> 
> Oops, I changed it to be 
> 
> 	output_type(MLDSType),
> 	io__write_string("[]")
> 
> which is the same as what is done for mlds__array_type.
> 
> But I think Java uses stupid C-style array syntax.
...
> I've just added an XXX about it.

I think Java supports stupid C-style array syntax for backwards compatibility,
but it definitely allows the use of sane syntax, e.g. "int [] x;".
So your XXX comments were wrong.  I've deleted them.

----------

Estimated hours taken: 0.25
Branches: main

compiler/mlds_to_java.m:
	Delete some incorrect XXX comments that were added in Tyson's last change.

Workspace: /mnt/venus/home/venus/fjh/ws-venus4/mercury
Index: compiler/mlds_to_java.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_java.m,v
retrieving revision 1.11
diff -u -d -r1.11 mlds_to_java.m
--- compiler/mlds_to_java.m	2001/08/03 12:07:28	1.11
+++ compiler/mlds_to_java.m	2001/08/05 06:09:50
@@ -1208,10 +1208,6 @@
 output_type(mercury_type(Type, TypeCategory)) -->
 	output_mercury_type(Type, TypeCategory).
 
-	% XXX array types need to be output as
-	% 	MLDSType varname[]
-	% not 
-	% 	MLDSType[] varname
 output_type(mercury_array_type(MLDSType)) -->
 	output_type(MLDSType),
 	io__write_string("[]").
@@ -1234,10 +1230,6 @@
 	;
 		output_type(Type)
 	).
-	% XXX array types need to be output as
-	% 	MLDSType varname[]
-	% not 
-	% 	MLDSType[] varname
 output_type(mlds__array_type(Type)) -->
 	output_type(Type),
 	io__write_string("[]").

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