Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/builtins/SLHelloEqualsWorldBuiltin.java @ 22251:8dddde8b20d4
Truffle/SL: provide an "unavailable" SourceSection for every RootNode, using a newly defined static name that identifies "SL Builtin" RootNodes.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Thu, 24 Sep 2015 13:16:52 -0700 |
parents | dc83cc1f94f2 |
children |
comparison
equal
deleted
inserted
replaced
22250:0fb3522e5b72 | 22251:8dddde8b20d4 |
---|---|
47 import com.oracle.truffle.api.frame.FrameInstance; | 47 import com.oracle.truffle.api.frame.FrameInstance; |
48 import com.oracle.truffle.api.frame.FrameInstance.FrameAccess; | 48 import com.oracle.truffle.api.frame.FrameInstance.FrameAccess; |
49 import com.oracle.truffle.api.frame.FrameSlot; | 49 import com.oracle.truffle.api.frame.FrameSlot; |
50 import com.oracle.truffle.api.nodes.NodeInfo; | 50 import com.oracle.truffle.api.nodes.NodeInfo; |
51 import com.oracle.truffle.api.source.SourceSection; | 51 import com.oracle.truffle.api.source.SourceSection; |
52 import com.oracle.truffle.sl.SLLanguage; | |
52 | 53 |
53 /** | 54 /** |
54 * This builtin sets the variable named "hello" in the caller frame to the string "world". | 55 * This builtin sets the variable named "hello" in the caller frame to the string "world". |
55 */ | 56 */ |
56 @NodeInfo(shortName = "helloEqualsWorld") | 57 @NodeInfo(shortName = "helloEqualsWorld") |
57 public abstract class SLHelloEqualsWorldBuiltin extends SLBuiltinNode { | 58 public abstract class SLHelloEqualsWorldBuiltin extends SLBuiltinNode { |
58 | 59 |
59 public SLHelloEqualsWorldBuiltin() { | 60 public SLHelloEqualsWorldBuiltin() { |
60 super(SourceSection.createUnavailable("SL builtin", "helloEqualsWorld")); | 61 super(SourceSection.createUnavailable(SLLanguage.builtinKind, "helloEqualsWorld")); |
61 } | 62 } |
62 | 63 |
63 @Specialization | 64 @Specialization |
64 @TruffleBoundary | 65 @TruffleBoundary |
65 public String change() { | 66 public String change() { |