Class OptionalChainNode.ShortCircuitTargetableNode

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:
OptionalChainNode

public static final class OptionalChainNode.ShortCircuitTargetableNode extends JSTargetableNode
Evaluates an optional expression and if its value is null or undefined, jumps out of the short-circuiting expression to the parent OptionalChainNode.
  • Method Details

    • getExpressionNode

      public JSTargetableNode getExpressionNode()
    • getTarget

      public JavaScriptNode getTarget()
      Overrides:
      getTarget in class JSTargetableNode
    • execute

      public 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
    • executeVoid

      public void executeVoid(com.oracle.truffle.api.frame.VirtualFrame frame)
      Description copied from class: JavaScriptNode
      Like JavaScriptNode.execute(VirtualFrame) except that it throws away the result. A node can override this method if it has a better way to execute without producing a value.
      Overrides:
      executeVoid in class JavaScriptNode
      Parameters:
      frame - the frame of the currently executing guest language method
    • executeWithTarget

      public Object executeWithTarget(com.oracle.truffle.api.frame.VirtualFrame frame, Object target)
      Specified by:
      executeWithTarget in class JSTargetableNode
    • copyUninitialized

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