Class LetCoercionStackManager
The let-coercions being evaluated, innermost first: a coercion that would push a frame already on the stack is recursive.
public sealed class LetCoercionStackManager : StackManager<LetCoercionStackFrame>
- Inheritance
-
LetCoercionStackManager
- Inherited Members
Remarks
The stack is seldom more than a frame or two deep, and empty when most coercions begin, so it is searched rather than hashed: hashing a frame hashes the value it coerces, which boxes it, three times for every coercion. A frame is only pushed when it is not on the stack already, so no two frames on it are equal.
Methods
OnBeforeTryPop()
🧩 override this method in a derived class to intercept and abort a frame pop.
protected override sealed bool OnBeforeTryPop()
Returns
- bool
trueif the pop can proceed,falseif it's aborted.
OnBeforeTryPush(LetCoercionStackFrame)
🧩 override this method in a derived class to intercept and abort a frame push.
protected override sealed bool OnBeforeTryPush(LetCoercionStackFrame frame)
Parameters
frameLetCoercionStackFrameThe stack frame to be pushed.
Returns
- bool
trueif the push can proceed,falseif it's aborted.