Class JSToIntegerAsLongNode

java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.js.nodes.JavaScriptBaseNode
com.oracle.truffle.js.nodes.cast.JSToIntegerAsLongNode
All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface, Cloneable

public abstract class JSToIntegerAsLongNode extends JavaScriptBaseNode
Basically ECMAScript ToInteger, but correct only for values in the safe integer range. Used by built-in functions that do not care about values outside this range, such as array length or array index conversion. Returns long; values that do not fit into long will be clamped to Long.MAX_VALUE or Long.MIN_VALUE.
See Also:
  • Constructor Details

    • JSToIntegerAsLongNode

      public JSToIntegerAsLongNode()
  • Method Details

    • create

      public static JSToIntegerAsLongNode create()
    • executeLong

      public abstract long executeLong(Object operand)
    • doInteger

      protected static long doInteger(int value)
    • doBoolean

      protected static long doBoolean(boolean value)
    • doLong

      protected static long doLong(long value)
    • doSafeInteger

      protected static long doSafeInteger(SafeInteger value)
    • doDouble

      protected static long doDouble(double value)
    • doDoubleInfinite

      protected static long doDoubleInfinite(double value)
    • doUndefined

      protected static long doUndefined(Object value)
    • doNull

      protected static long doNull(Object value)
    • doSymbol

      protected final long doSymbol(Symbol value)
    • doBigInt

      protected final long doBigInt(BigInt value)
    • doString

      protected long doString(com.oracle.truffle.api.strings.TruffleString value, JSToIntegerAsLongNode nestedToIntegerNode, JSStringToNumberNode stringToNumberNode)
    • doJSObject

      protected long doJSObject(JSObject value, JSToNumberNode toNumberNode)
    • doJSOrForeignObject

      protected long doJSOrForeignObject(Object value, JSToNumberNode toNumberNode)