pike.git/
src/
pike_types.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2020-10-17
2020-10-17 14:20:27 by Henrik Grubbström (Grubba) <grubba@grubba.org>
35791c4f225af9d5fdeb7eed73916fc467d5f82a (
24
lines) (+
19
/-
5
)
[
Show
|
Annotate
]
Branch:
master
Compiler
[Typechecker]
: Fixed low_type_binop() handling of int.
4937:
} if (bounds[i] < bound) { /* We need to insert a bound. */
-
i++;
+
memmove(bounds + i + 1, bounds + i, sizeof(bounds[i]) * (nbounds - i));
-
+
memmove(ab + i + 1,
+
ab + i, sizeof(ab[i]) * (nbounds - i));
+
i++;
nbounds++; bounds[i] = bound;
-
+
ab[i] |= 2;
} else if (bounds[i] == bound) { ab[i] |= 2; }
4954:
} if (bounds[i] < bound) { /* We need to insert a bound. */
-
i++;
+
memmove(bounds + i + 1, bounds + i, sizeof(bounds[i]) * (nbounds - i));
-
+
memmove(ab + i + 1,
+
ab + i, sizeof(ab[i]) * (nbounds - i));
+
i++;
nbounds++; bounds[i] = bound;
-
+
ab[i] &= ~2;
} else if (bounds[i] == bound) { ab[i] &= ~2; }
4970:
} if (bounds[i] < bound) { /* We need to insert a bound. */
-
i++;
+
memmove(bounds + i + 1, bounds + i, sizeof(bounds[i]) * (nbounds - i));
-
+
memmove(ab + i + 1,
+
ab + i, sizeof(ab[i]) * (nbounds - i));
+
i++;
nbounds++; bounds[i] = bound;
-
+
ab[i] |= 1;
} else if (bounds[i] == bound) { ab[i] |= 1; }
4987:
} if (bounds[i] < bound) { /* We need to insert a bound. */
-
i++;
+
memmove(bounds + i + 1, bounds + i, sizeof(bounds[i]) * (nbounds - i));
-
+
memmove(ab + i + 1,
+
ab + i, sizeof(ab[i]) * (nbounds - i));
+
i++;
nbounds++; bounds[i] = bound;
-
+
ab[i] &= ~1;
} else if (bounds[i] == bound) { ab[i] &= ~1; }
5001:
for (i = 0; i < nbounds;) { bound = MAX_INT32;
-
for (
i = 0
;
i < nbounds; i++) {
+
for (;i < nbounds; i++) {
if ((PT_BINOP_NOR >> ab[i]) & op) { /* Found start of range. */ bound = bounds[i];
-
+
break;
} } if (i == nbounds) break;