NAME ^

src/sub.c - Subroutines

DESCRIPTION ^

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

Functions ^

void mark_context(PARROT_INTERP, NOTNULL(parrot_context_t *ctx))

Marks the context *ctx.

PARROT_MALLOC PARROT_CANNOT_RETURN_NULL Parrot_sub *new_sub(PARROT_INTERP)

Returns a new Parrot_sub.

PARROT_MALLOC PARROT_CANNOT_RETURN_NULL Parrot_sub *new_closure(PARROT_INTERP)

Returns a new Parrot_sub with its own sctatchpad.

XXX: Need to document semantics in detail.

PARROT_MALLOC PARROT_CANNOT_RETURN_NULL Parrot_cont *new_continuation(PARROT_INTERP, NULLOK(Parrot_cont *to))

Returns a new Parrot_cont to the context of to with its own copy of the current interpreter context. If to is NULL, then the to_ctx is set to the current context.

PARROT_MALLOC PARROT_CANNOT_RETURN_NULL Parrot_cont *new_ret_continuation(PARROT_INTERP)

Returns a new Parrot_cont pointing to the current context.

PARROT_MALLOC PARROT_CANNOT_RETURN_NULL Parrot_coro *new_coroutine(PARROT_INTERP)

Returns a new Parrot_coro.

XXX: Need to document semantics in detail.

PARROT_API PARROT_MALLOC PARROT_CANNOT_RETURN_NULL PMC *new_ret_continuation_pmc(PARROT_INTERP, NULLOK(opcode_t *address))

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

void invalidate_retc_context(PARROT_INTERP, NOTNULL(PMC *cont))

Make true Continuations from all RetContinuations up the call chain.

PARROT_API PARROT_CAN_RETURN_NULL PARROT_WARN_UNUSED_RESULT STRING *Parrot_full_sub_name(PARROT_INTERP, NULLOK(PMC *sub))

Return namespace, name, and location of subroutine.

PARROT_API int Parrot_Context_get_info(PARROT_INTERP, NOTNULL(parrot_context_t *ctx), NOTNULL(Parrot_Context_info *info))

TODO: Not yet documented!!!

PARROT_API PARROT_CAN_RETURN_NULL PARROT_WARN_UNUSED_RESULT STRING *Parrot_Context_infostr(PARROT_INTERP, NOTNULL(parrot_context_t *ctx))

TODO: Not yet documented!!!

PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT PMC *Parrot_find_pad(PARROT_INTERP, NOTNULL(STRING *lex_name), NOTNULL(parrot_context_t *ctx))

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

PARROT_API PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT PMC *parrot_new_closure(PARROT_INTERP, NOTNULL(PMC *sub_pmc))

TODO: Not yet documented!!!

SEE ALSO ^

include/parrot/sub.h.

HISTORY ^

Initial version by Melvin on 2002/06/6.


parrot