From 06fb5aceeb65a75b1cd643debd667c52fdcafcb9 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Sun, 8 Nov 2026 14:10:02 -0800 Subject: Better error messages Better error messages. Buffs to the std lib; getch() to fetch a single character; streaming I/O handles retries, and large sizes, with better error reporting. Formatted strings. Default int moved to i32. TicTacToe, the game. --- chapter30/src/test/java/com/seaofnodes/simple/Chapter08Test.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'chapter30/src/test/java/com/seaofnodes/simple/Chapter08Test.java') diff --git a/chapter30/src/test/java/com/seaofnodes/simple/Chapter08Test.java b/chapter30/src/test/java/com/seaofnodes/simple/Chapter08Test.java index 376e472b..249beb11 100644 --- a/chapter30/src/test/java/com/seaofnodes/simple/Chapter08Test.java +++ b/chapter30/src/test/java/com/seaofnodes/simple/Chapter08Test.java @@ -46,7 +46,7 @@ while(arg < 10) { return a; """); code.driver(CodeGen.Phase.FinalizeIR); - assertEquals("return Phi(Loop,1,Phi(Region,Phi_a,(Phi_a+1),Phi_a));", code.print()); + assertEquals("return Phi(Loop,1,Phi(Region,Phi_a,(((Phi_a+1)<<32)>>32),Phi_a));", code.print()); assertTrue(code.ctrl() instanceof CProjNode); } @@ -185,7 +185,7 @@ while(arg < 10) { return a; """); code.driver(CodeGen.Phase.FinalizeIR); - assertEquals("return Phi(Region,Phi(Loop,1,(Phi_a+1)),Add);", code.print()); + assertEquals("return Phi(Region,Phi(Loop,1,(((Phi_a+1)<<32)>>32)),Sar);", code.print()); assertTrue(code.ctrl() instanceof RegionNode); } @@ -201,7 +201,7 @@ while(1) { return a; """); code.driver(CodeGen.Phase.FinalizeIR); - assertEquals("return (Phi(Loop,1,Add)+1);", code.print()); + assertEquals("return (((Phi(Loop,1,Sar)+1)<<32)>>32);", code.print()); assertTrue(code.ctrl() instanceof CProjNode prj && prj._idx==1 ); } -- cgit v1.2.3