Interface ICallStack
The call stack of an execution session: an ordered stack of ICallStackFrame activation records, top-most (current) frame first (RD-VBAL §2.3.1.2).
public interface ICallStack
Remarks
⚖️RDCore provides an implementation of this interface licensed under GPLv3.
Properties
Current
The top-most (current) frame, or null if the call stack is empty.
ICallStackFrame? Current { get; }
Property Value
Depth
The current stack depth.
int Depth { get; }
Property Value
Frames
Every frame on the stack, top-most (current) first.
IEnumerable<ICallStackFrame> Frames { get; }
Property Value
Remarks
A read-only view, for the things that need the whole chain rather than its top: capturing the VBStackTrace of a run-time error, chiefly. Enumerating pops nothing — every frame is still the stack's, and its storage is still live.
Methods
TryPop(out ICallStackFrame?)
Pops the current frame off the call stack, freeing every locally-scoped symbol it allocated.
bool TryPop(out ICallStackFrame? frame)
Parameters
frameICallStackFrame
Returns
TryPush(ICallStackFrame)
Pushes frame onto the call stack, making it the current frame.
bool TryPush(ICallStackFrame frame)
Parameters
frameICallStackFrame