public abstract static class JSToInt32Node.JSToInt32UnaryNode extends JSUnaryNode
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
bitwiseOr
Whether this node is used to implement
x | 0. |
operandNodeINTERMEDIATE_VALUE| Modifier | Constructor and Description |
|---|---|
protected |
JSToInt32UnaryNode(JavaScriptNode operand,
boolean bitwiseOr) |
| Modifier and Type | Method and Description |
|---|---|
protected JavaScriptNode |
copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) |
protected int |
doBigInt(BigInt value) |
protected int |
doBoolean(boolean value) |
protected int |
doDouble(double value) |
protected int |
doDoubleFitsInt(double value) |
protected int |
doDoubleRepresentableAsLong(double value) |
protected int |
doDoubleRepresentableAsSafeInteger(double value) |
protected static int |
doForeignObject(Object object,
JSToPrimitiveNode toPrimitiveNode,
JSToInt32Node toInt32Node) |
protected int |
doInteger(int value) |
protected int |
doJSObject(JSObject value,
JSToDoubleNode toDoubleNode) |
protected int |
doLong(long value) |
protected int |
doNull(Object value) |
protected Object |
doOverloadedOperator(JSOverloadedOperatorsObject value,
JSOverloadedBinaryNode overloadedOperatorNode) |
protected int |
doSafeInteger(SafeInteger value) |
protected int |
doString(com.oracle.truffle.api.strings.TruffleString value,
JSStringToNumberNode stringToNumberNode) |
protected int |
doSymbol(Symbol value) |
protected int |
doUndefined(Object value) |
Object |
execute(com.oracle.truffle.api.frame.VirtualFrame frame)
Executes this node using the specified context and frame and returns the result value.
|
abstract int |
executeInt(com.oracle.truffle.api.frame.VirtualFrame frame)
Like
JavaScriptNode.execute(VirtualFrame) except that it tries to convert the result value to an
int. |
String |
expressionToString() |
Object |
getNodeObject() |
protected com.oracle.truffle.api.strings.TruffleString |
getOverloadedOperatorName() |
boolean |
hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag) |
boolean |
isBitwiseOr() |
boolean |
isResultAlwaysOfType(Class<?> clazz) |
createWrapper, execute, getOperandaddCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, executeBoolean, executeDouble, executeLong, executeVoid, findBlockScopeNode, getSourceSection, hasSourceSection, isInstrumentable, onReplace, removeSourceSection, setSourceSection, setSourceSection, toString, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTagsgetLanguage, getRealm, hasOverloadedOperatorsaccept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecializeprotected final boolean bitwiseOr
x | 0. This optimization is valid insofar
as x does not overload operators.protected JSToInt32UnaryNode(JavaScriptNode operand, boolean bitwiseOr)
public final Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNodeexecute in class JavaScriptNodeframe - the frame of the currently executing guest language methodpublic abstract int executeInt(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNodeJavaScriptNode.execute(VirtualFrame) except that it tries to convert the result value to an
int. A node can override this method if it has a better way to producing a value of type int.executeInt in class JavaScriptNodeframe - the frame of the currently executing guest language methodprotected int doInteger(int value)
protected int doSafeInteger(SafeInteger value)
protected int doBoolean(boolean value)
protected int doLong(long value)
protected int doDoubleFitsInt(double value)
protected int doDoubleRepresentableAsSafeInteger(double value)
protected int doDoubleRepresentableAsLong(double value)
protected int doDouble(double value)
protected int doUndefined(Object value)
protected int doNull(Object value)
protected int doString(com.oracle.truffle.api.strings.TruffleString value,
JSStringToNumberNode stringToNumberNode)
protected final int doSymbol(Symbol value)
protected int doBigInt(BigInt value)
protected Object doOverloadedOperator(JSOverloadedOperatorsObject value, JSOverloadedBinaryNode overloadedOperatorNode)
protected com.oracle.truffle.api.strings.TruffleString getOverloadedOperatorName()
protected int doJSObject(JSObject value, JSToDoubleNode toDoubleNode)
protected static int doForeignObject(Object object, JSToPrimitiveNode toPrimitiveNode, JSToInt32Node toInt32Node)
public final boolean isBitwiseOr()
public boolean isResultAlwaysOfType(Class<?> clazz)
isResultAlwaysOfType in class JavaScriptNodepublic boolean hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag)
hasTag in interface com.oracle.truffle.api.instrumentation.InstrumentableNodehasTag in class JavaScriptNodeprotected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
copyUninitialized in class JavaScriptNodepublic String expressionToString()
expressionToString in class JSUnaryNodepublic Object getNodeObject()
getNodeObject in interface com.oracle.truffle.api.instrumentation.InstrumentableNodegetNodeObject in class JSUnaryNode