Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/builtins/SLHelloEqualsWorldBuiltin.java @ 15233:1f7fd2cc008f
change return type of SLHelloEqualsWorldBuiltin
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Fri, 18 Apr 2014 13:43:40 +0200 |
parents | f675818d9ad0 |
children | abe7128ca473 f6ac86d3334e |
comparison
equal
deleted
inserted
replaced
15225:aee7eeb554ad | 15233:1f7fd2cc008f |
---|---|
33 */ | 33 */ |
34 @NodeInfo(shortName = "helloEqualsWorld") | 34 @NodeInfo(shortName = "helloEqualsWorld") |
35 public abstract class SLHelloEqualsWorldBuiltin extends SLBuiltinNode { | 35 public abstract class SLHelloEqualsWorldBuiltin extends SLBuiltinNode { |
36 | 36 |
37 @Specialization | 37 @Specialization |
38 public Object change() { | 38 public String change() { |
39 FrameInstance frameInstance = Truffle.getRuntime().getStackTrace().iterator().next(); | 39 FrameInstance frameInstance = Truffle.getRuntime().getStackTrace().iterator().next(); |
40 Frame frame = frameInstance.getFrame(FrameAccess.READ_WRITE, false); | 40 Frame frame = frameInstance.getFrame(FrameAccess.READ_WRITE, false); |
41 FrameSlot slot = frame.getFrameDescriptor().findOrAddFrameSlot("hello"); | 41 FrameSlot slot = frame.getFrameDescriptor().findOrAddFrameSlot("hello"); |
42 frame.setObject(slot, "world"); | 42 frame.setObject(slot, "world"); |
43 return null; | 43 return "world"; |
44 } | 44 } |
45 } | 45 } |