public abstract class JSToBooleanNode extends JSUnaryNode
Modifier and Type | Field and Description |
---|---|
protected static int |
MAX_CLASSES |
operandNode
INTERMEDIATE_VALUE
Modifier | Constructor and Description |
---|---|
protected |
JSToBooleanNode(JavaScriptNode operand) |
Modifier and Type | Method and Description |
---|---|
protected JavaScriptNode |
copyUninitialized() |
static JSToBooleanNode |
create() |
static JavaScriptNode |
create(JavaScriptNode child) |
protected boolean |
doBigInt(BigInt value) |
protected boolean |
doBoolean(boolean value) |
protected boolean |
doDouble(double value) |
protected boolean |
doForeignObject(com.oracle.truffle.api.interop.TruffleObject value,
com.oracle.truffle.api.interop.InteropLibrary interop) |
protected boolean |
doInt(int value) |
protected boolean |
doLazyString(JSLazyString value) |
protected boolean |
doLong(long value) |
protected boolean |
doNull(Object value) |
protected boolean |
doObject(com.oracle.truffle.api.object.DynamicObject value) |
protected boolean |
doString(String value) |
protected boolean |
doSymbol(Symbol value) |
protected boolean |
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 boolean |
executeBoolean(Object value) |
abstract boolean |
executeBoolean(com.oracle.truffle.api.frame.VirtualFrame frame)
Like
JavaScriptNode.execute(VirtualFrame) except that it tries to convert the result value to a
boolean. |
boolean |
isResultAlwaysOfType(Class<?> clazz) |
createWrapper, execute, expressionToString, getNodeObject, getOperand
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, executeByte, executeCharacter, executeDouble, executeDynamicObject, executeFloat, executeInt, executeLargeInteger, executeLong, executeObjectArray, executeString, executeTruffleObject, executeVoid, getSourceSection, hasSourceSection, hasTag, isInstrumentable, onReplace, removeSourceSection, setSourceSection, setSourceSection, toString, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTags
accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, lookupContextReference, lookupLanguageReference, notifyInserted, replace, replace, reportPolymorphicSpecialize
protected static final int MAX_CLASSES
protected JSToBooleanNode(JavaScriptNode operand)
public final Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNode
execute
in class JavaScriptNode
frame
- the frame of the currently executing guest language methodpublic abstract boolean executeBoolean(com.oracle.truffle.api.frame.VirtualFrame frame)
JavaScriptNode
JavaScriptNode.execute(VirtualFrame)
except that it tries to convert the result value to a
boolean. A node can override this method if it has a better way to producing a value of type
boolean.executeBoolean
in class JavaScriptNode
frame
- the frame of the currently executing guest language methodpublic abstract boolean executeBoolean(Object value)
public boolean isResultAlwaysOfType(Class<?> clazz)
isResultAlwaysOfType
in class JavaScriptNode
public static JSToBooleanNode create()
public static JavaScriptNode create(JavaScriptNode child)
protected boolean doBoolean(boolean value)
protected boolean doNull(Object value)
protected boolean doUndefined(Object value)
protected boolean doInt(int value)
protected boolean doLong(long value)
protected boolean doDouble(double value)
protected boolean doBigInt(BigInt value)
protected boolean doLazyString(JSLazyString value)
protected boolean doString(String value)
protected boolean doObject(com.oracle.truffle.api.object.DynamicObject value)
protected boolean doSymbol(Symbol value)
protected boolean doForeignObject(com.oracle.truffle.api.interop.TruffleObject value, com.oracle.truffle.api.interop.InteropLibrary interop)
protected JavaScriptNode copyUninitialized()
copyUninitialized
in class JavaScriptNode