A linked list of CallFrame pointers.
The motivation is the situation where an object, typically instantiated on the heap, emits some sort of synchronous signal, event, or callback and the receiving code somehow ends up deleting the originating object. If the emitting object might do more work before the stack unwinds then it can protect itself with a CallFrame check, with almost zero run-time cost:
class Emitter
{
CallStack m_stack ;
void do_stuff()
{
CallFrame this_( m_stack ) ;
do_some_stuff() ;
emit( "doing stuff" ) ;
if( this_.deleted() ) return ;
do_more_stuff() ;
}
} ;
Definition at line 58 of file gcall.h.