cleanup from clang's --analyze
This commit is contained in:
parent
d1a9669e76
commit
1822602c34
@ -420,13 +420,13 @@ B GRADE_CAT(c2)(B t, B w, B x) {
|
|||||||
if (isAtm(w) || RNK(w)==0) thrM(GRADE_CHR": 𝕨 must have rank≥1");
|
if (isAtm(w) || RNK(w)==0) thrM(GRADE_CHR": 𝕨 must have rank≥1");
|
||||||
if (isAtm(x)) x = m_unit(x);
|
if (isAtm(x)) x = m_unit(x);
|
||||||
ur wr = RNK(w);
|
ur wr = RNK(w);
|
||||||
ur xr = RNK(x);
|
|
||||||
|
|
||||||
if (wr > 1) {
|
if (wr > 1) {
|
||||||
|
ur xr = RNK(x);
|
||||||
if (wr > xr+1) thrM(GRADE_CHR": =𝕨 cannot be greater than =𝕩");
|
if (wr > xr+1) thrM(GRADE_CHR": =𝕨 cannot be greater than =𝕩");
|
||||||
i32 nxr = xr-wr+1;
|
i32 nxr = xr-wr+1;
|
||||||
x = toKCells(x, nxr); xr = nxr;
|
x = toKCells(x, nxr);
|
||||||
w = toCells(w); xr = 1;
|
w = toCells(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 we = TI(w,elType); usz wia = IA(w);
|
u8 we = TI(w,elType); usz wia = IA(w);
|
||||||
|
|||||||
@ -743,7 +743,7 @@ void hashmap_set(B* vars, B w, B x) {
|
|||||||
vars[2] = bi_N; // hashmap_resize might free then alloc
|
vars[2] = bi_N; // hashmap_resize might free then alloc
|
||||||
map = hashmap_resize(map);
|
map = hashmap_resize(map);
|
||||||
vars[2] = tag(map, OBJ_TAG);
|
vars[2] = tag(map, OBJ_TAG);
|
||||||
hp=map->a; sh=map->sh;
|
// hp=map->a; sh=map->sh;
|
||||||
}
|
}
|
||||||
vars[0] = vec_addN(vars[0], w);
|
vars[0] = vec_addN(vars[0], w);
|
||||||
vars[1] = vec_addN(vars[1], x);
|
vars[1] = vec_addN(vars[1], x);
|
||||||
|
|||||||
@ -953,8 +953,7 @@ B select_ucw(B t, B o, B w, B x) {
|
|||||||
}
|
}
|
||||||
usz xr = RNK(x);
|
usz xr = RNK(x);
|
||||||
usz wr = RNK(w);
|
usz wr = RNK(w);
|
||||||
usz rr;
|
bool ok = isArr(rep) && xr+wr == RNK(rep)+1 && eqShPart(SH(w),SH(rep),wr) && eqShPart(SH(x)+1,SH(rep)+wr,xr-1);
|
||||||
bool ok = isArr(rep) && xr+wr==(rr=RNK(rep))+1 && eqShPart(SH(w),SH(rep),wr) && eqShPart(SH(x)+1,SH(rep)+wr,xr-1);
|
|
||||||
if (!ok) thrF("𝔽⌾(a⊸⊏)𝕩: 𝔽 must return an array with the same shape as its input (%H ≡ shape of a, %2H ≡ shape of ⊏𝕩, %H ≡ shape of result of 𝔽)", w, xr-1, SH(x)+1, rep);
|
if (!ok) thrF("𝔽⌾(a⊸⊏)𝕩: 𝔽 must return an array with the same shape as its input (%H ≡ shape of a, %2H ≡ shape of ⊏𝕩, %H ≡ shape of result of 𝔽)", w, xr-1, SH(x)+1, rep);
|
||||||
usz csz = arr_csz(x);
|
usz csz = arr_csz(x);
|
||||||
if (csz == 0) { decG(rep); decG(w); return x; }
|
if (csz == 0) { decG(rep); decG(w); return x; }
|
||||||
|
|||||||
2
src/vm.c
2
src/vm.c
@ -1609,7 +1609,7 @@ void profiler_displayResults(void) {
|
|||||||
printf("Got %zu samples\n", count);
|
printf("Got %zu samples\n", count);
|
||||||
if (profiler_mode==1) {
|
if (profiler_mode==1) {
|
||||||
B compList, mapList;
|
B compList, mapList;
|
||||||
u64 specialResults[ENT_SP_END];
|
u64 specialResults[ENT_SP_END] = {0};
|
||||||
usz compCount = profiler_getResults(&compList, &mapList, specialResults, true);
|
usz compCount = profiler_getResults(&compList, &mapList, specialResults, true);
|
||||||
|
|
||||||
if (specialResults[ENT_SP_GC] > 0) printf("GC: "N64d" samples\n", specialResults[ENT_SP_GC]);
|
if (specialResults[ENT_SP_GC] > 0) printf("GC: "N64d" samples\n", specialResults[ENT_SP_GC]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user