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 *interpreter)
void Parrot_init_stacktop(Interp *interpreter, void *stack_top)
void Parrot_set_flag(Interp *interpreter, 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 *interpreter, UINTVAL flag)
PARROT_DEBUG_FLAG
.void Parrot_set_trace(Interp *interpreter, 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 *interpreter, Parrot_Run_core_t core)
void Parrot_setwarnings(Interp *interpreter, Parrot_warnclass wc)
struct PackFile *Parrot_readbc(Interp *interpreter, const char *filename)
PackFile
structure,
and do fixups.void Parrot_loadbc(Interp *interpreter, struct PackFile *pf)
PackFile
returned by Parrot_readbc()
.static void setup_argv(Interp *interpreter, int argc, char ** argv)
ARGS
array in P5.void Parrot_setup_opt(Interp *interpreter, int n, char *argv)
static int prof_sort_f(const void *a, const void *b)
static const char *op_name(Parrot_Interp interpreter, int k)
static FLOATVAL calibrate(Parrot_Interp interpreter)
parrot -p
almost match those measured with time parrot -b
.static void print_profile(int status, void *p)
static void print_debug(int status, void *p)
void Parrot_runcode(Interp *interpreter, int argc, char *argv[])
ARGV
and runs the ops.static char *argv_join(char **argv)
void Parrot_debug(Interp *interpreter, int argc, char **argv)
void Parrot_disassemble(Interp *interpreter)
void Parrot_run_native(Parrot_Interp interpreter, 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.
|