fancier init
This commit is contained in:
parent
f70a8c558c
commit
4762463ce8
2
src/h.h
2
src/h.h
@ -53,6 +53,8 @@ const u16 OBJ_TAG = 0b1111111111110110; // 1111111111110110ppppppppppppppppppppp
|
||||
const u16 ARR_TAG = 0b1111111111110111; // 1111111111110111ppppppppppppppppppppppppppppppppppppppppppppp000 array (everything else is an atom)
|
||||
const u16 VAL_TAG = 0b1111111111110 ; // 1111111111110................................................... pointer to Value, needs refcounting
|
||||
|
||||
void cbqn_init();
|
||||
|
||||
enum Type {
|
||||
/* 0*/ t_empty, // empty bucket placeholder
|
||||
/* 1*/ t_funBI, t_fun_block,
|
||||
|
||||
16
src/main.c
16
src/main.c
@ -69,21 +69,7 @@ Block* ca3(B x) {
|
||||
|
||||
|
||||
int main() {
|
||||
hdr_init();
|
||||
harr_init();
|
||||
fillarr_init();
|
||||
i32arr_init();
|
||||
c32arr_init();
|
||||
f64arr_init();
|
||||
arith_init();
|
||||
fns_init();
|
||||
sfns_init();
|
||||
md1_init();
|
||||
md2_init();
|
||||
sysfn_init();
|
||||
derv_init();
|
||||
comp_init();
|
||||
rtPerf_init();
|
||||
cbqn_init();
|
||||
|
||||
|
||||
B fruntime[] = {
|
||||
|
||||
11
src/stuff.c
11
src/stuff.c
@ -319,3 +319,14 @@ void printAllocStats() {
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#define FOR_INIT(F) F(hdr) F(harr) F(fillarr) F(i32arr) F(c32arr) F(f64arr) F(arith) F(fns) F(sfns) F(md1) F(md2) F(sysfn) F(derv) F(comp) F(rtPerf)
|
||||
#define F(X) static inline void X##_init();
|
||||
FOR_INIT(F)
|
||||
#undef F
|
||||
void cbqn_init() {
|
||||
#define F(X) X##_init();
|
||||
FOR_INIT(F)
|
||||
#undef F
|
||||
}
|
||||
#undef FOR_INIT
|
||||
Loading…
Reference in New Issue
Block a user