clear flags on •bit._neg & •bit._not reuse

This commit is contained in:
dzaima 2025-06-13 02:21:25 +03:00
parent 932f388cdf
commit ce48dd1bca
2 changed files with 5 additions and 5 deletions

View File

@ -1580,12 +1580,12 @@ B bitop1(B f, B x, enum BitOp1 op, char* name) {
u8 rt = typeOfCast((CastType){ rw, 0 }); u8 rt = typeOfCast((CastType){ rw, 0 });
u64* xp = tyany_ptr(x); u64* xp = tyany_ptr(x);
B r; u64* rp; B r; u64* rp;
if (v(x)->refc!=1 || (rt==t_bitarr && IS_SLICE(TY(x)))) { if (!reusable(x) || (rt==t_bitarr && IS_SLICE(TY(x)))) {
Arr* ra = m_arr(offsetof(TyArr,a) + (n+7)/8, rt, n>>rws); Arr* ra = m_arr(offsetof(TyArr,a) + (n+7)/8, rt, n>>rws);
arr_shCopyUnchecked(ra, x); arr_shCopyUnchecked(ra, x);
r = taga(ra); rp = tyany_ptr(r); r = taga(ra); rp = tyany_ptr(r);
} else { } else {
r = incG(x); rp = xp; r = incG(REUSE(x)); rp = xp;
} }
switch (op) { default: UD; switch (op) { default: UD;
case op_not: { case op_not: {

View File

@ -346,9 +346,9 @@ r←•MakeRand 1 ⋄ ! 1¨⊸≡ ∊{𝕊: 500 r.Deal 1000}¨ ↕4
!"•bit._cast: unsupported width 32 for type 'u'" % 8,32'u'•bit._cast 1280 !"•bit._cast: unsupported width 32 for type 'u'" % 8,32'u'•bit._cast 1280
!"•bit._cast: unsupported width 1 for type 'i'" % 8, 1'i'•bit._cast 1280 !"•bit._cast: unsupported width 1 for type 'i'" % 8, 1'i'•bit._cast 1280
%USE eqvar {𝕊conv: {•internal.Keep 𝕩1 •internal.Validate conv •bit._cast 𝕩}_eqvar 64}¨ ´¨/ 8163264 18163264 %USE eqvar {𝕊 f: {•internal.Keep 𝕩1 •internal.Validate F 𝕩}_eqvar 64}¨ ({𝕩•bit._neg}¨ 8163264) {𝕩 •bit._cast}¨ ´¨/ 8163264 18163264
%USE eqvar {𝕊conv: {•internal.Keep 𝕩1 •internal.Validate conv •bit._cast 𝕩}_eqvar 64}¨ ´¨/ 8163264 18163264 %USE eqvar {𝕊 f: {•internal.Keep 𝕩1 •internal.Validate F 𝕩}_eqvar 64}¨ ({𝕩•bit._neg}¨ 8163264) {𝕩 •bit._cast}¨ ´¨/ 8163264 18163264
%USE eqvar {𝕊conv: {•internal.Squeeze 𝕩 •internal.Validate conv •bit._cast 𝕩}_eqvar 642}¨ ´¨/ 8 18163264 %USE eqvar {𝕊 f: {•internal.Squeeze 𝕩 •internal.Validate F 𝕩}_eqvar 642}¨ ({𝕩•bit._neg}¨ 8163264) {𝕩 •bit._cast}¨ ´¨/ 8 18163264
# •platform # •platform
Str {!=𝕩 !×𝕩 ! ´2=•Type¨𝕩} Str •platform.os Str •platform.cpu.arch Str •platform.bqn.impl_version Str •platform.environment Str {!=𝕩 !×𝕩 ! ´2=•Type¨𝕩} Str •platform.os Str •platform.cpu.arch Str •platform.bqn.impl_version Str •platform.environment