allow running el2t on el_B & el_MAX

under the assumption that the result won't actually be used; but if it is, trying to free or gc the object will result in a crash
This commit is contained in:
dzaima 2023-02-01 22:46:58 +02:00
parent c38565ab8d
commit c5272b47fb
3 changed files with 7 additions and 5 deletions

View File

@ -5,7 +5,8 @@ u8 elType2type[] = {
[el_i8 ] = t_i8arr, [el_c8 ] = t_c8arr,
[el_i16] = t_i16arr,[el_c16] = t_c16arr,
[el_i32] = t_i32arr,[el_c32] = t_c32arr,
[el_bit] = t_bitarr,[el_f64] = t_f64arr
[el_bit] = t_bitarr,[el_f64] = t_f64arr,
[el_B] = t_invalid, [el_MAX] = t_invalid
};
u8 elTypeWidth[] = {
[el_i8 ] = 1, [el_c8 ] = 1,

View File

@ -262,9 +262,9 @@ typedef union B {
\
/*32*/ F(comp) F(block) F(body) F(scope) F(scopeExt) F(blBlocks) F(arbObj) F(ffiType) \
/*40*/ F(ns) F(nsDesc) F(fldAlias) F(arrMerge) F(vfyObj) F(hashmap) F(temp) F(talloc) F(nfn) F(nfnDesc) \
/*50*/ F(freed) F(harrPartial) F(customObj) F(mmapH) \
/*50*/ F(freed) F(invalid) F(harrPartial) F(customObj) F(mmapH) \
\
/*53*/ IF_WRAP(F(funWrap) F(md1Wrap) F(md2Wrap))
/*55*/ IF_WRAP(F(funWrap) F(md1Wrap) F(md2Wrap))
enum Type {
#define F(X) t_##X,

View File

@ -740,8 +740,9 @@ void base_init() { // very first init function
TIi(i,fn_iw) = def_fn_iw; TIi(i,m1_iw) = def_m1_iw; TIi(i,m2_iw) = def_m2_iw;
TIi(i,fn_ix) = def_fn_ix; TIi(i,m1_ix) = def_m1_ix; TIi(i,m2_ix) = def_m2_ix;
}
TIi(t_empty,freeO) = empty_free; TIi(t_freed,freeO) = def_freeO;
TIi(t_empty,freeF) = empty_free; TIi(t_freed,freeF) = def_freeF;
TIi(t_empty,freeO) = empty_free; TIi(t_invalid,freeO) = empty_free; TIi(t_freed,freeO) = def_freeO;
TIi(t_empty,freeF) = empty_free; TIi(t_invalid,freeF) = empty_free; TIi(t_freed,freeF) = def_freeF;
TIi(t_invalid,visit) = freed_visit;
TIi(t_freed,visit) = freed_visit;
#ifdef DONT_FREE
TIi(t_empty,get) = empty_get;