get rid of NEEQUAL_NEGZERO

as compatibility checking now relies on eequal, it can no longer do funky things
This commit is contained in:
dzaima 2025-05-23 00:21:00 +03:00
parent b0877bfad9
commit a7897ddcde
3 changed files with 7 additions and 17 deletions

View File

@ -454,7 +454,6 @@ Most toggles require a value of `1` to be enabled.
#define DEBUG_VM 0 // print evaluation of every bytecode
#define USE_VALGRIND 0 // adjust memory manager & code for valgrind usage
#define VERIFY_TAIL (u) // number of bytes after the end of an array to verify not being improperly modified; 64 in DEBUG
#define NEEQUAL_NEGZERO 0 // make negative zero not equal zero for •internal.EEqual
#define RT_VERIFY_ARGS 1 // rtverify: preserve arguments for printing on failure
#define GC_EVERY_NTH_ALLOC (u) // force a GC on every n'th allocation (<=1 to GC on every alloc)

View File

@ -75,9 +75,7 @@ NOINLINE bool atomEqualF(B w, B x) {
}
bool atomEEqual(B w, B x) { // doesn't consume
#if !NEEQUAL_NEGZERO
if (isF64(w) & isF64(x)) return w.f==x.f;
#endif
if (isF64(w) & isF64(x)) return w.f==x.f;
if (!isVal(w) || !isVal(x)) return false;
if (TI(w,byRef) || TY(w)!=TY(x)) return false;
@ -156,16 +154,12 @@ u8 const matchFnData[] = { // for the main diagonal, amount to shift length by;
#undef DEF_EQ
#endif
static NOINLINE bool notEq(void* a, void* b, u64 l, u64 data) { assert(l>0); return false; }
static NOINLINE bool eequalFloat(void* wp0, void* xp0, u64 ia, u64 data) {
f64* wp = wp0;
f64* xp = xp0;
u64 r = 1;
static NOINLINE bool eequalFloat(void* wp, void* xp, u64 ia, u64 data) {
bool r = true;
for (ux i = 0; i < (ux)ia; i++) {
#if NEEQUAL_NEGZERO
r&= ((u64*)wp)[i] == ((u64*)xp)[i];
#else
r&= (wp[i]==xp[i]) | (wp[i]!=wp[i] & xp[i]!=xp[i]);
#endif
f64 w = ((f64*)wp)[i];
f64 x = ((f64*)xp)[i];
r&= (w==x) | (w!=w & x!=x);
}
return r;
}

View File

@ -85,7 +85,4 @@ Mod ← {𝕊:
# •Show "heap corruption test of bit/i16" ⋄ "Ai16"‿1‿50 BitSlash 1000000
# •Show "heap corruption test of bit/i32" ⋄ "Ai32"‿1‿50 BitSlash 1000000
{
¬0 EEQ -0? •Out "Skipping tests requiring !NEEQUAL_NEGZERO";
•Show "⊔ consistency" Group 10000
}
•Show "⊔ consistency" Group 10000