don't keep around reuse in eachm
This commit is contained in:
parent
e8fecf64fa
commit
0969acef35
@ -76,7 +76,7 @@ static B eachm_fn(BB2B f, B fo, B x) { // consumes x; x must be array
|
|||||||
} else if (TI(x,elType)==el_i32) {
|
} else if (TI(x,elType)==el_i32) {
|
||||||
i32* xp = i32any_ptr(x);
|
i32* xp = i32any_ptr(x);
|
||||||
B r; i32* rp;
|
B r; i32* rp;
|
||||||
if (reuse && v(x)->type==t_i32arr) { r=x; rp = xp; }
|
if (reuse && v(x)->type==t_i32arr) { r=inc(x); rp = xp; }
|
||||||
else r = m_i32arrc(&rp, x);
|
else r = m_i32arrc(&rp, x);
|
||||||
rp[i++] = o2iu(cr);
|
rp[i++] = o2iu(cr);
|
||||||
for (; i < ia; i++) {
|
for (; i < ia; i++) {
|
||||||
@ -84,17 +84,17 @@ static B eachm_fn(BB2B f, B fo, B x) { // consumes x; x must be array
|
|||||||
if (!q_i32(cr)) {
|
if (!q_i32(cr)) {
|
||||||
rH = m_harrs(ia, &i);
|
rH = m_harrs(ia, &i);
|
||||||
for (usz j = 0; j < i; j++) rH.a[j] = m_i32(rp[j]);
|
for (usz j = 0; j < i; j++) rH.a[j] = m_i32(rp[j]);
|
||||||
if (!reuse) dec(r);
|
dec(r);
|
||||||
goto fallback;
|
goto fallback;
|
||||||
}
|
}
|
||||||
rp[i] = o2iu(cr);
|
rp[i] = o2iu(cr);
|
||||||
}
|
}
|
||||||
if (!reuse) dec(x);
|
dec(x);
|
||||||
return r;
|
return r;
|
||||||
} else if (TI(x,elType)==el_f64) {
|
} else if (TI(x,elType)==el_f64) {
|
||||||
f64* xp = f64any_ptr(x);
|
f64* xp = f64any_ptr(x);
|
||||||
B r; f64* rp;
|
B r; f64* rp;
|
||||||
if (reuse && v(x)->type==t_f64arr) { r=x; rp = xp; }
|
if (reuse && v(x)->type==t_f64arr) { r=inc(x); rp = xp; }
|
||||||
else r = m_f64arrc(&rp, x);
|
else r = m_f64arrc(&rp, x);
|
||||||
rp[i++] = o2fu(cr);
|
rp[i++] = o2fu(cr);
|
||||||
for (; i < ia; i++) {
|
for (; i < ia; i++) {
|
||||||
@ -102,12 +102,12 @@ static B eachm_fn(BB2B f, B fo, B x) { // consumes x; x must be array
|
|||||||
if (!q_f64(cr)) {
|
if (!q_f64(cr)) {
|
||||||
rH = m_harrs(ia, &i);
|
rH = m_harrs(ia, &i);
|
||||||
for (usz j = 0; j < i; j++) rH.a[j] = m_f64(rp[j]);
|
for (usz j = 0; j < i; j++) rH.a[j] = m_f64(rp[j]);
|
||||||
if (!reuse) dec(r);
|
dec(r);
|
||||||
goto fallback;
|
goto fallback;
|
||||||
}
|
}
|
||||||
rp[i] = o2fu(cr);
|
rp[i] = o2fu(cr);
|
||||||
}
|
}
|
||||||
if (!reuse) dec(x);
|
dec(x);
|
||||||
return r;
|
return r;
|
||||||
} else if (v(x)->type==t_fillarr) {
|
} else if (v(x)->type==t_fillarr) {
|
||||||
B* xp = fillarr_ptr(a(x));
|
B* xp = fillarr_ptr(a(x));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user