parrotcode: The Parrot embedding interface | |
Contents | C |
src/embed.c - The Parrot embedding interface
This file implements the Parrot embedding interface.
PARROT_API Parrot_Interp Parrot_new(Parrot_Interp parent)
parent
is NULL
) is the last one to get destroyed.PARROT_API void Parrot_init_stacktop(PARROT_INTERP, void *stack_top)
PARROT_API void Parrot_set_flag(PARROT_INTERP, INTVAL 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.PARROT_API void Parrot_set_debug(PARROT_INTERP, UINTVAL flag)
PARROT_DEBUG_FLAG
.PARROT_API void Parrot_set_trace(PARROT_INTERP, UINTVAL flag)
PARROT_TRACE_FLAG
PARROT_API void Parrot_clear_flag(PARROT_INTERP, INTVAL flag)
PARROT_API void Parrot_clear_debug(PARROT_INTERP, UINTVAL flag)
PARROT_API void Parrot_clear_trace(PARROT_INTERP, UINTVAL flag)
PARROT_API Parrot_Int Parrot_test_flag(PARROT_INTERP, INTVAL flag)
flag
.PARROT_API UINTVAL Parrot_test_debug(PARROT_INTERP, UINTVAL flag)
flag
.PARROT_API UINTVAL Parrot_test_trace(PARROT_INTERP, UINTVAL flag)
flag
.PARROT_API void Parrot_set_run_core(PARROT_INTERP, Parrot_Run_core_t core)
PARROT_API void Parrot_setwarnings(PARROT_INTERP, Parrot_warnclass wc)
PARROT_API PARROT_CAN_RETURN_NULL PackFile *Parrot_readbc(PARROT_INTERP, ARGIN_NULLOK(const char *fullname))
PackFile
structure,
and do fixups.PARROT_API void Parrot_loadbc(PARROT_INTERP, NOTNULL(PackFile *pf))
PackFile
returned by Parrot_readbc()
.PARROT_CANNOT_RETURN_NULL static PMC *setup_argv(PARROT_INTERP, int argc, NOTNULL(char ** argv))
ARGS
array PMC.static int prof_sort_f(ARGIN(const void *a), ARGIN(const void *b))
PARROT_CANNOT_RETURN_NULL static const char *op_name(PARROT_INTERP, int k)
static FLOATVAL calibrate(PARROT_INTERP)
parrot -p
almost match those measured with time parrot -b
.static void print_profile(PARROT_INTERP, SHIM(int status), SHIM(void *p))
static void print_debug(PARROT_INTERP, SHIM(int status), SHIM(void *p))
PARROT_CANNOT_RETURN_NULL static PMC *set_current_sub(PARROT_INTERP)
PARROT_API void Parrot_runcode(PARROT_INTERP, int argc, char *argv[])
ARGV
and runs the ops.PARROT_API PARROT_CAN_RETURN_NULL opcode_t *Parrot_debug(NOTNULL(Parrot_Interp debugger), opcode_t *pc)
PARROT_API void Parrot_disassemble(PARROT_INTERP)
PARROT_API void Parrot_run_native(PARROT_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.
|