Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/PolymorphicTest.java @ 14641:f0bb82ebe30c
Truffle-DSL: some fixes and optimizations to the generated code.
Fixed polymorphic specialization nodes could still reference children in some cases.
Removed generation of getCost methods since they were very expensive to call.
Removed generation of copyPolymorphic, setNext0.
Made generated executeGeneric0 and executeAndSpecialize0 final.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 20 Mar 2014 17:50:41 +0100 |
parents | 5d1308c78ddc |
children | 5148aab962af |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/PolymorphicTest.java Thu Mar 20 13:53:36 2014 +0100 +++ b/graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/PolymorphicTest.java Thu Mar 20 17:50:41 2014 +0100 @@ -64,7 +64,7 @@ TestRootNode<Node1> node = TestHelper.createRoot(Node1Factory.getInstance()); assertEquals("(int,boolean)", executeWith(node, 42, false)); assertEquals("(int,int)", executeWith(node, 42, 42)); - assertEquals(NodeCost.NONE, node.getNode().getCost()); + assertEquals(NodeCost.POLYMORPHIC, node.getNode().getCost()); assertParent(node.getNode(), node.getNode().getLeft()); assertParent(node.getNode(), node.getNode().getRight()); } @@ -75,7 +75,7 @@ assertEquals("(int,boolean)", executeWith(node, 42, false)); assertEquals("(boolean,boolean)", executeWith(node, true, false)); assertEquals("(int,int)", executeWith(node, 42, 42)); - assertEquals(NodeCost.NONE, node.getNode().getCost()); + assertEquals(NodeCost.POLYMORPHIC, node.getNode().getCost()); assertParent(node.getNode(), node.getNode().getLeft()); assertParent(node.getNode(), node.getNode().getRight()); }