From: Guillermo J. Rozas Date: Fri, 25 Jun 1993 20:57:07 +0000 (+0000) Subject: Reorder some stuff so that when a boot-time error fails because of an X-Git-Tag: 20090517-FFI~8277 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=5e6c6b3ea2b626d33fee574ecf7d7722de736987;p=mit-scheme.git Reorder some stuff so that when a boot-time error fails because of an unbound variable, the stack trace prints the name of the variable. --- diff --git a/v7/src/microcode/utils.c b/v7/src/microcode/utils.c index a9e01bbd0..e74a55551 100644 --- a/v7/src/microcode/utils.c +++ b/v7/src/microcode/utils.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: utils.c,v 9.57 1993/06/24 06:32:28 gjr Exp $ +$Id: utils.c,v 9.58 1993/06/25 20:57:07 gjr Exp $ Copyright (c) 1987-1993 Massachusetts Institute of Technology @@ -481,6 +481,34 @@ DEFUN (Do_Micro_Error, (Err, From_Pop_Return), } #endif +/* Do_Micro_Error continues on the next page. */ + +/* Do_Micro_Error, continued */ + + /* This can NOT be folded into the Will_Push below since we cannot + afford to have the Will_Push put down its own continuation. + There is guaranteed to be enough space for this one + continuation; in fact, the Will_Push here is really unneeded! + */ + + if (From_Pop_Return) + { + Will_Push (CONTINUATION_SIZE); + Save_Cont (); + Pushed (); + } + + Will_Push (CONTINUATION_SIZE + (From_Pop_Return ? 0 : 1)); + if (From_Pop_Return) + Store_Expression (Val); + else + STACK_PUSH (Fetch_Env ()); + Store_Return ((From_Pop_Return) ? + RC_POP_RETURN_ERROR : + RC_EVAL_ERROR); + Save_Cont (); + Pushed (); + /* Do_Micro_Error continues on the next page. */ /* Do_Micro_Error, continued */ @@ -508,37 +536,7 @@ DEFUN (Do_Micro_Error, (Err, From_Pop_Return), Handler = (VECTOR_REF (Error_Vector, ERR_BAD_ERROR_CODE)); } else - { Handler = (VECTOR_REF (Error_Vector, Err)); - } - - /* This can NOT be folded into the Will_Push below since we cannot - afford to have the Will_Push put down its own continuation. - There is guaranteed to be enough space for this one - continuation; in fact, the Will_Push here is really unneeded! - */ - - if (From_Pop_Return) - { - Will_Push(CONTINUATION_SIZE); - Save_Cont(); - Pushed(); - } - - Will_Push (CONTINUATION_SIZE + (From_Pop_Return ? 0 : 1)); - if (From_Pop_Return) - { - Store_Expression(Val); - } - else - { - STACK_PUSH (Fetch_Env()); - } - Store_Return((From_Pop_Return) ? - RC_POP_RETURN_ERROR : - RC_EVAL_ERROR); - Save_Cont(); - Pushed (); /* Return from error handler will re-enable interrupts & restore history */ Stop_History();