1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-20 17:24:48 +00:00

Update symbolmapping code with marshal/unmarshal.

This commit is contained in:
Calvin Rose
2023-02-03 17:24:06 -06:00
parent 7344a6cfc0
commit 3e82fdc125
6 changed files with 73 additions and 48 deletions

View File

@@ -334,7 +334,7 @@ static Janet doframe(JanetStackFrame *frame) {
JanetTable *local_bindings = janet_table(0);
for (int32_t i = def->symbolmap_length - 1; i >= 0; i--) {
JanetSymbolMap jsm = def->symbolmap[i];
uint32_t pc = (uint32_t) (frame->pc - def->bytecode);
uint32_t pc = (uint32_t)(frame->pc - def->bytecode);
if (pc >= jsm.birth_pc && pc < jsm.death_pc) {
janet_table_put(local_bindings, janet_wrap_symbol(jsm.symbol), stack[jsm.slot_index]);
}