[m-rev.] diff: jumpopt and mkframe

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri Aug 17 15:16:54 AEST 2001


compiler/jumpopt.m:
	Short circuit label references in the redoip operands of mkframe
	instructions, just as we do when the redoip field is filled in later
	via an assignment.

Zoltan.

Index: jumpopt.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/jumpopt.m,v
retrieving revision 1.58
diff -u -b -r1.58 jumpopt.m
--- jumpopt.m	2001/05/31 05:59:40	1.58
+++ jumpopt.m	2001/08/16 04:04:31
@@ -632,6 +632,19 @@
 				Shorted),
 			NewInstrs = [assign(Lval, Rval) - Shorted]
 		)
+	; Uinstr0 = mkframe(FrameInfo, label(Label0)) ->
+		jumpopt__short_label(Label0, Instrmap, Label),
+		RemainInstrs = Instrs0,
+		CheckedNondetTailCallInfo1 = CheckedNondetTailCallInfo0,
+		( Label = Label0 ->
+			NewInstrs = [Instr0]
+		;
+			string__append(Comment0, " (some shortcircuits)",
+				Shorted),
+			NewInstrs = [mkframe(FrameInfo, label(Label))
+				- Shorted]
+		)
 	;
 		NewInstrs = [Instr0],
 		RemainInstrs = Instrs0,
--------------------------------------------------------------------------
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