Mercurial > hg > truffle
diff graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ReturnTypeSpecializationTest.java @ 13705:ac5b0f31f7a2
Truffle API-change: FrameDescriptors are now stored in the RootNode in a final field instead of the CallTarget.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 17 Jan 2014 17:06:08 +0100 |
parents | 139b84d713bc |
children | a08b8694f556 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ReturnTypeSpecializationTest.java Fri Jan 17 16:55:59 2014 +0100 +++ b/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ReturnTypeSpecializationTest.java Fri Jan 17 17:06:08 2014 +0100 @@ -48,8 +48,8 @@ TruffleRuntime runtime = Truffle.getRuntime(); FrameDescriptor frameDescriptor = new FrameDescriptor(); FrameSlot slot = frameDescriptor.addFrameSlot("localVar", FrameSlotKind.Int); - TestRootNode rootNode = new TestRootNode(new IntAssignLocal(slot, new StringTestChildNode()), new IntReadLocal(slot)); - CallTarget target = runtime.createCallTarget(rootNode, frameDescriptor); + TestRootNode rootNode = new TestRootNode(frameDescriptor, new IntAssignLocal(slot, new StringTestChildNode()), new IntReadLocal(slot)); + CallTarget target = runtime.createCallTarget(rootNode); Assert.assertEquals(FrameSlotKind.Int, slot.getKind()); Object result = target.call(); Assert.assertEquals("42", result); @@ -61,8 +61,8 @@ @Child TestChildNode left; @Child TestChildNode right; - public TestRootNode(TestChildNode left, TestChildNode right) { - super(null); + public TestRootNode(FrameDescriptor descriptor, TestChildNode left, TestChildNode right) { + super(null, descriptor); this.left = adoptChild(left); this.right = adoptChild(right); }