[m-rev.] diff: enable --intermodule-optimization for java
Peter Ross
peter.ross at miscrit.be
Mon Nov 11 03:50:26 AEDT 2002
Hi,
===================================================================
Estimated hours taken: 0.25
Branches: main
compiler/handle_options.m:
--high-level-data and --automatic-intermodule-optimization implies
--intermodule-optimization when compiling for java to avoid problems
with equivalence types.
Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.158
diff -u -r1.158 handle_options.m
--- compiler/handle_options.m 7 Nov 2002 16:17:04 -0000 1.158
+++ compiler/handle_options.m 10 Nov 2002 16:47:44 -0000
@@ -321,6 +321,10 @@
globals__io_set_option(num_tag_bits, int(NumTagBits)),
+ globals__io_lookup_bool_option(highlevel_data, HighLevelData),
+ globals__io_lookup_bool_option(automatic_intermodule_optimization,
+ AutoIntermodOptimization),
+
% Generating IL implies:
% - gc_method `none' and no heap reclamation on failure
% Because GC is handled automatically by the .NET CLR
@@ -366,10 +370,6 @@
globals__io_set_option(unboxed_no_tag_types, bool(no)),
globals__io_set_option(static_ground_terms, bool(no)),
- globals__io_lookup_bool_option(highlevel_data, HighLevelData),
- globals__io_lookup_bool_option(
- automatic_intermodule_optimization,
- AutoIntermodOptimization),
( { HighLevelData = yes, AutoIntermodOptimization = yes } ->
globals__io_set_option(intermodule_optimization,
bool(yes))
@@ -417,6 +417,11 @@
% XXX Previously static ground terms used to not work with
% --high-level-data. But this has been (mostly?) fixed now.
% So we should investigate re-enabling static ground terms.
+ % - intermodule optimization
+ % This is only required for high-level data and is needed
+ % so that abstract equivalence types can be expanded. They
+ % need to be expanded because Java requires that the structural
+ % representation of a type is known at all times.
( { Target = java } ->
globals__io_set_gc_method(none),
globals__io_set_option(reclaim_heap_on_nondet_failure,
@@ -430,7 +435,14 @@
globals__io_set_option(det_copy_out, bool(yes)),
globals__io_set_option(num_tag_bits, int(0)),
globals__io_set_option(static_ground_terms, bool(no)),
- globals__io_set_option(put_nondet_env_on_heap, bool(yes))
+ globals__io_set_option(put_nondet_env_on_heap, bool(yes)),
+
+ ( { HighLevelData = yes, AutoIntermodOptimization = yes } ->
+ globals__io_set_option(intermodule_optimization,
+ bool(yes))
+ ;
+ []
+ )
;
[]
),
--------------------------------------------------------------------------
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