[m-dev.] trivial diff: fix bug in unsafe_type_cast fix

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Dec 14 19:02:03 AEDT 2000


Estimated hours taken: 0.5

compiler/ml_code_gen.m:
	Fix a bug in my previous change (I had the two arguments
	to unsafe_type_cast in the wrong order).

Workspace: /home/pgrad/fjh/ws/hg3
Index: compiler/ml_code_gen.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_code_gen.m,v
retrieving revision 1.71
diff -u -d -r1.71 ml_code_gen.m
--- compiler/ml_code_gen.m	2000/12/14 02:04:27	1.71
+++ compiler/ml_code_gen.m	2000/12/14 07:37:10
@@ -1928,8 +1928,8 @@
 		ml_gen_var_list(ArgVars, ArgLvals),
 		ml_variable_types(ArgVars, ArgTypes),
 		(
-			{ ArgLvals = [DestLval, SrcLval] },
-			{ ArgTypes = [DestType, SrcType] }
+			{ ArgLvals = [SrcLval, DestLval] },
+			{ ArgTypes = [SrcType, DestType] }
 		->
 			ml_gen_box_or_unbox_rval(SrcType, DestType,
 				lval(SrcLval), CastRval),

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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