make err NOINLINE

This commit is contained in:
dzaima 2021-06-29 22:55:34 +03:00
parent 726451ed0c
commit 1fd61c5467
3 changed files with 10 additions and 7 deletions

View File

@ -131,7 +131,7 @@ void harrP_visit(Value* x) { assert(x->type==t_harrPartial);
usz am = *((HArr*)x)->sh;
for (usz i = 0; i < am; i++) mm_visit(p[i]);
}
B harrP_get(B x, usz n) { return err("getting item from t_harrPartial"); }
B harrP_get(B x, usz n) { err("getting item from t_harrPartial"); }
void harrP_print(B x) {
B* p = c(HArr,x)->a;
usz am = *c(HArr,x)->sh;

View File

@ -3,6 +3,14 @@
#include "../utils/utf.h"
#include "../utils/talloc.h"
NORETURN NOINLINE void err(char* s) {
puts(s); fflush(stdout);
print_vmStack();
__builtin_trap();
exit(1);
}
B bi_emptyHVec, bi_emptyIVec, bi_emptyCVec, bi_emptySVec;
NOINLINE TStack* ts_e(TStack* o, u32 elsz, u64 am) { u64 size = o->size;

View File

@ -282,12 +282,7 @@ void print_vmStack();
B validate(B x);
Value* validateP(Value* x);
#endif
static NORETURN B err(char* s) {
puts(s); fflush(stdout);
print_vmStack();
__builtin_trap();
exit(1);
}
NORETURN NOINLINE void err(char* s);
// tag checks
#ifdef ATOM_I32