src/register.c - Register handling routines


Parrot has 4 register sets, one for each of its basic types. There are 32 registers in each set.

Each register set has a register frame stack for saving and restoring its contents. Note that, whereas the push{i,n,s,p} opcodes push all 32 registers on to the stack, in the C implementation a register frame is actually only half the register set. The opcode calls the the Parrot_push_{i,n,s,p}() function twice, once for each half of the set.

Functions ^

Note that the API header for this file is include/parrot/regfuncs.h not include/parrot/register.h - that contains the various registers and register frame stacks.

void setup_register_stacks(Parrot_Interp, struct Parrot_Context *)

Sets up the register stacks.

void mark_register_stack(Parrot_Interp interpreter, Stack_Chunk_t *stack)

Marks the INT or NUM register stack as live.

void mark_pmc_register_stack(Parrot_Interp interpreter, Stack_Chunk_t *stack)

Marks the PMC register stack as live.

void mark_string_register_stack(Parrot_Interp interpreter, Stack_Chunk_t *stack)

Mark the contents of the string register stack as live.

void Parrot_push_on_stack(void *thing, INTVAL size, INTVAL type)

Unimplemented at present.

void Parrot_pop_off_stack(void *thing, INTVAL type)

Unimplemented at present.


include/parrot/register.h, include/parrot/regfuncs.h, and src/stack_common.c