diff: bug fix for commits with trailing

Fergus Henderson fjh at kryten.cs.mu.OZ.AU
Thu Sep 11 16:44:28 AEST 1997


Fix a bug in code generation for commits in trailed grades.
This bug broke the test case tests/general/commit_bug.m.

compiler/code_info.m:
	In undo_commit_saves, make sure we use the values that 
	pre_commit_saves pused on the stack _before_ popping the stack.

Index: code_info.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/code_info.m,v
retrieving revision 1.211
diff -u -u -r1.211 code_info.m
--- 1.211	1997/08/25 17:48:04
+++ code_info.m	1997/09/11 06:37:09
@@ -2118,13 +2118,13 @@
 		{ MainPopCode = empty }
 	),
 	{ SuccPopCode =
-		tree(MainPopCode,
 		tree(CommitTrail,
-		     RestoreTicketCounter)) },
+		tree(RestoreTicketCounter,
+		     MainPopCode)) },
 	{ FailPopCode =
-		tree(MainPopCode,
 		tree(RestoreTrail,
-		     RestoreTicketCounter)) }.
+		tree(RestoreTicketCounter,
+		     MainPopCode)) }.
 
 
 :- pred code_info__clone_resume_maps(resume_maps, resume_maps,

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list