public static final class JSConstantNode.JSConstantSafeIntegerNode extends JSConstantNode
JSConstantNode.JSConstantBigIntNode, JSConstantNode.JSConstantBooleanNode, JSConstantNode.JSConstantDoubleNode, JSConstantNode.JSConstantIntegerNode, JSConstantNode.JSConstantNullNode, JSConstantNode.JSConstantNumericUnitNode, JSConstantNode.JSConstantSafeIntegerNode, JSConstantNode.JSConstantStringNode, JSConstantNode.JSConstantUndefinedNode
INTERMEDIATE_VALUE
Modifier and Type | Method and Description |
---|---|
Object |
execute(com.oracle.truffle.api.frame.VirtualFrame frame)
Executes this node using the specified context and frame and returns the result value.
|
double |
executeDouble(com.oracle.truffle.api.frame.VirtualFrame frame)
Like
JavaScriptNode.execute(VirtualFrame) except that it tries to convert the result value to a
double. |
Object |
getValue() |
boolean |
isResultAlwaysOfType(Class<?> clazz) |
copyUninitialized, create, createBigInt, createBoolean, createConstantNumericUnit, createDouble, createInt, createNull, createSafeInteger, createString, createUndefined, executeVoid, expressionToString, getDebugProperties, getNodeObject, hasTag
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, createWrapper, executeBoolean, executeInt, executeLong, executeSafeInteger, executeString, findBlockScopeNode, getSourceSection, hasSourceSection, isInstrumentable, onReplace, removeSourceSection, setSourceSection, setSourceSection, toString, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTags
accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, lookupContextReference, lookupLanguageReference, notifyInserted, replace, replace, reportPolymorphicSpecialize
public Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNode
execute
in class JavaScriptNode
frame
- the frame of the currently executing guest language methodpublic double executeDouble(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNode
JavaScriptNode.execute(VirtualFrame)
except that it tries to convert the result value to a
double. A node can override this method if it has a better way to producing a value of type
double.executeDouble
in class JavaScriptNode
frame
- the frame of the currently executing guest language methodpublic boolean isResultAlwaysOfType(Class<?> clazz)
isResultAlwaysOfType
in class JavaScriptNode
public Object getValue()
getValue
in class JSConstantNode