NAME ^

src/inter_create.c - Parrot Interpreter Creation and Destruction

DESCRIPTION ^

Create or destroy a Parrot interpreter.c

Functions ^

static int is_env_var_set(const char *var)

Checks whether the specified environment variable is set.

static void setup_default_compreg(Parrot_Interp interpreter)

Setup default compiler for PASM.

static void new_context_mem(Interp *, context_mem *ctx_mem)

Allocate and initialize context memory chunk.

static void destroy_context(Interp *)

Free allocated context memory

static void create_initial_context(Interp *)

Create initial interpreter context.

void parrot_gc_context(Interp *)

Cleanup dead context memory. Called by the gargabe collector.

void Parrot_alloc_context(Interp *)

Allocate a new context and set the context pointer.

void Parrot_set_context_threshold(Interp *, parrot_context_t *ctxp)

Mark the context as possible threshold.

void Parrot_free_context(Interp *, parrot_context_t *ctxp, int re_use)

Free the context. If re_use is true, this function is called by a return continuation invoke, else from the destructur of a continuation.

Parrot_Interp make_interpreter(Parrot_Interp parent, Interp_flags flags)

Create the Parrot interpreter. Allocate memory and clear the registers.

void Parrot_destroy(Interp *interpreter)

Does nothing if ATEXIT_DESTROY is defined. Otherwise calls Parrot_really_destroy() with exit code 0.

This function is not currently used.

void Parrot_really_destroy(int exit_code, void *vinterp)

Waits for any threads to complete, then frees all allocated memory, and closes any open file handles, etc.

Note that exit_code is ignored.

SEE ALSO ^

include/parrot/interpreter.h, src/interpreter.c.


parrot