Class JSToInt32Node.JSToInt32UnaryNode

java.lang.Object
com.oracle.truffle.api.nodes.Node
All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, Cloneable
Enclosing class:
JSToInt32Node

public abstract static class JSToInt32Node.JSToInt32UnaryNode extends JSUnaryNode
  • Field Details

    • bitwiseOr

      protected final boolean bitwiseOr
      Whether this node is used to implement x | 0. This optimization is valid insofar as x does not overload operators.
  • Constructor Details

    • JSToInt32UnaryNode

      protected JSToInt32UnaryNode(JavaScriptNode operand, boolean bitwiseOr)
  • Method Details

    • execute

      public final Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)
      Description copied from class: JavaScriptNode
      Executes this node using the specified context and frame and returns the result value.
      Specified by:
      execute in class JavaScriptNode
      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: JavaScriptNode
      Like JavaScriptNode.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:
      executeInt in class JavaScriptNode
      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

      protected int doSafeInteger(SafeInteger value)
    • 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

      protected int doUndefined(Object value)
    • doNull

      protected int doNull(Object value)
    • doString

      protected int doString(com.oracle.truffle.api.strings.TruffleString value, JSStringToNumberNode stringToNumberNode)
    • doSymbol

      protected final int doSymbol(Symbol value)
    • doBigInt

      protected int doBigInt(BigInt value)
    • doOverloadedOperator

      protected int doOverloadedOperator(JSOverloadedOperatorsObject value, JSOverloadedBinaryNode overloadedOperatorNode, JSToInt32Node toInt32Node)
    • getOverloadedOperatorName

      protected com.oracle.truffle.api.strings.TruffleString getOverloadedOperatorName()
    • doJSObject

      protected int doJSObject(JSObject value, JSToDoubleNode toDoubleNode)
    • doForeignObject

      protected static int doForeignObject(Object object, JSToPrimitiveNode toPrimitiveNode, JSToInt32Node toInt32Node)
    • isBitwiseOr

      public final boolean isBitwiseOr()
    • isResultAlwaysOfType

      public boolean isResultAlwaysOfType(Class<?> clazz)
      Overrides:
      isResultAlwaysOfType in class JavaScriptNode
    • hasTag

      public boolean hasTag(Class<? extends com.oracle.truffle.api.instrumentation.Tag> tag)
      Specified by:
      hasTag in interface com.oracle.truffle.api.instrumentation.InstrumentableNode
      Overrides:
      hasTag in class JavaScriptNode
    • copyUninitialized

      protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
      Overrides:
      copyUninitialized in class JavaScriptNode
    • expressionToString

      public String expressionToString()
      Overrides:
      expressionToString in class JSUnaryNode
    • getNodeObject

      public Object getNodeObject()
      Specified by:
      getNodeObject in interface com.oracle.truffle.api.instrumentation.InstrumentableNode
      Overrides:
      getNodeObject in class JSUnaryNode