Skip to content
Myr

Increment nlocals when compiling STORE_GLOBAL ops (#2000)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

These are stored in vars, so we need to make sure that nlocals is large enough to account for that

authored by William Langford · committed by GitHub · parent 3ec66c8 · Browse files · 1 file+1 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:src/compile.c+1 added
1346 unmodified lines
1347 constant_pool = jv_array_append(constant_pool, jv_copy(curr->imm.constant));1348 code[pos++] = nesting_level(bc, curr->bound_by);1349 uint16_t var = (uint16_t)curr->bound_by->imm.intval;1350 code[pos++] = var;1351 if (var > maxvar) maxvar = var;1352 } else if (op->flags & OP_HAS_CONSTANT) {1353 code[pos++] = jv_array_length(jv_copy(constant_pool));1354 constant_pool = jv_array_append(constant_pool, jv_copy(curr->imm.constant));1355 } else if (op->flags & OP_HAS_VARIABLE) {
50 unmodified lines