pike.git/
src/
docode.c
Branch:
Tag:
Non-build tags
All tags
No tags
2016-11-04
2016-11-04 14:10:19 by Martin Karlgren <marty@roxen.com>
eb29d941bff7ed252bef1847f5769f56c5415288 (
13
lines) (+
7
/-
6
)
[
Show
|
Annotate
]
Branch:
marty/lambdaopt
lambda closure optimization: Fix a bunch of int types, struct alignment.
2791:
static void emit_save_locals(struct compiler_frame *f) { struct compilation *c = THIS_COMPILATION;
-
INT16 offset;
-
INT16 idx;
-
INT16
num_locals = f->max_number_of_locals;
+
unsigned
INT16 offset;
+
unsigned
INT16 idx;
+
int
num_locals = f->max_number_of_locals;
for (offset = 0; offset < (num_locals >> 4) + 1; offset++) {
-
INT16
bitmask = 0;
+
unsigned
int
bitmask = 0;
for (idx = 0; idx < 16; idx++) {
-
INT16
local_var_idx = offset * 16 + idx;
+
int
local_var_idx = offset * 16 + idx;
if (local_var_idx >= num_locals) { break; }
2807:
} } if (bitmask) {
-
emit1(F_SAVE_LOCALS, (offset << 16)
+
bitmask);
+
emit1(F_SAVE_LOCALS, (offset << 16)
|
bitmask);
} } }