150 c->
str = malloc(strlen(s) + 1);
172 void (*builtin_stack)(
size_t,
unsigned char));
void(* bs)(size_t stack_base, unsigned char nargs)
Definition: picell.h:64
struct cell * cdr
car of the cons cell
Definition: picell.h:55
char * sym
Definition: picell.h:58
size_t n_cells
Definition: picell.h:112
void cell_remove(cell *val)
Definition: picell.c:546
cell_block * blocks
Definition: picell.h:116
void cell_space_double_capacity_if_full(cell_space *cs)
Definition: picell.c:201
void collect_garbage(cell_space *cs)
Definition: picell.c:264
cell * global_env
Definition: picell.h:115
size_t n_free_cells
Definition: picell.h:113
bool is_builtin_macro(cell *c)
Definition: picell.c:538
cell * mk_num(int n)
Definition: picell.c:503
void cell_space_init(cell_space *cs)
Definition: picell.c:178
size_t block_size
Definition: picell.h:100
cell * is_symbol_builtin_macro(char *symbol)
Definition: picell.c:38
unsigned long marks
1 if marked in the "mark" phase of the gc
Definition: picell.h:47
cell * mk_builtin_macro(char *symbol, cell *(*function)(cell *, cell *))
Definition: picell.c:100
cell * list(cell *args)
Definition: pibuiltin.c:389
char * str
value of the num cell
Definition: picell.h:50
bool is_builtin_lambda(cell *c)
Definition: picell.c:537
void cell_space_mark_cell_as_free(cell_space *cs, cell *c)
Definition: picell.c:358
cell * cell_space_get_cell(cell_space *cs)
Definition: picell.c:238
bool is_sym(cell *c)
Definition: picell.c:530
size_t cell_space_size
Definition: picell.h:110
void cell_remove_recursive(cell *c)
Definition: picell.c:389
cell * cdr(cell *c)
Definition: pibuiltin.c:982
size_t stack_pointer
Definition: picell.h:91
void cell_remove_cars(cell *list)
Definition: picell.c:475
cell_space * memory
Definition: picell.h:119
cell * copy_cell(cell *c)
Definition: picell.c:115
cell * mk_str(char *s)
Definition: picell.c:510
void cell_push(cell *val)
Definition: picell.c:540
bool is_num(cell *c)
Definition: picell.c:526
bool is_builtin(cell *c)
Definition: picell.c:534
void init_memory()
Definition: picell.c:262
void cell_remove_pairlis(cell *new_env, cell *old_env)
Definition: picell.c:463
cell * mk_builtin_lambda(char *symbol, cell *(*function)(cell *), void(*builtin_stack)(size_t, unsigned char))
Definition: picell.c:84
void mark(cell *root)
Definition: picell.c:307
void cell_block_free(cell_block *cb)
Definition: picell.c:427
unsigned char type
Definition: picell.h:45
void cell_remove_pairlis_deep(cell *new_env, cell *old_env)
Definition: picell.c:485
cell_space * cell_space_create()
Definition: picell.c:191
cell * car(cell *c)
Definition: pibuiltin.c:972
void cell_push_recursive(cell *c)
Definition: picell.c:372
cell * env(cell *arg)
Definition: pibuiltin.c:907
Basic Lisp entity.
Definition: picell.h:44
void cell_space_grow(cell_space *cs)
Definition: picell.c:211
bool cell_is_in_global_env(cell *global_env, cell *c)
Definition: picell.c:440
cell * is_symbol_builtin_lambda(char *symbol)
Definition: picell.c:26
unsigned char marked
type of the cell referred to the type enum
Definition: picell.h:46
void mark_memory(cell_space *cs)
Definition: picell.c:290
cell * first_free
Definition: picell.h:114
cell * get_cell()
Definition: picell.c:501
void cell_remove_args(cell *args)
Definition: picell.c:452
struct cell * next_free_cell
string of the string cell
Definition: picell.h:51
cell * block
Definition: picell.h:101
cell * mk_sym(char *symbol)
Definition: picell.c:50
#define STACK_LIMIT
Max dimension of the stack.
Definition: pisettings.h:109
bool cell_space_is_full(cell_space *cs)
Definition: picell.c:197
cell * cell_space_is_symbol_allocated(cell_space *cs, char *symbol)
Definition: picell.c:8
cell * mk_cons(cell *car, cell *cdr)
Definition: picell.c:518
bool is_cons(cell *c)
Definition: picell.c:528
struct cell * car
Definition: picell.h:54
bool is_str(cell *c)
Definition: picell.c:527
struct cell cell
Basic Lisp entity.
cell_block * cell_block_create(size_t s)
Definition: picell.c:155
void unsafe_cell_remove(cell *c)
Definition: picell.c:499
void deep_collect_garbage(cell_space *cs)
Definition: picell.c:283
bool is_keyword(cell *c)
Definition: picell.c:529
void cell_space_free(cell_space *cs)
Definition: picell.c:417
represents a builtin lisp function (e.g. car, cdr...)
Definition: picell.h:32
void deep_sweep(cell_space *cs)
Definition: picell.c:336
size_t cell_space_capacity
Definition: picell.h:111
void free_cell_pointed_memory(cell *c)
Definition: picell.c:142
void sweep(cell_space *cs)
Definition: picell.c:317
cell * stack[STACK_LIMIT]
Definition: picell.h:92
int value
Definition: picell.h:49
void free_memory()
Definition: picell.c:438