Updating resume/cc needs to jump to the start of the procedure

bytecode plus the offset on the stack (not directly to the offset
on the stack).  Need to add a call/cc test to the r5rs-tests to
catch this next time.
This commit is contained in:
Alex Shinn 2009-06-23 11:46:56 +09:00
parent eb629f4381
commit 956b451cdd

2
eval.c
View file

@ -1262,7 +1262,7 @@ sexp sexp_vm (sexp ctx, sexp proc) {
self = _ARG2; self = _ARG2;
bc = sexp_procedure_code(self); bc = sexp_procedure_code(self);
cp = sexp_procedure_vars(self); cp = sexp_procedure_vars(self);
ip = (unsigned char*) sexp_unbox_integer(_ARG3); ip = sexp_bytecode_data(bc) + sexp_unbox_integer(_ARG3);
i = sexp_unbox_integer(_ARG4); i = sexp_unbox_integer(_ARG4);
top -= 4; top -= 4;
_ARG1 = tmp1; _ARG1 = tmp1;