make gcc warn less
This commit is contained in:
parent
2cab929fb5
commit
e04cd3c135
13
src/load.c
13
src/load.c
@ -5,6 +5,11 @@
|
||||
#include "utils/file.h"
|
||||
#include "utils/builtins.h"
|
||||
|
||||
#define FOR_INIT(F) F(harr) F(fillarr) F(i32arr) F(c32arr) F(f64arr) F(hash) F(sfns) F(fns) F(arith) F(md1) F(md2) F(derv) F(comp) F(rtWrap) F(ns) F(nfn) F(sysfn) F(load) F(sysfnPost)
|
||||
#define F(X) void X##_init(void);
|
||||
FOR_INIT(F)
|
||||
#undef F
|
||||
|
||||
u64 mm_heapMax = HEAP_MAX;
|
||||
u64 mm_heapAlloc;
|
||||
|
||||
@ -181,7 +186,7 @@ void bqn_setComp(B comp) { // consumes; doesn't unload old comp, but whatever
|
||||
gc_add(load_comp);
|
||||
}
|
||||
|
||||
static inline void load_init() { // very last init function
|
||||
void load_init() { // very last init function
|
||||
comp_currPath = bi_N;
|
||||
comp_currArgs = bi_N;
|
||||
comp_currSrc = bi_N;
|
||||
@ -374,7 +379,7 @@ static B empty_getU(B x, usz n) {
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void base_init() { // very first init function
|
||||
void base_init() { // very first init function
|
||||
for (u64 i = 0; i < t_COUNT; i++) {
|
||||
TIi(i,free) = def_free;
|
||||
TIi(i,visit) = def_visit;
|
||||
@ -434,10 +439,6 @@ static inline void base_init() { // very first init function
|
||||
#undef FD
|
||||
}
|
||||
|
||||
#define FOR_INIT(F) F(base) F(harr) F(fillarr) F(i32arr) F(c32arr) F(f64arr) F(hash) F(sfns) F(fns) F(arith) F(md1) F(md2) F(derv) F(comp) F(rtWrap) F(ns) F(nfn) F(sysfn) F(load) F(sysfnPost)
|
||||
#define F(X) void X##_init(void);
|
||||
FOR_INIT(F)
|
||||
#undef F
|
||||
void cbqn_init() {
|
||||
#define F(X) X##_init();
|
||||
FOR_INIT(F)
|
||||
|
||||
9
src/vm.c
9
src/vm.c
@ -119,8 +119,9 @@ void gsPrint() {
|
||||
while (c!=gStack) {
|
||||
printf(" %d: ", i); fflush(stdout);
|
||||
print(*c); fflush(stdout);
|
||||
if (isVal(*c)) printf(", refc=%d", v(*c)->refc); fflush(stdout);
|
||||
if (isVal(*c)) printf(", refc=%d", v(*c)->refc);
|
||||
printf("\n");
|
||||
fflush(stdout);
|
||||
c++;
|
||||
i++;
|
||||
}
|
||||
@ -163,8 +164,10 @@ Block* compileBlock(B block, Comp* comp, bool* bDone, u32* bc, usz bcIA, B allBl
|
||||
bodyAm2 = a(b2)->ia; BS2B b2GetU = TI(b2,getU);
|
||||
bodyILen = bodyAm1+bodyAm2;
|
||||
TALLOC(i32, bodyInds_, bodyILen+2); bodyI = bodyInds_;
|
||||
for (i32 i = 0; i < bodyAm1; i++) bodyI[i ] = o2i(b1GetU(b1, i)); for (i32 i = 1; i < bodyAm1; i++) if (bodyI[i]>bodyI[i-1]) thrM("VM compiler: Expecte body indices to be sorted");
|
||||
for (i32 i = 0; i < bodyAm2; i++) bodyI[i+bodyAm1+1] = o2i(b2GetU(b2, i)); for (i32 i = 1; i < bodyAm2; i++) if (bodyI[i]>bodyI[i-1]) thrM("VM compiler: Expecte body indices to be sorted");
|
||||
for (i32 i = 0; i < bodyAm1; i++) bodyI[i ] = o2i(b1GetU(b1, i));
|
||||
for (i32 i = 0; i < bodyAm2; i++) bodyI[i+bodyAm1+1] = o2i(b2GetU(b2, i));
|
||||
for (i32 i = 1; i < bodyAm1; i++) if (bodyI[i]>bodyI[i-1]) thrM("VM compiler: Expecte body indices to be sorted");
|
||||
for (i32 i = 1; i < bodyAm2; i++) if (bodyI[i]>bodyI[i-1]) thrM("VM compiler: Expecte body indices to be sorted");
|
||||
bodyI[bodyAm1] = bodyI[bodyILen+1] = I32_MAX;
|
||||
} else {
|
||||
bodyILen = 2;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user