Interface FrameInstance


public interface FrameInstance
Represents a current frame instance on the stack. Please note that any frame instance must not be used after the iterateFrames() method returned.
Since:
0.8 or earlier
See Also:
  • Method Details

    • getFrame

      Frame getFrame(FrameInstance.FrameAccess access)
      Accesses the underlying frame using a specified access mode.
      Since:
      0.23
      See Also:
    • isVirtualFrame

      boolean isVirtualFrame()
      Since:
      0.8 or earlier
    • getCompilationTier

      default int getCompilationTier()
      Returns an integer for the optimized tier of this method. If 0 is returned then this means that the frame is currently being interpreted without any optimization. The number of tiers is unlimited, but is typically restricted to a small set. e.g. 0-2. Where 0 could indicate interpreted, 1 indicates first tier and 2 indicates last tier compilation. It is best to not interpret this number and just print it for the user.
      Since:
      21.3.0
    • isCompilationRoot

      default boolean isCompilationRoot()
      Returns whether or not the current frame is a compilation root. A compilation root is a compiled CallTarget which was itself compiled i.e. not inlined into another target.
      Since:
      21.3.0
    • getCallNode

      Node getCallNode()
      Returns a node representing the callsite of the next new target on the stack. This picture indicates how FrameInstance groups the stack.
                            ===============
        Current:         ,>|  CallTarget   | FrameInstance
                         |  ===============
        Caller:          '-|  CallNode     | FrameInstance
                         ,>|  CallTarget   |
                         |  ===============
                         '-|  CallNode     | FrameInstance
                           |  CallTarget   |
                            ===============
                                 ...
                            ===============
                           |  CallNode     | FrameInstance
       Initial call:       |  CallTarget   |
                            ===============
      
       
      Returns:
      a node representing the callsite of the next new target on the stack. Returns null in case there is no upper target or location. The set of possible call nodes is restricted to any node that was passed to CallTarget.call(Node, Object...) or the node set using EncapsulatingNodeReference when invoking CallTarget.call(Object...). If a cached variant of DirectCallNode or IndirectCallNode was used then the call node will be the DirectCallNode or IndirectCallNode respectively.
      Since:
      0.8 or earlier
    • getCallTarget

      CallTarget getCallTarget()
      The CallTarget being invoked in this frame.

      See getCallNode() for the relation between call node and CallTarget.

      Since:
      0.8 or earlier
    • getBytecodeIndex

      default int getBytecodeIndex()
      Returns the resolved bytecode index for this frame instance if the root node returns one. This method returns a negative integer for invalid or an unavailable bytecode index. The meaning of negative bytecode indices is not specified and should not be relied upon across guest language implementations.
      Since:
      24.1
      See Also: