Mercurial > hg > truffle
diff graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/FrameTest.java @ 9321:cd1a1d92b3e3
Frame API: Introduce FrameSlotKind.
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Thu, 25 Apr 2013 18:14:08 +0200 |
parents | 07f8d136a05e |
children | df1d665ca846 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/FrameTest.java Thu Apr 25 23:17:58 2013 +0200 +++ b/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/FrameTest.java Thu Apr 25 18:14:08 2013 +0200 @@ -35,9 +35,9 @@ * The frame is the preferred data structure for passing values between nodes. It can in particular * be used for storing the values of local variables of the guest language. The * {@link FrameDescriptor} represents the current structure of the frame. The method - * {@link FrameDescriptor#addFrameSlot(Object, Class)} can be used to create predefined frame slots. - * The setter and getter methods in the {@link Frame} class can be used to access the current value - * of a particular frame slot. + * {@link FrameDescriptor#addFrameSlot(Object, FrameSlotKind)} can be used to create predefined + * frame slots. The setter and getter methods in the {@link Frame} class can be used to access the + * current value of a particular frame slot. * </p> * * <p> @@ -64,7 +64,7 @@ public void test() { TruffleRuntime runtime = Truffle.getRuntime(); FrameDescriptor frameDescriptor = new FrameDescriptor(); - FrameSlot slot = frameDescriptor.addFrameSlot("localVar", int.class); + FrameSlot slot = frameDescriptor.addFrameSlot("localVar", FrameSlotKind.Int); TestRootNode rootNode = new TestRootNode(new AssignLocal(slot), new ReadLocal(slot)); CallTarget target = runtime.createCallTarget(rootNode, frameDescriptor); Object result = target.call();