Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/FrameTest.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 | 193e3917dc07 |
comparison
equal
deleted
inserted
replaced
13704:10a2d66262ae | 13705:ac5b0f31f7a2 |
---|---|
64 public void test() { | 64 public void test() { |
65 TruffleRuntime runtime = Truffle.getRuntime(); | 65 TruffleRuntime runtime = Truffle.getRuntime(); |
66 FrameDescriptor frameDescriptor = new FrameDescriptor(); | 66 FrameDescriptor frameDescriptor = new FrameDescriptor(); |
67 FrameSlot slot = frameDescriptor.addFrameSlot("localVar", FrameSlotKind.Int); | 67 FrameSlot slot = frameDescriptor.addFrameSlot("localVar", FrameSlotKind.Int); |
68 TestRootNode rootNode = new TestRootNode(new AssignLocal(slot), new ReadLocal(slot)); | 68 TestRootNode rootNode = new TestRootNode(new AssignLocal(slot), new ReadLocal(slot)); |
69 CallTarget target = runtime.createCallTarget(rootNode, frameDescriptor); | 69 CallTarget target = runtime.createCallTarget(rootNode); |
70 Object result = target.call(); | 70 Object result = target.call(); |
71 Assert.assertEquals(42, result); | 71 Assert.assertEquals(42, result); |
72 } | 72 } |
73 | 73 |
74 class TestRootNode extends RootNode { | 74 class TestRootNode extends RootNode { |