NAME
src/pmc/context.pmc - Interpreter Context.
DESCRIPTION
Stores context of execution. Currently we store pointer to Parrot_Context_attributes structure in PMC_data.
Vtable Functions
void init()
Initialize new Context.
See void mark()
Mark Context as alive.
void destroy()
Destroy Context and memory allocated by PMC *get_pmc_keyed_str(STRING *key)
Introspection interface.
PMC *backtrace
Gets a representation of the backtrace starting from this Context. Returns an array of hashes. Each array element represents a caller in the backtrace, the most recent caller first. The hash has two keys:
Parrot_alloc_context
.
Parrot_alloc_context
.
key
can be:
caller_ctx ... return Caller Context lex_pad ... return LexPad outer_ctx ... return Outer Context current_sub ... return current Sub handlers ... return list of ExceptioHandlers current_cont ... return current Continuation current_object ... return current Object (if in method call) current_namespace ... return current Namespace
sub
, which holds the PMC representing the sub, and annotations
which is a hash of the annotations at the point where the exception was thrown for the current sub, or for the point of the call a level deeper for the rest.