parrotcode: The Parrot embedding interface | |
Contents | C |
src/embed.c - The Parrot embedding interface
This file implements the Parrot embedding interface.
Parrot_Interp Parrot_new(Parrot_Interp parent)
parent
is NULL
) is the last one to get destroyed.void Parrot_init(Interp *interp)
void Parrot_init_stacktop(Interp *interp, void *stack_top)
void Parrot_set_flag(Interp *interp, Parrot_Interp_flag flag)
flag
,
any of PARROT_BOUNDS_FLAG
,
or PARROT_PROFILE_FLAG
to enable profiling,
and bounds checking respectively or PARROT_THR_TYPE_1
,
PARROT_THR_TYPE_2
,
or PARROT_THR_TYPE_3
to disable thread communication and variable sharing,
disable variable sharing but enable thread communication,
or to enable variable sharing.void Parrot_set_debug(Interp *interp, UINTVAL flag)
PARROT_DEBUG_FLAG
.void Parrot_set_trace(Interp *interp, UINTVAL flag)
PARROT_TRACE_FLAG
void Parrot_clear_flag(Interp *, Parrot_Interp_flag flag)
void Parrot_clear_debug(Interp *, UINTVAL flag)
void Parrot_clear_trace(Interp *, UINTVAL flag)
Parrot_Int Parrot_test_flag(Interp*, Parrot_Interp_flag flag)
UINTVAL Parrot_test_debug(Interp*, UINTVAL flag)
UINTVAL Parrot_test_trace(Interp*, UINTVAL flag)
flag
.void Parrot_set_run_core(Interp *interp, Parrot_Run_core_t core)
void Parrot_setwarnings(Interp *interp, Parrot_warnclass wc)
struct PackFile *Parrot_readbc(Interp *interp, const char *filename)
PackFile
structure,
and do fixups.void Parrot_loadbc(Interp *interp, struct PackFile *pf)
PackFile
returned by Parrot_readbc()
.static PMC *setup_argv(Interp *interp, int argc, char ** argv)
ARGS
array PMC.static int prof_sort_f(const void *a, const void *b)
static const char *op_name(Parrot_Interp interp, int k)
static FLOATVAL calibrate(Parrot_Interp interp)
parrot -p
almost match those measured with time parrot -b
.static void print_profile(Interp*, int status, void *p)
static void print_debug(Interp*, int status, void *p)
void Parrot_runcode(Interp *interp, int argc, char *argv[])
ARGV
and runs the ops.void Parrot_debug(Interp *interp, int argc, char **argv)
void Parrot_disassemble(Interp *interp)
void Parrot_run_native(Parrot_Interp interp, native_func_t func)
func
through the program [enternative, end]
.
This ensures that the function is run with the same setup as in other run loops.include/parrot/embed.h and docs/embed.pod.
Initial version by Brent Dax on 2002.1.28.
|