#include <stdlib.h>#include <assert.h>#include "objs/kite_object.h"#include "kite_vm.h"Functions | |
| void | kite_push_stack (kite_stack_t **st, int ref, void *obj) |
| void * | kite_pop_stack (kite_stack_t **st) |
| void * | kite_top_stack (kite_stack_t *st) |
| void | kite_destroy_stack (kite_stack_t **st) |
| void kite_destroy_stack | ( | kite_stack_t ** | stack | ) |
Destroy stack.
| [in,out] | stack | The stack to destroy. |
Referenced by kite_vm_compile_from_fp().
| void* kite_pop_stack | ( | kite_stack_t ** | stack | ) |
Pop item off of the stack.
| [in,out] | stack | The stack to operate on. |
References kite_top_stack(), and kite_stack_t::length.
Referenced by kite_vm_call_object(), kite_vm_compile_from_fp(), and kite_vm_compile_from_string().
| void kite_push_stack | ( | kite_stack_t ** | stack, | |
| int | ref, | |||
| void * | obj | |||
| ) |
Push item onto the stack.
| [in,out] | stack | The stack to push onto. |
| ref | If 1, the object is not a kite_object_t. | |
| obj | The object to push. |
References kite_stack_t::allocated, kite_stack_t::length, kite_stack_entry_t::obj, kite_stack_entry_t::reference, and kite_stack_t::stack.
Referenced by kite_vm_call_object(), kite_vm_compile_from_fp(), and kite_vm_compile_from_string().
| void* kite_top_stack | ( | kite_stack_t * | stack | ) |
Return the item at the top of the stack without popping it.
| stack | The stack to operate on. |
References kite_stack_t::length, kite_stack_entry_t::obj, kite_stack_entry_t::reference, kite_stack_t::stack, and kite_symtab_t::value.
Referenced by kite_pop_stack(), kite_vm_call_object(), and kite_vm_execute_user_method().
1.5.6