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.

void *get_pointer()

Returns the pointer to the return instruction.

INTVAL defined()

INTVAL get_bool()

Returns whether the subroutine is defined.

void *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.

METHOD PMC* "caller"()

Experimental: return caller PMC or Undef if none.

METHOD PMC* "continuation"()

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


Initial revision by sean 2002/08/04.