Class BlockScopeNode

All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, com.oracle.truffle.api.nodes.RepeatingNode, Cloneable
Direct Known Subclasses:
BlockScopeNode.FrameBlockScopeNode, BlockScopeNode.VirtualBlockScopeNode

public abstract class BlockScopeNode extends NamedEvaluationTargetNode implements com.oracle.truffle.api.nodes.RepeatingNode
  • Field Details

  • Constructor Details

  • Method Details

    • create

      public static BlockScopeNode create(JavaScriptNode block, JSFrameSlot blockScopeSlot, com.oracle.truffle.api.frame.FrameDescriptor frameDescriptor, JSFrameSlot parentSlot, boolean functionBlock, boolean captureFunctionFrame, boolean generatorFunctionBlock, boolean hasParentBlock, int start, int end)
    • createVirtual

      public static BlockScopeNode createVirtual(JavaScriptNode block, int frameStart, int frameEnd)
    • 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
    • appendScopeFrame

      public abstract com.oracle.truffle.api.frame.VirtualFrame appendScopeFrame(com.oracle.truffle.api.frame.VirtualFrame frame)
    • exitScope

      public final void exitScope(com.oracle.truffle.api.frame.VirtualFrame frame)
    • exitScope

      public abstract void exitScope(com.oracle.truffle.api.frame.VirtualFrame frame, boolean yield)
    • getBlockScope

      public abstract Object getBlockScope(com.oracle.truffle.api.frame.VirtualFrame frame)
    • setBlockScope

      public abstract void setBlockScope(com.oracle.truffle.api.frame.VirtualFrame frame, Object state)
    • executeRepeating

      public boolean executeRepeating(com.oracle.truffle.api.frame.VirtualFrame frame)
      Specified by:
      executeRepeating in interface com.oracle.truffle.api.nodes.RepeatingNode
    • executeWithName

      public Object executeWithName(com.oracle.truffle.api.frame.VirtualFrame frame, Object name)
      Specified by:
      executeWithName in class NamedEvaluationTargetNode
    • getBlock

      public JavaScriptNode getBlock()
    • isFunctionBlock

      public abstract boolean isFunctionBlock()
    • isResultAlwaysOfType

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

      public int getFrameStart()
    • getFrameEnd

      public int getFrameEnd()