[m-rev.] trivial diff: fix XXX in polymorphism.m

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Oct 22 16:01:30 AEST 2003


Estimated hours taken: 0.25
Branches: main

compiler/polymorphism.m:
	Fix an XXX: when calling instmap_delta_from_mode_list in
	expand_one_body, use the current version of ModuleInfo rather
	than an older version.

Workspace: /home/ceres/fjh/mercury
Index: compiler/polymorphism.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/polymorphism.m,v
retrieving revision 1.243
diff -u -d -r1.243 polymorphism.m
--- compiler/polymorphism.m	21 Oct 2003 00:49:24 -0000	1.243
+++ compiler/polymorphism.m	21 Oct 2003 07:15:44 -0000
@@ -3196,7 +3196,6 @@
 	module_info::in, module_info::out) is det.
 
 expand_one_body(hlds_class_proc(PredId, ProcId), !ProcNum, !ModuleInfo) :-
-	OldModuleInfo = !.ModuleInfo,	% see XXX below
 	module_info_preds(!.ModuleInfo, PredTable0),
 	map__lookup(PredTable0, PredId, PredInfo0),
 	pred_info_procedures(PredInfo0, ProcTable0),
@@ -3258,9 +3257,7 @@
 
 		% Make the goal info for the call.
 	set__list_to_set(HeadVars0, NonLocals),
-		% XXX This reference to OldModuleInfo after !ModuleInfo
-		% has been updated looks suspicious.
-	instmap_delta_from_mode_list(HeadVars0, Modes0, OldModuleInfo,
+	instmap_delta_from_mode_list(HeadVars0, Modes0, !.ModuleInfo,
 		InstmapDelta),
 	pred_info_get_purity(PredInfo0, Purity),
 	goal_info_init(NonLocals, InstmapDelta, Detism, Purity, GoalInfo),

-- 
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