NAME ^

src/sub.c - Subroutines

DESCRIPTION ^

Subroutines, continuations, co-routines and other fun stuff...

Functions ^

void mark_context(Interp *interpreter, parrot_context_t *ctx)

Marks the context *ctx.

struct Parrot_sub *new_sub(Interp *interp)

Returns a new Parrot_sub.

struct Parrot_sub *new_closure(Interp *interp)

Returns a new Parrot_sub with its own sctatchpad.

XXX: Need to document semantics in detail.

struct Parrot_cont *new_continuation(Interp *interp, struct Parrot_cont *to)

Returns a new Parrot_cont to the context of to with its own copy of the current interpreter context.

struct Parrot_cont *new_ret_continuation(Interp *interp)

Returns a new Parrot_cont pointing to the current context.

struct Parrot_coro *new_coroutine(Interp *interp)

Returns a new Parrot_coro.

XXX: Need to document semantics in detail.

PMC *new_ret_continuation_pmc(Interp *interp, opcode_t *address)

Returns a new RetContinuation PMC. Uses one from the cache, if possible; otherwise, creates a new one.

void invalidate_retc_context(Interp *, PMC *cont)

Make true Continuation from all RetContinuations up the call chain.

Parrot_full_sub_name

Print name and location of subroutine, This should finally use the label name of the frozen Sub PMC image for now locate the Sub name in the globals.

PMC *Parrot_find_pad(Interp*, STRING *lex_name)

Locate the LexPad containing the given name. Return NULL on failure.

SEE ALSO ^

include/parrot/sub.h.

HISTORY ^

Initial version by Melvin on 2002/06/6.


parrot