Class ACallFrame<T extends ACallFrame<T,U>,U extends ACompilerData<?,U>>

java.lang.Object
org.htmlunit.corejs.javascript.ACallFrame<T,U>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CallFrameV2

public abstract class ACallFrame<T extends ACallFrame<T,U>,U extends ACompilerData<?,U>> extends Object implements Serializable
Interface representing a call frame in the interpreter. This abstraction allows both the original interpreter's CallFrame and InterpreterV2's CallFrameV2 to be used interchangeably for stack traces and debugging purposes.
See Also:
  • Field Details

    • parentFrame

      public final T extends ACallFrame<T,U> parentFrame
    • frameIndex

      public final short frameIndex
    • previousInterpreterFrame

      public final ACallFrame<?,?> previousInterpreterFrame
    • parentPC

      public final int parentPC
    • frozen

      public boolean frozen
    • fnOrScript

      public ScriptOrFn<?> fnOrScript
    • compilerData

      public U extends ACompilerData<?,U> compilerData
    • stack

      public final Object[] stack
    • stackAttributes

      public final byte[] stackAttributes
    • doubleStack

      public final double[] doubleStack
    • result

      public Object result
    • resultDbl

      public double resultDbl
    • pc

      public int pc
    • stackTop

      public int stackTop
    • scope

      public VarScope scope
    • thisObj

      public Object thisObj
    • newTarget

      public final Object newTarget
    • debuggerFrame

      public final DebugFrame debuggerFrame
    • useActivation

      public final boolean useActivation
    • varSource

      public ACallFrame<T extends ACallFrame<T,U>,U extends ACompilerData<?,U>> varSource
    • localShift

      public final int localShift
    • emptyStackTop

      public final short emptyStackTop
    • throwable

      public Object throwable
  • Constructor Details

    • ACallFrame

      protected ACallFrame(T original, T parentFrame, ACallFrame<?,?> previousInterpreterFrame)
    • ACallFrame

      protected ACallFrame(T original, T parentFrame, ACallFrame<?,?> previousInterpreterFrame, boolean copyStack, boolean keepFrozen)
  • Method Details

    • getFrameIndex

      public abstract int getFrameIndex()
      Returns the index of this frame in the call stack (0 for the top-level frame).
    • getParentFrame

      public abstract ACallFrame<T,U> getParentFrame()
      Returns the parent frame, or null if this is the top-level frame.
    • getPcSourceLineStart

      public abstract int getPcSourceLineStart()
      Returns the program counter position for source line information. For the original interpreter, this is the PC at the start of the current source line. For InterpreterV2, this may be the current PC.
    • getData

      public abstract DebuggableScript getData()
      Returns the debuggable script data associated with this frame.
    • getParentPC

      public int getParentPC()
    • getPreviousInterpreterFrame

      public ACallFrame<?,?> getPreviousInterpreterFrame()
    • getFnOrScript

      public ScriptOrFn<?> getFnOrScript()