[m-rev.] diff: IL back-end: handle of value types

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Jul 15 06:14:45 AEST 2001


On 15-Jul-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> 
> Fix bugs in the handling of value types for the IL back-end.

Here's one more fix that I forgot to include.

Estimated hours taken: 0.75
Branches: main

compiler/ilasm.m:
	Use "valuetype" rather than "value_class" as the keyword for value types.

	I think "value_class" was always wrong.  The .NET beta-2 CLR
	supports both "value class" and  "valuetype", but according to
	the ECMA specs (partition II, 12.1), the former is deprecated,
	and so only "valuetype" should be used.

Workspace: /home/mars/fjh/ws1/mercury
Index: compiler/ilasm.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ilasm.m,v
retrieving revision 1.14
diff -u -d -r1.14 ilasm.m
--- compiler/ilasm.m	2001/07/13 10:42:43	1.14
+++ compiler/ilasm.m	2001/07/13 15:29:29
@@ -651,7 +651,7 @@
 	io__write_string("class "),
 	output_structured_name(Name, Info0, Info).
 output_simple_type(value_class(Name), Info0, Info) --> 
-	io__write_string("value_class "),
+	io__write_string("valuetype "),
 	output_structured_name(Name, Info0, Info).
 output_simple_type(interface(Name), Info0, Info) --> 
 	io__write_string("interface "),
@@ -690,6 +690,7 @@
 output_simple_type_opcode(char) --> io__write_string("i2").
 
 	% all reference types use "ref" as their opcode.
+	% XXX is "ref" here correct for value classes?
 output_simple_type_opcode(refany) --> io__write_string("ref").
 output_simple_type_opcode(class(_Name)) --> io__write_string("ref").
 output_simple_type_opcode(value_class(_Name)) --> io__write_string("ref").
-- 
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