[m-rev.] diff: re-enable closure layout generation
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Mar 21 03:09:53 AEDT 2002
I didn't actually test this on .NET. But the work-around was causing
test case failures for the --target asm back-end, and it shouldn't
be needed anymore.
--------------------
Estimated hours taken: 0.25
Branches: main
compiler/ml_closure_gen.m:
Back out my previous bug work-around, i.e. enable generation of
closure layouts on all back-ends, since the bug with generating
closure layouts on .NET has been fixed already.
Workspace: /home/ceres/fjh/ws-ceres3/mercury
Index: compiler/ml_closure_gen.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_closure_gen.m,v
retrieving revision 1.5
diff -u -d -r1.5 ml_closure_gen.m
--- compiler/ml_closure_gen.m 20 Mar 2002 12:36:45 -0000 1.5
+++ compiler/ml_closure_gen.m 20 Mar 2002 16:04:21 -0000
@@ -61,7 +61,7 @@
:- implementation.
-:- import_module parse_tree__prog_util, hlds__hlds_module.
+:- import_module hlds__hlds_module.
:- import_module backend_libs__code_model, backend_libs__pseudo_type_info.
:- import_module backend_libs__rtti.
:- import_module ml_backend__ml_unify_gen, ml_backend__ml_call_gen.
@@ -104,27 +104,9 @@
% this is a static constant that holds information
% about how the structure of this closure.
%
- =(MLGenInfo),
- { ml_gen_info_get_module_info(MLGenInfo, ModuleInfo) },
- { module_info_globals(ModuleInfo, Globals) },
- { globals__get_target(Globals, Target) },
- ( { Target = c } ->
- ml_gen_closure_layout(PredId, ProcId, Context,
- ClosureLayoutRval, ClosureLayoutType,
- ClosureLayoutDecls)
- ;
- % XXX for targets other than C, there are apparently some
- % problems (type errors?) with the code generated for
- % closure layouts, so just fill in a dummy value instead
- { mercury_private_builtin_module(PrivateBuiltinModule) },
- { MLDS_PrivateBuiltinModule = mercury_module_name_to_mlds(
- PrivateBuiltinModule) },
- { ClosureLayoutType = mlds__class_type(
- qual(MLDS_PrivateBuiltinModule,
- "closure_layout"), 0, mlds__class) },
- { ClosureLayoutRval = const(null(ClosureLayoutType)) },
- { ClosureLayoutDecls = [] }
- ),
+ ml_gen_closure_layout(PredId, ProcId, Context,
+ ClosureLayoutRval, ClosureLayoutType,
+ ClosureLayoutDecls),
%
% Generate a wrapper function which just unboxes the
--
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