Package com.oracle.truffle.sl.builtins
Class SLEvalBuiltin
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.sl.builtins.SLBuiltinNode
com.oracle.truffle.sl.builtins.SLEvalBuiltin
- All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface,Cloneable
Builtin function to evaluate source code in any supported language.
The call target is cached against the language id and the source code, so that if they are the same each time then a direct call will be made to a cached AST, allowing it to be compiled and possibly inlined.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.nodes.Node.Child, com.oracle.truffle.api.nodes.Node.Children -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevalCached(com.oracle.truffle.api.strings.TruffleString id, com.oracle.truffle.api.strings.TruffleString code, com.oracle.truffle.api.strings.TruffleString cachedId, com.oracle.truffle.api.strings.TruffleString cachedCode, com.oracle.truffle.api.nodes.DirectCallNode callNode, com.oracle.truffle.api.strings.TruffleString.EqualNode equalNodeId, com.oracle.truffle.api.strings.TruffleString.EqualNode equalNodeCode) evalGeneric(com.oracle.truffle.api.strings.TruffleString id, com.oracle.truffle.api.strings.TruffleString code) protected com.oracle.truffle.api.CallTargetparse(com.oracle.truffle.api.strings.TruffleString id, com.oracle.truffle.api.strings.TruffleString code) protected static booleanstringsEqual(com.oracle.truffle.api.strings.TruffleString.EqualNode node, com.oracle.truffle.api.strings.TruffleString a, com.oracle.truffle.api.strings.TruffleString b) Methods inherited from class com.oracle.truffle.sl.builtins.SLBuiltinNode
executeMethods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, reportReplace, toString
-
Constructor Details
-
SLEvalBuiltin
public SLEvalBuiltin()
-
-
Method Details
-
evalCached
public Object evalCached(com.oracle.truffle.api.strings.TruffleString id, com.oracle.truffle.api.strings.TruffleString code, com.oracle.truffle.api.strings.TruffleString cachedId, com.oracle.truffle.api.strings.TruffleString cachedCode, com.oracle.truffle.api.nodes.DirectCallNode callNode, com.oracle.truffle.api.strings.TruffleString.EqualNode equalNodeId, com.oracle.truffle.api.strings.TruffleString.EqualNode equalNodeCode) -
evalGeneric
public Object evalGeneric(com.oracle.truffle.api.strings.TruffleString id, com.oracle.truffle.api.strings.TruffleString code) -
parse
protected com.oracle.truffle.api.CallTarget parse(com.oracle.truffle.api.strings.TruffleString id, com.oracle.truffle.api.strings.TruffleString code) -
stringsEqual
protected static boolean stringsEqual(com.oracle.truffle.api.strings.TruffleString.EqualNode node, com.oracle.truffle.api.strings.TruffleString a, com.oracle.truffle.api.strings.TruffleString b)
-