make !𝕩 throw 𝕩

This commit is contained in:
dzaima 2021-08-30 22:27:04 +03:00
parent 17a3ed150d
commit e577dca32e

View File

@ -147,23 +147,19 @@ B grOrd_c2(B t, B w, B x) { // assumes valid arguments
} }
B asrt_c1(B t, B x) { B asrt_c1(B t, B x) {
if (isI32(x) && 1==(i32)x.u) return x; if (isF64(x) && o2fu(x)==1) return x;
if (isF64(x) && 1==x.f) return x; if (isF64(x)) thrM("Assertion error");
dec(x); thr(x);
thrM("Assertion error");
} }
B asrt_c2(B t, B w, B x) { B asrt_c2(B t, B w, B x) {
if (isI32(x) && 1==(u32)x.u) { dec(w); return x; } if (isF64(x) && o2fu(x)==1) { dec(w); return x; }
if (isF64(x) && 1==x.f) { dec(w); return x; }
dec(x); dec(x);
thr(w); thr(w);
} }
B casrt_c1(B t, B x) { B casrt_c1(B t, B x) {
if (isI32(x) && 1==(i32)x.u) return x; if (isF64(x) && o2fu(x)==1) return x;
if (isF64(x) && 1==x.f) return x;
unwindCompiler(); unwindCompiler();
dec(x); thr(x);
thrM("Compilation error");
} }
B casrt_c2(B t, B w, B x) { B casrt_c2(B t, B w, B x) {
if (isI32(x) && 1==(u32)x.u) { dec(w); return x; } if (isI32(x) && 1==(u32)x.u) { dec(w); return x; }