[m-rev.] diff: address proc_gen.m review comments

Zoltan Somogyi zs at csse.unimelb.edu.au
Tue Jan 4 13:47:15 AEDT 2011


compiler/proc_gen.m:
	Address a review comment: use the current globals for the trace level,
	since there is no reason to use the old one.

Zoltan.

cvs diff: Diffing .
Index: proc_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/proc_gen.m,v
retrieving revision 1.42
diff -u -b -r1.42 proc_gen.m
--- proc_gen.m	30 Dec 2010 11:17:57 -0000	1.42
+++ proc_gen.m	3 Jan 2011 13:01:06 -0000
@@ -304,10 +304,9 @@
     maybe_set_trace_level(PredInfo, ModuleInfo0, ModuleInfo),
     ensure_all_headvars_are_named(ProcInfo0, ProcInfo1),
 
-    % We use the globals from the original module info, so that
-    module_info_get_globals(ModuleInfo0, Globals0),
-    globals.get_trace_level(Globals0, TraceLevel0),
-    ( given_trace_level_is_none(TraceLevel0) = no ->
+    module_info_get_globals(ModuleInfo, Globals),
+    globals.get_trace_level(Globals, TraceLevel),
+    ( given_trace_level_is_none(TraceLevel) = no ->
         fill_goal_id_slots_in_proc(ModuleInfo, ContainingGoalMap,
             ProcInfo1, ProcInfo),
         MaybeContainingGoalMap = yes(ContainingGoalMap)
@@ -328,7 +327,6 @@
         map.init(FollowVarsMap),
         FollowVars = abs_follow_vars(FollowVarsMap, 1)
     ),
-    module_info_get_globals(ModuleInfo, Globals),
     basic_stack_layout_for_proc(PredInfo, Globals, BasicStackLayout,
         ForceProcId),
     SaveSuccip = BasicStackLayout,
@@ -364,9 +362,7 @@
     get_static_cell_info(CodeInfo, StaticCellInfo),
     global_data_set_static_cell_info(StaticCellInfo, !GlobalData),
 
-    globals.get_trace_level(Globals, TraceLevel),
     get_created_temp_frame(CodeInfo, CreatedTempFrame),
-
     get_proc_trace_events(CodeInfo, ProcTraceEvents),
     % You can have user trace events even if the effective trace level is none.
     (
cvs diff: Diffing notes
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list