Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api.codegen.test/src/com/oracle/truffle/api/codegen/test/ExecuteEvaluatedTest.java @ 9229:76a6e7907b67
Minor cleanup.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 22 Apr 2013 16:39:47 +0200 |
parents | 5f7f0d3e3638 |
children | 8e3a1635cc9e |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.codegen.test/src/com/oracle/truffle/api/codegen/test/ExecuteEvaluatedTest.java Mon Apr 22 16:39:12 2013 +0200 +++ b/graal/com.oracle.truffle.api.codegen.test/src/com/oracle/truffle/api/codegen/test/ExecuteEvaluatedTest.java Mon Apr 22 16:39:47 2013 +0200 @@ -26,21 +26,12 @@ import com.oracle.truffle.api.codegen.*; import com.oracle.truffle.api.codegen.test.TypeSystemTest.ValueNode; import com.oracle.truffle.api.frame.*; -import com.oracle.truffle.api.nodes.*; public class ExecuteEvaluatedTest { - public abstract static class ExtValueNode extends ValueNode { - - public CallTarget executeCallTarget(VirtualFrame frame) throws UnexpectedResultException { - return SimpleTypesGen.SIMPLETYPES.expectCallTarget(execute(frame)); - } - - } - /* Represents target[element] */ - @NodeChildren({@NodeChild("targetNode"), @NodeChild("elementNode")}) - abstract static class ReadElementNode extends ExtValueNode { + @NodeChildren({@NodeChild("target"), @NodeChild("element")}) + abstract static class ReadElementNode extends ValueNode { @Specialization int getInt(Object[] target, int element) { @@ -51,12 +42,12 @@ } /* Represents target[element]() */ - @NodeChildren({@NodeChild("targetNode"), @NodeChild(value = "elementNode", type = ReadElementNode.class, executeWith = "targetNode")}) - abstract static class ElementCallNode extends ExtValueNode { + @NodeChildren({@NodeChild("target"), @NodeChild(value = "element", type = ReadElementNode.class, executeWith = "target")}) + abstract static class ElementCallNode extends ValueNode { @Specialization - Object call(Object receiver, CallTarget callTarget) { - return callTarget.call(new TestArguments(receiver)); + Object call(Object receiver, Object callTarget) { + return ((CallTarget) callTarget).call(new TestArguments(receiver)); } }