From bcf28080666110d736763aa4ad083a0f129e986e Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 5 Nov 1999 21:30:08 +0000 Subject: [PATCH] (struct catchtag): Add member byte_stack. (internal_catch, Fcondition_case, internal_condition_case) (internal_condition_case_1: Save value of byte_stack_list in catchtag. (unwind_to_catch): Restore byte_stack_list from catchtag. --- src/ChangeLog | 20 ++++++++++++++++++++ src/eval.c | 6 ++++++ 2 files changed, 26 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 55a100fbfb6..23c10cc4205 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,25 @@ 1999-11-05 Gerd Moellmann + * alloc.c (Fgarbage_collect): Call mark_byte_stack and + relocate_byte_pcs. + (init_alloc_once, init_alloc): Set byte_stack_list to null. + + * eval.c (struct catchtag): Add member byte_stack. + (internal_catch, Fcondition_case, internal_condition_case) + (internal_condition_case_1: Save value of byte_stack_list in + catchtag. + (unwind_to_catch): Restore byte_stack_list from catchtag. + + * lisp.h: Add prototypes for new functions in bytecode.c. + Add extern declaration for byte_stack_list. + + * bytecode.c (struct byte_stack): New. + (byte_stack_list, mark_byte_stack, relocate_byte_pcs): New + (BEFORE_POTENTIAL_GC, AFTER_POTENTIAL_GC): New. + (FETCH, PUSH, POP, DISCARD, TOP, MAYBE_GC): Rewritten. + (HANDLE_RELOCATION): Removed. + (Fbyte_code): Use byte_stack structures. + * filelock.c (Ffile_locked_p): Make FILENAME a required argument. * buffer.c (syms_of_buffer): Extend documentation of diff --git a/src/eval.c b/src/eval.c index 1f067963d15..f911433e712 100644 --- a/src/eval.c +++ b/src/eval.c @@ -81,6 +81,7 @@ struct catchtag int lisp_eval_depth; int pdlcount; int poll_suppress_count; + struct byte_stack *byte_stack; }; struct catchtag *catchlist; @@ -922,6 +923,7 @@ internal_catch (tag, func, arg) c.pdlcount = specpdl_ptr - specpdl; c.poll_suppress_count = poll_suppress_count; c.gcpro = gcprolist; + c.byte_stack = byte_stack_list; catchlist = &c; /* Call FUNC. */ @@ -974,6 +976,7 @@ unwind_to_catch (catch, value) } while (! last_time); + byte_stack_list = catch->byte_stack; gcprolist = catch->gcpro; #ifdef DEBUG_GCPRO if (gcprolist != 0) @@ -1085,6 +1088,7 @@ See also the function `signal' for more info.") c.pdlcount = specpdl_ptr - specpdl; c.poll_suppress_count = poll_suppress_count; c.gcpro = gcprolist; + c.byte_stack = byte_stack_list; if (_setjmp (c.jmp)) { if (!NILP (h.var)) @@ -1145,6 +1149,7 @@ internal_condition_case (bfun, handlers, hfun) c.pdlcount = specpdl_ptr - specpdl; c.poll_suppress_count = poll_suppress_count; c.gcpro = gcprolist; + c.byte_stack = byte_stack_list; if (_setjmp (c.jmp)) { return (*hfun) (c.val); @@ -1184,6 +1189,7 @@ internal_condition_case_1 (bfun, arg, handlers, hfun) c.pdlcount = specpdl_ptr - specpdl; c.poll_suppress_count = poll_suppress_count; c.gcpro = gcprolist; + c.byte_stack = byte_stack_list; if (_setjmp (c.jmp)) { return (*hfun) (c.val); -- 2.39.5