[m-rev.] for review: MLDS back-end: generate closure layouts

Peter Ross peter.ross at miscrit.be
Wed Mar 6 02:46:10 AEDT 2002


I had to apply the following diff to get the libraries to compile on the
IL back-end.  I am not sure if this is the correct approach or not.  The
other thing that I looked into doing is changing the load instruction on
IL back-end so that it does a ldflda when the object it is trying to
load is a pointer.  I am not sure which approach is correct. 

Could yet let me know which way we should be heading Fergus?
And could you turn off closure layout generation until it does the
correct thing on the IL backend.

Pete


Index: ml_closure_gen.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_closure_gen.m,v
retrieving revision 1.1
diff -u -r1.1 ml_closure_gen.m
--- ml_closure_gen.m	4 Mar 2002 07:31:35 -0000	1.1
+++ ml_closure_gen.m	5 Mar 2002 15:31:05 -0000
@@ -345,10 +345,10 @@
 
 ml_stack_layout_construct_tvar_vector(ModuleInfo, TvarVectorName, Context,
 		TVarLocnMap, MLDS_Rval, PtrType, MLDS_Defns) :-
-	PtrType = mlds__ptr_type(mlds__native_int_type),
+	PtrType = mlds__ptr_type(mlds__array_type(mlds__native_int_type)),
 	ArrayType = mlds__array_type(mlds__native_int_type),
 	( map__is_empty(TVarLocnMap) ->
-		MLDS_Rval = const(null(PtrType)),
+		MLDS_Rval = const(null(ArrayType)),
 		MLDS_Defns = []
 	;
 		Access = local,
@@ -361,7 +361,7 @@
 		module_info_name(ModuleInfo, ModuleName),
 		MLDS_ModuleName = mercury_module_name_to_mlds(ModuleName),
 		MLDS_Rval = lval(var(qual(MLDS_ModuleName, TvarVectorName),
-			PtrType))
+			ArrayType))
 	).
 
 :- pred ml_stack_layout_construct_tvar_rvals(map(tvar, set(layout_locn))::in,

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