Class JSIsNullOrUndefinedNode

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

public abstract class JSIsNullOrUndefinedNode extends JSUnaryNode
This node optimizes the check whether the argument is null or undefined. Used from the JSEqualNode for optimizing a == undefined; and a == null;
  • Constructor Details

    • JSIsNullOrUndefinedNode

      protected JSIsNullOrUndefinedNode(JavaScriptNode operand, boolean isUndefined, boolean isLeft)
  • Method Details

    • executeBoolean

      public abstract boolean executeBoolean(Object input)
    • 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)
    • doNull

      protected static boolean doNull(Object operand)
    • doUndefined

      protected static boolean doUndefined(Object operand)
    • doSymbol

      protected static boolean doSymbol(Symbol operand)
    • doTString

      protected static boolean doTString(com.oracle.truffle.api.strings.TruffleString operand)
    • doSafeInteger

      protected static boolean doSafeInteger(SafeInteger operand)
    • doBigInt

      protected static boolean doBigInt(BigInt operand)
    • doJSObjectCached

      protected static boolean doJSObjectCached(Object object, Class<?> cachedClass)
    • doJSObject

      protected static boolean doJSObject(Object object)
    • doJSValueOrForeign

      protected boolean doJSValueOrForeign(Object operand, com.oracle.truffle.api.interop.InteropLibrary interop)
    • createFromEquals

      public static JSIsNullOrUndefinedNode createFromEquals(JavaScriptNode left, JavaScriptNode right)
    • create

      public static JSIsNullOrUndefinedNode create(JavaScriptNode value)
    • create

      public static JSIsNullOrUndefinedNode create()
    • isResultAlwaysOfType

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

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