[m-dev.] [reuse] diff: bugfix concerning unconditional reuses

Nancy Mazur Nancy.Mazur at cs.kuleuven.ac.be
Fri Oct 13 05:59:49 AEDT 2000


Hi,


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


Estimated hours taken: 0.1

	Fix a bug where predicates with unconditional reuse were not
	processed and calls to reuse procedures where not set right. 

sr_split.m:
	Process the goal of a reuse-procedure even in the presence
	of unconditional reuse. 


Index: sr_split.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/sr_split.m,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 sr_split.m
--- sr_split.m	2000/10/12 15:26:27	1.1.2.2
+++ sr_split.m	2000/10/12 18:52:51
@@ -82,6 +82,7 @@
 	proc_info_reuse_information( ProcInfo0, Memo), 
 	module_info_pred_proc_info( VirginHLDS, PredProcId, _, 
 				CleanProcInfo), 
+	proc_info_goal( ProcInfo0, ReuseGoal), 
 
 	(
 		Memo = no
@@ -94,7 +95,6 @@
 			memo_reuse_is_conditional(Memo) 
 		->
 			% fetch the reuse goal
-			proc_info_goal( ProcInfo0, ReuseGoal), 
 			create_reuse_pred(Memo, yes(ReuseGoal), 
 					PredInfo0, ProcInfo0,
 					ReusePredInfo, ReuseProcInfo0,
@@ -130,7 +130,14 @@
 		;
 			% memo_reuse is unconditional -- perfect -- 
 			% nothing to be done! 
-			HLDS = WorkingHLDS
+			process_goal( ReuseGoal, ReuseGoal2, WorkingHLDS, _),
+			proc_info_set_goal( ProcInfo0, ReuseGoal2, 
+					ReuseProcInfo1), 
+			module_info_set_pred_proc_info( WorkingHLDS, 
+					PredProcId, 
+					PredInfo0, ReuseProcInfo1, 
+					HLDS) 
+
 		)
 	).
 

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list