waste less on thrF

This commit is contained in:
dzaima 2021-07-03 02:55:22 +03:00
parent 7999683edf
commit ee3ef4370c
2 changed files with 5 additions and 1 deletions

View File

@ -12,6 +12,9 @@ NORETURN NOINLINE void err(char* s) {
}
B bi_emptyHVec, bi_emptyIVec, bi_emptyCVec, bi_emptySVec;
NOINLINE B emptyCVecR() {
return emptyCVec();
}
NOINLINE TStack* ts_e(TStack* o, u32 elsz, u64 am) { u64 size = o->size;
u64 alsz = mm_round(fsizeof(TStack, data, u8, (size+am)*elsz));

View File

@ -235,6 +235,7 @@ extern B bi_emptyHVec, bi_emptyIVec, bi_emptyCVec, bi_emptySVec;
#define emptyIVec() ({ B t = bi_emptyIVec; ptr_inc(v(t)); t; })
#define emptyCVec() ({ B t = bi_emptyCVec; ptr_inc(v(t)); t; })
#define emptySVec() ({ B t = bi_emptySVec; ptr_inc(v(t)); t; })
NOINLINE B emptyCVecR();
static void dec(B x);
static B inc(B x);
static void ptr_dec(void* x);
@ -260,7 +261,7 @@ B bqn_repr(B x); // consumes
NOINLINE NORETURN void thr(B b);
NOINLINE NORETURN void thrM(char* s);
#define thrF(...) thr(append_fmt(emptyCVec(), __VA_ARGS__))
#define thrF(...) thr(append_fmt(emptyCVecR(), __VA_ARGS__))
NOINLINE NORETURN void thrOOM();
jmp_buf* prepareCatch();
#if CATCH_ERRORS