Commit a0b30fc0 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

OP_RETURN operand should be stack position of the new scope, not the current scope

parent d6337e48
......@@ -532,7 +532,7 @@ scope_body(codegen_scope *s, node *tree)
}
else {
codegen(scope, tree->cdr, VAL);
genop(scope, MKOP_AB(OP_RETURN, cursp(), OP_R_NORMAL));
genop(scope, MKOP_AB(OP_RETURN, scope->sp, OP_R_NORMAL));
}
scope_finish(scope, idx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment