[m-dev.] switch detection and calls

Simon Taylor stayl at cs.mu.OZ.AU
Fri Aug 27 09:28:45 AEST 1999


 
> It seems that the current compiler's switch detection looks past calls.
> This has unfortunate semantic consequences.
 
> The compiler's switch detection used to stop as soon as it got to a call,
> which meant that it used to handle cases like that one in the way that the
> "Semantics" chapter specified.
 
> Did this change just get in there accidentally?

Yes. The fix is simple.

Index: switch_detection.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/switch_detection.m,v
retrieving revision 1.86
diff -u -u -r1.86 switch_detection.m
--- switch_detection.m	1999/07/13 08:53:33	1.86
+++ switch_detection.m	1999/08/26 23:11:12
@@ -508,7 +508,7 @@
 		Substitution = Substitution0,
 		Result = Result0,
 		Info = Info0,
-		Continue = yes
+		Continue = no
 	).

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