parrotcode: Common stack handling routines for Parrot | |
Contents | C |
src/stack_common.c - Common stack handling routines for Parrot
Both the register stacks and stacks implemented in src/stacks.c have a common functionality, which is implemented in this file.
These stacks all differ only in the size of items.
PARROT_API void stack_system_init(SHIM_INTERP)
make_interpreter()
to initialize the interpreter's register stacks.PARROT_API PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Stack_Chunk_t *register_new_stack(PARROT_INTERP, NOTNULL(const char *name), size_t item_size)
stack->name
is used for debugging/error reporting.PARROT_API PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Stack_Chunk_t *cst_new_stack_chunk(PARROT_INTERP, NOTNULL(const Stack_Chunk_t *chunk))
PARROT_API PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL void *stack_prepare_push(PARROT_INTERP, NOTNULL(Stack_Chunk_t **stack_p))
PARROT_API PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL void *stack_prepare_pop(PARROT_INTERP, NOTNULL(Stack_Chunk_t **stack_p))
include/parrot/stacks.h, src/stacks.c, src/registers.c
|