src/pmc/continuation.pmc - Continuation PMC


A Continuation has a copy of the interpreter's context at the location where the Continuation was constructed. See the Glossary for more information.

Functions ^

Methods ^

void init()

Initializes the continuation.

void mark()

Marks the continuation as live.

void destroy()

Destroys the continuation.

PMC *clone()

Creates and returns a clone of the continuation.

PMC *set_pmc()

Assign context.

void set_pointer(void *value)

Sets the pointer to the return instruction. Also captures the current dynamic state, and the descriptor address for any returned values.

void *get_pointer()

Returns the pointer to the return instruction.

INTVAL defined()

INTVAL get_bool()

Returns whether the subroutine is defined.

opcode_t *invoke(void *next)

Restores the "context" of the interpreter and returns the branch destination to continue execution.

STRING *get_string()

Experimental: return caller info as a STRING.

PMC *caller()

Experimental: return caller PMC or PMCNULL if none.

PMC *continuation()

Experimental: return continuation PMC of this Continuation or PMCNULL if none.


Initial revision by sean 2002/08/04.