Class JSToInt32Node.JSToInt32UnaryNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.js.nodes.JavaScriptBaseNode
com.oracle.truffle.js.nodes.JavaScriptNode
com.oracle.truffle.js.nodes.unary.JSUnaryNode
com.oracle.truffle.js.nodes.cast.JSToInt32Node.JSToInt32UnaryNode
- All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode,com.oracle.truffle.api.nodes.NodeInterface,Cloneable
- Enclosing class:
JSToInt32Node
-
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.ChildrenNested classes/interfaces inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNode -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanWhether this node is used to implementx | 0.Fields inherited from class com.oracle.truffle.js.nodes.unary.JSUnaryNode
operandNodeFields inherited from class com.oracle.truffle.js.nodes.JavaScriptNode
INTERMEDIATE_VALUE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJSToInt32UnaryNode(JavaScriptNode operand, boolean bitwiseOr) -
Method Summary
Modifier and TypeMethodDescriptionprotected JavaScriptNodecopyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) protected intprotected intdoBoolean(boolean value) protected intdoDouble(double value) protected intdoDoubleFitsInt(double value) protected intdoDoubleRepresentableAsLong(double value) protected intdoDoubleRepresentableAsSafeInteger(double value) protected static intdoForeignObject(Object object, JSToPrimitiveNode toPrimitiveNode, JSToInt32Node toInt32Node) protected intdoInteger(int value) protected intdoJSObject(JSObject value, JSToDoubleNode toDoubleNode) protected static intdoLong(long value) protected static intdoLongNotSafeInteger(long value) protected intprotected intdoOverloadedOperator(JSOverloadedOperatorsObject value, JSOverloadedBinaryNode overloadedOperatorNode, JSToInt32Node toInt32Node) protected intdoSafeInteger(SafeInteger value) protected intdoString(com.oracle.truffle.api.strings.TruffleString value, JSStringToNumberNode stringToNumberNode) protected final intprotected intdoUndefined(Object value) final Objectexecute(com.oracle.truffle.api.frame.VirtualFrame frame) Executes this node using the specified context and frame and returns the result value.abstract intexecuteInt(com.oracle.truffle.api.frame.VirtualFrame frame) LikeJavaScriptNode.execute(VirtualFrame)except that it tries to convert the result value to an int.protected com.oracle.truffle.api.strings.TruffleStringbooleanfinal booleanbooleanisResultAlwaysOfType(Class<?> clazz) Methods inherited from class com.oracle.truffle.js.nodes.unary.JSUnaryNode
getOperandMethods inherited from class com.oracle.truffle.js.nodes.JavaScriptNode
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, createWrapper, executeBoolean, executeDouble, executeVoid, findBlockScopeNode, getSourceSection, hasSourceSection, isInstrumentable, onReplace, setSourceSection, setSourceSection, toString, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTagsMethods inherited from class com.oracle.truffle.js.nodes.JavaScriptBaseNode
getJSContext, getLanguage, getLanguageOptions, getRealm, hasOverloadedOperators, reportLoopCount, reportLoopCountMethods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecialize, reportReplaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
createProbe, findNearestNodeAt, findNearestNodeAt, findProbe, materializeInstrumentableNodes
-
Field Details
-
bitwiseOr
protected final boolean bitwiseOrWhether this node is used to implementx | 0. This optimization is valid insofar asxdoes not overload operators.
-
-
Constructor Details
-
JSToInt32UnaryNode
-
-
Method Details
-
execute
Description copied from class:JavaScriptNodeExecutes this node using the specified context and frame and returns the result value.- Specified by:
executein classJavaScriptNode- Parameters:
frame- the frame of the currently executing guest language method- Returns:
- the value of the execution
-
executeInt
public abstract int executeInt(com.oracle.truffle.api.frame.VirtualFrame frame) Description copied from class:JavaScriptNodeLikeJavaScriptNode.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.- Overrides:
executeIntin classJavaScriptNode- Parameters:
frame- the frame of the currently executing guest language method- Returns:
- the value of the execution as an int
-
doInteger
protected int doInteger(int value) -
doSafeInteger
-
doBoolean
protected int doBoolean(boolean value) -
doLong
protected static int doLong(long value) -
doLongNotSafeInteger
protected static int doLongNotSafeInteger(long value) -
doDoubleFitsInt
protected int doDoubleFitsInt(double value) -
doDoubleRepresentableAsSafeInteger
protected int doDoubleRepresentableAsSafeInteger(double value) -
doDoubleRepresentableAsLong
protected int doDoubleRepresentableAsLong(double value) -
doDouble
protected int doDouble(double value) -
doUndefined
-
doNull
-
doString
protected int doString(com.oracle.truffle.api.strings.TruffleString value, JSStringToNumberNode stringToNumberNode) -
doSymbol
-
doBigInt
-
doOverloadedOperator
protected int doOverloadedOperator(JSOverloadedOperatorsObject value, JSOverloadedBinaryNode overloadedOperatorNode, JSToInt32Node toInt32Node) -
getOverloadedOperatorName
protected com.oracle.truffle.api.strings.TruffleString getOverloadedOperatorName() -
doJSObject
-
doForeignObject
protected static int doForeignObject(Object object, JSToPrimitiveNode toPrimitiveNode, JSToInt32Node toInt32Node) -
isBitwiseOr
public final boolean isBitwiseOr() -
isResultAlwaysOfType
- Overrides:
isResultAlwaysOfTypein classJavaScriptNode
-
hasTag
- Specified by:
hasTagin interfacecom.oracle.truffle.api.instrumentation.InstrumentableNode- Overrides:
hasTagin classJavaScriptNode
-
copyUninitialized
protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) - Overrides:
copyUninitializedin classJavaScriptNode
-
expressionToString
- Overrides:
expressionToStringin classJSUnaryNode
-
getNodeObject
- Specified by:
getNodeObjectin interfacecom.oracle.truffle.api.instrumentation.InstrumentableNode- Overrides:
getNodeObjectin classJSUnaryNode
-