Class JSToBooleanUnaryNode

All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, Cloneable

public abstract class JSToBooleanUnaryNode extends JSUnaryNode
See Also:
  • Constructor Details

    • JSToBooleanUnaryNode

      protected JSToBooleanUnaryNode(JavaScriptNode operand)
  • Method Details

    • create

      public static JavaScriptNode create(JavaScriptNode child)
    • 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
    • executeBoolean

      public abstract boolean executeBoolean(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 a boolean. A node can override this method if it has a better way to producing a value of type boolean.
      Overrides:
      executeBoolean in class JavaScriptNode
      Parameters:
      frame - the frame of the currently executing guest language method
      Returns:
      the value of the execution as a boolean
    • doBoolean

      protected static boolean doBoolean(boolean value)
    • doNull

      protected static boolean doNull(Object value)
    • doUndefined

      protected static boolean doUndefined(Object value)
    • doInt

      protected static boolean doInt(int value)
    • doLong

      protected static boolean doLong(long value)
    • doDouble

      protected static boolean doDouble(double value)
    • doBigInt

      protected static boolean doBigInt(BigInt value)
    • doString

      protected static boolean doString(com.oracle.truffle.api.strings.TruffleString value)
    • doObject

      protected static boolean doObject(Object value)
    • doSymbol

      protected static boolean doSymbol(Symbol value)
    • doForeignObject

      protected static boolean doForeignObject(Object value, com.oracle.truffle.api.nodes.Node node, JSToBooleanNode toBooleanNode)
    • copyUninitialized

      protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)
      Overrides:
      copyUninitialized in class JavaScriptNode
    • 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
    • materializeInstrumentableNodes

      public com.oracle.truffle.api.instrumentation.InstrumentableNode materializeInstrumentableNodes(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags)