Interface ICallStackFrame
Represents a single call stack frame: the activation record of one procedure call,
owning the storage for every locally-scoped Symbol it declares — its parameters and
its Dim/procedure-local declarations alike (RD-VBAL §2.3.1.2, the local
stack frame heap tier). A Static local is the one exception: it lives in the
module-level statics heap instead, so it keeps its value between calls.
public interface ICallStackFrame : IStackFrame
- Inherited Members
Remarks
⚠️ A CallStackFrame frame is not immutable: the value retrieved for a
given symbol may be different at a subsequent retrieval, and a frame is torn down (its storage
freed) when it is popped from the ICallStack that owns it.
Properties
StaticSymbol
The StaticSymbol identifying the procedure this frame is an activation of.
StaticSymbol StaticSymbol { get; }
Property Value
Methods
GetValue(Symbol)
Gets the IBindingHandle currently held in this frame for the specified locally-scoped Symbol.
IBindingHandle GetValue(Symbol symbol)
Parameters
symbolSymbol
Returns
Exceptions
- KeyNotFoundException
No binding exists yet for
symbolon this frame.
Push(Symbol, VBTypedValue)
Declares symbol on this frame and reserves storage sized for
value, its initial value — the caller's argument for a parameter, the
declared type's default value for a fresh Dim. MS-VBAL draws no distinction between a
parameter and a Dim local for name-resolution purposes, so both are declared this way.
void Push(Symbol symbol, VBTypedValue value)
Parameters
symbolSymbolvalueVBTypedValue
Exceptions
- InvalidOperationException
symbolis already declared on this frame — a compile-timeDuplicateDeclarationthat should never reach runtime.
TryResolve(Symbol, out IBindingHandle?)
Gets the IBindingHandle currently held in this frame for the specified locally-scoped Symbol, if any.
bool TryResolve(Symbol symbol, out IBindingHandle? value)
Parameters
symbolSymbolvalueIBindingHandle