diff: bugfix for agc tests.

Tyson Dowd trd at cs.mu.oz.au
Wed Jan 7 16:07:37 AEDT 1998


Hi,

Here's a fix for the agc tests that failed last night.

===================================================================


Estimated hours taken: 1

Fixed a bug with accurate GC grades.

compiler/handle_options.m:
	Set the stack_layout option in the option post-processing,
	not in the grade handling.
	(Previousle it was setting it with the grade, not according
	to the --gc option).


Index: compiler/handle_options.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/handle_options.m,v
retrieving revision 1.37
diff -u -r1.37 handle_options.m
--- handle_options.m	1997/12/10 07:15:40	1.37
+++ handle_options.m	1998/01/07 04:31:10
@@ -283,6 +283,13 @@
 		[]
 	),
 
+	% --gc accurate requires stack layouts.
+	( { GC_Method = accurate } ->
+		globals__io_set_option(stack_layout, bool(yes)) 
+	;
+		[]
+	),
+
 	% --dump-hlds and --statistics require compilation by phases
 	globals__io_lookup_accumulating_option(dump_hlds, DumpStages),
 	globals__io_lookup_bool_option(statistics, Statistics),
@@ -558,9 +565,7 @@
 	% 'accurate' is now set in the grade, so we can override it here.
 	( 
 		{ GC = accurate }, 
-		set_string_opt(gc, "accurate"), 
-			% we need stack layouts for accurate gc
-		set_bool_opt(stack_layout, yes) 
+		set_string_opt(gc, "accurate")
 	; 
 		{ GC = conservative },
 		set_string_opt(gc, "conservative")


-- 
       Tyson Dowd           # If I'm unusually agressive in this email, it's
                            # probably because USENET has been down here for
     trd at cs.mu.oz.au        # over a week, and I'm missing my usual dosage
http://www.cs.mu.oz.au/~trd # of flamewars. My apologies in advance.



More information about the developers mailing list