mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 14:49:18 +02:00
simplifying sexp_check_exception in vm
This commit is contained in:
parent
4bd9c0a3a7
commit
ec8b976564
1 changed files with 3 additions and 3 deletions
6
vm.c
6
vm.c
|
@ -486,8 +486,6 @@ static sexp_uint_t sexp_restore_stack (sexp saved, sexp *current) {
|
|||
|
||||
#define sexp_check_exception() \
|
||||
do {if (sexp_exceptionp(_ARG1)) { \
|
||||
if (! sexp_exception_procedure(_ARG1)) \
|
||||
sexp_exception_procedure(_ARG1) = self; \
|
||||
goto call_error_handler;}} \
|
||||
while (0)
|
||||
|
||||
|
@ -550,8 +548,10 @@ sexp sexp_vm (sexp ctx, sexp proc) {
|
|||
switch (*ip++) {
|
||||
case SEXP_OP_NOOP:
|
||||
break;
|
||||
case SEXP_OP_RAISE:
|
||||
call_error_handler:
|
||||
if (! sexp_exception_procedure(_ARG1))
|
||||
sexp_exception_procedure(_ARG1) = self;
|
||||
case SEXP_OP_RAISE:
|
||||
tmp1 = sexp_cdr(sexp_global(ctx, SEXP_G_ERR_HANDLER));
|
||||
sexp_context_last_fp(ctx) = fp;
|
||||
if (! sexp_procedurep(tmp1)) goto end_loop;
|
||||
|
|
Loading…
Add table
Reference in a new issue