more fixing of warnings
This commit is contained in:
parent
0bcf3b592f
commit
d4d4521e52
@ -47,7 +47,7 @@ static i64 isum(B x) { // doesn't consume; may error; TODO error on overflow
|
||||
for (usz i = 0; i < xia; i++) r+= p[i];
|
||||
} else if (xe==el_f64) {
|
||||
f64* p = f64any_ptr(x);
|
||||
for (usz i = 0; i < xia; i++) { if(p[i]!=(f64)p[i]) thrM("Expected integer"); r+= p[i]; }
|
||||
for (usz i = 0; i < xia; i++) { if(p[i]!=(i64)p[i]) thrM("Expected integer"); r+= p[i]; }
|
||||
} else {
|
||||
BS2B xgetU = TI(x,getU);
|
||||
for (usz i = 0; i < xia; i++) r+= o2i64(xgetU(x,i));
|
||||
|
||||
@ -118,8 +118,6 @@ char* format_pm2(u8 u);
|
||||
bool isPureFn(B x); // doesn't consume
|
||||
B bqn_merge(B x); // consumes
|
||||
B bqn_squeeze(B x); // consumes
|
||||
B rtUnder_c1(B f, B g, B x);
|
||||
B rtUnder_cw(B f, B g, B w, B x);
|
||||
B def_getU(B x, usz n);
|
||||
B def_fn_uc1(B t, B o, B x);
|
||||
B def_fn_ucw(B t, B o, B w, B x);
|
||||
|
||||
@ -134,7 +134,7 @@ static B mut_getU(Mut* m, usz ms) {
|
||||
switch(m->type) { default: UD;
|
||||
case el_i32: return m_i32(m->ai32[ms]);
|
||||
case el_c32: return m_c32(m->ac32[ms]);
|
||||
case el_f64: return m_c32(m->af64[ms]);
|
||||
case el_f64: return m_f64(m->af64[ms]);
|
||||
case el_B: return m->aB[ms];
|
||||
}
|
||||
}
|
||||
|
||||
4
src/vm.h
4
src/vm.h
@ -204,6 +204,6 @@ static inline void v_setI(Scope* sc, u32 p, B x, bool upd) { // consumes x
|
||||
sc->vars[p] = x;
|
||||
}
|
||||
static inline void v_set(Scope* pscs[], B s, B x, bool upd) { // doesn't consume
|
||||
if (RARE(!isVar(s))) return v_setR(pscs, s, x, upd);
|
||||
v_setI(pscs[(u16)(s.u>>32)], (u32)s.u, inc(x), upd);
|
||||
if (RARE(!isVar(s))) v_setR(pscs, s, x, upd);
|
||||
else v_setI(pscs[(u16)(s.u>>32)], (u32)s.u, inc(x), upd);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user