Class JSToIntegerThrowOnInfinityNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.js.nodes.JavaScriptBaseNode
com.oracle.truffle.js.nodes.cast.JSToIntegerThrowOnInfinityNode
- All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface,Cloneable
This implements ToIntegerThrowOnInfinity (via Temporal proposal).
-
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 TypeMethodDescriptioncreate()protected final Numberprotected static intdoBoolean(boolean value) protected longdoDoubleInfinite(double value) protected static intdoInteger(int value) protected NumberdoJSOrForeignObject(Object value, JSToIntegerThrowOnInfinityNode toIntOrInf, JSToNumberNode toNumberNode) protected static longdoLong(long value) protected static intprotected static SafeIntegerdoSafeInteger(SafeInteger value) protected NumberdoString(com.oracle.truffle.api.strings.TruffleString value, JSToIntegerThrowOnInfinityNode toIntOrInf, JSStringToNumberNode stringToNumberNode) protected final Numberprotected static intdoUndefined(Object value) abstract Objectfinal doubleexecuteDouble(Object value) final intexecuteIntOrThrow(Object value) The node by definition should return a double value (that has integer properties), but in some cases we know that the result needs to fit into an integer.Methods inherited from class com.oracle.truffle.js.nodes.JavaScriptBaseNode
copy, getJSContext, getLanguage, getLanguageOptions, getRealm, hasOverloadedOperators, onReplaceMethods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecialize, toString
-
Constructor Details
-
JSToIntegerThrowOnInfinityNode
public JSToIntegerThrowOnInfinityNode()
-
-
Method Details
-
execute
-
executeIntOrThrow
The node by definition should return a double value (that has integer properties), but in some cases we know that the result needs to fit into an integer. Methods like https://tc39.es/proposal-temporal/#sec-temporal-isodatetimewithinlimits or https://tc39.es/proposal-temporal/#sec-temporal-isoyearmonthwithinlimits ensure that days and months are in valid ranges, and years up to about 273,000 years. -
executeDouble
-
create
-
doInteger
protected static int doInteger(int value) -
doLong
protected static long doLong(long value) -
doBoolean
protected static int doBoolean(boolean value) -
doSafeInteger
-
doDoubleInfinite
protected long doDoubleInfinite(double value) -
doNull
-
doUndefined
-
doSymbol
-
doBigInt
-
doString
protected Number doString(com.oracle.truffle.api.strings.TruffleString value, JSToIntegerThrowOnInfinityNode toIntOrInf, JSStringToNumberNode stringToNumberNode) -
doJSOrForeignObject
protected Number doJSOrForeignObject(Object value, JSToIntegerThrowOnInfinityNode toIntOrInf, JSToNumberNode toNumberNode)
-