parrotcode: Subroutines | |
Contents | C |
src/sub.c - Subroutines
Subroutines, continuations, co-routines and other fun stuff...
void mark_context(Interp *interpreter, parrot_context_t *ctx)
*ctx
.struct Parrot_sub *new_sub(Interp *interp)
Parrot_sub
.struct Parrot_sub *new_closure(Interp *interp)
Parrot_sub
with its own sctatchpad.struct Parrot_cont *new_continuation(Interp *interp, struct Parrot_cont *to)
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.struct Parrot_cont *new_ret_continuation(Interp *interp)
Parrot_cont
pointing to the current context.struct Parrot_coro *new_coroutine(Interp *interp)
Parrot_coro
.PMC *new_ret_continuation_pmc(Interp *interp, opcode_t *address)
RetContinuation
PMC.
Uses one from the cache,
if possible; otherwise,
creates a new one. void invalidate_retc_context(Interp *, PMC *cont)
Parrot_full_sub_name
Sub
PMC image for now locate the Sub
name in the globals.PMC *Parrot_find_pad(Interp*, STRING *lex_name)
include/parrot/sub.h.
Initial version by Melvin on 2002/06/6.
|