decSh doesn't really need to be split

This commit is contained in:
dzaima 2021-08-01 00:27:00 +03:00
parent 46d4acb72b
commit a444d4827d
2 changed files with 1 additions and 7 deletions

View File

@ -50,11 +50,6 @@ B def_m2_uc1(B t, B o, B f, B g, B x) { B t2 = m2_d(inc(t),inc(f),inc(g));
B def_m2_ucw(B t, B o, B f, B g, B w, B x) { B t2 = m2_d(inc(t),inc(f),inc(g)); B r = rtUnder_cw(o, t2, w, x); dec(t2); return r; }
B def_decompose(B x) { return m_v2(m_i32(isCallable(x)? 0 : -1),x); }
void decShR(Value* x) {
ptr_dec(shObjP(x));
}
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

@ -23,8 +23,7 @@ typedef struct ShArr {
} ShArr;
static ShArr* shObj (B x) { return RFLD(a(x)->sh, ShArr, a); }
static ShArr* shObjP(Value* x) { return RFLD(((Arr*)x)->sh, ShArr, a); }
void decShR(Value* x);
static void decSh(Value* x) { if (RARE(prnk(x)>1)) decShR(x); }
static void decSh(Value* x) { if (RARE(prnk(x)>1)) ptr_dec(shObjP(x));}
// some array stuff