From ec8b97656470f5b5a62e4eb9bd5d2f995e417342 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sun, 15 Aug 2010 17:28:21 +0900 Subject: [PATCH] simplifying sexp_check_exception in vm --- vm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vm.c b/vm.c index 94ef207f..afd18f7f 100644 --- a/vm.c +++ b/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;