[m-rev.] diff: disable closure layouts for non-C targets
Peter Ross
peter.ross at miscrit.be
Wed Mar 6 22:46:18 AEDT 2002
On Wed, Mar 06, 2002 at 10:27:38AM +0100, Peter Ross wrote:
> I hope this helps.
>
Well it certainly helped me. Here is a diff which bootchecks in the
hlc.gc grade and passes all the tests. It also solves the problems the
IL backend experienced.
Any objections to checking this in?
===================================================================
Estimated hours taken: 4
Branches: main
compiler/ml_closure_gen.m:
A tvar_vector is an array of ints, not a pointer to an int, so use
that for the type of vector. Without this change closure layouts do
not compile on the IL back-end as a pointer to an int is not the
same thing as an array of ints, as it is on the C back-end.
diff -u -r1.2 ml_closure_gen.m
--- compiler/ml_closure_gen.m 6 Mar 2002 08:03:34 -0000 1.2
+++ compiler/ml_closure_gen.m 6 Mar 2002 09:29:56 -0000
@@ -362,11 +362,10 @@
mlds__rval::out, mlds__type::out, mlds__defns::out) is det.
ml_stack_layout_construct_tvar_vector(ModuleInfo, TvarVectorName, Context,
- TVarLocnMap, MLDS_Rval, PtrType, MLDS_Defns) :-
- PtrType = mlds__ptr_type(mlds__native_int_type),
+ TVarLocnMap, MLDS_Rval, ArrayType, MLDS_Defns) :-
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,
@@ -379,7 +378,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