From 89dd0a79da85b2c7102b7c8918a1466e6238fe94 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Fri, 13 Jun 2025 15:42:08 -0700 Subject: Chapter 24a: SCCP Within a Function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tamás Hadházy <85063808+Hels15@users.noreply.github.com> Co-authored-by: Hsiang-Ying Fu <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: fuhsnn <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: Symious <14933944+symious@users.noreply.github.com> Co-authored-by: Jun Kawasaki Co-authored-by: Hadházy Tamás Co-authored-by: Claude Opus 5 --- src/test/java/com/seaofnodes/simple/Chapter11Test.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/test/java/com/seaofnodes/simple/Chapter11Test.java') diff --git a/src/test/java/com/seaofnodes/simple/Chapter11Test.java b/src/test/java/com/seaofnodes/simple/Chapter11Test.java index 43a780ec..7c5e05f8 100644 --- a/src/test/java/com/seaofnodes/simple/Chapter11Test.java +++ b/src/test/java/com/seaofnodes/simple/Chapter11Test.java @@ -13,7 +13,7 @@ public class Chapter11Test { s.x = 42; while (arg > 0) { s.y = s.y + arg; arg = arg - 1; } return s.x; - """).parse().iter().finalizeIR(); + """).driver(CodeGen.Phase.FinalizeIR); var stop = code._stop; assertEquals("return 42;",stop.toString()); assertEquals("42",Eval2.eval(code,5)); @@ -32,7 +32,7 @@ public class Chapter11Test { arg = arg - 1; } return a; - """).parse().iter().finalizeIR(); + """).driver(CodeGen.Phase.FinalizeIR); var stop = code._stop; int[] phis = {0}; stop.walk(n -> { @@ -54,7 +54,7 @@ public class Chapter11Test { // it. Keep both the worklist assertion and the final heap check. for (int seed : new int[]{0,97,123,456}) { var code = new CodeGen(Chapter10Test.NESTED_MEMORY,com.seaofnodes.simple.type.TypeInteger.BOT,seed,false).parse(); - code.iter().finalizeIR(); + code.iter().opto().iterPostOpto().finalizeIR(); assertEquals("S{x=9,y=25,z=17}",Eval2.eval(code,4)); } } -- cgit v1.2.3