From 0fb76e75be3a35d6b4741e9ae4378fa04868a840 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Mon, 5 Aug 2024 11:46:17 -0700 Subject: Ref types working GCM uses a breadth-first pass for schedule-late instead of a post-order; the post-order walk depends on StoreNodes being pinned, which is true in C2 but not Simple. Move GCM call out of IterPeeps. Struct field init is "makeInit()" not integer zero. Rename Type._print to print. Store,Load prints include field name. --- .../java/com/seaofnodes/simple/Chapter05Test.java | 6 +-- .../java/com/seaofnodes/simple/Chapter06Test.java | 6 +-- .../java/com/seaofnodes/simple/Chapter08Test.java | 6 +-- .../java/com/seaofnodes/simple/Chapter10Test.java | 19 ++++----- .../java/com/seaofnodes/simple/Chapter11Test.java | 6 +-- .../java/com/seaofnodes/simple/Chapter12Test.java | 45 +++++++++++++++++++++- .../test/java/com/seaofnodes/simple/TypeTest.java | 28 ++++++++++---- 7 files changed, 82 insertions(+), 34 deletions(-) (limited to 'chapter13/src/test') diff --git a/chapter13/src/test/java/com/seaofnodes/simple/Chapter05Test.java b/chapter13/src/test/java/com/seaofnodes/simple/Chapter05Test.java index 64f3a1d9..d48bde7f 100644 --- a/chapter13/src/test/java/com/seaofnodes/simple/Chapter05Test.java +++ b/chapter13/src/test/java/com/seaofnodes/simple/Chapter05Test.java @@ -37,7 +37,7 @@ if (arg == 1) { } return c;""", TypeInteger.BOT); StopNode ret = parser.parse().iterate(true); - assertEquals("return Phi(Region18,4,3);", ret.toString()); + assertEquals("return Phi(Region19,4,3);", ret.toString()); } @Test @@ -116,7 +116,7 @@ if( arg==0 ) return arg+a+b; #showGraph;""", TypeInteger.BOT); StopNode stop = parser.parse(); - assertEquals("return ((arg+Phi(Region15,1,0))+Phi(Region30,2,0));", stop.toString()); + assertEquals("return ((arg+Phi(Region17,1,0))+Phi(Region33,2,0));", stop.toString()); } @Test @@ -130,7 +130,7 @@ if( arg==1 ) } return a;"""); StopNode ret = parser.parse().iterate(); - assertEquals("return (arg==Phi(Region18,3,2));", ret.toString()); + assertEquals("return (arg==Phi(Region19,3,2));", ret.toString()); } @Test diff --git a/chapter13/src/test/java/com/seaofnodes/simple/Chapter06Test.java b/chapter13/src/test/java/com/seaofnodes/simple/Chapter06Test.java index fed34465..472e2db3 100644 --- a/chapter13/src/test/java/com/seaofnodes/simple/Chapter06Test.java +++ b/chapter13/src/test/java/com/seaofnodes/simple/Chapter06Test.java @@ -30,7 +30,7 @@ if (arg) return (arg < a) < 3; """); StopNode stop = parser.parse().iterate(); - assertEquals("return ((arg