From f5077a699dea8f9bf833f6275b4cf4b363233c1a Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 2 Jul 2002 19:04:25 +0000 Subject: [PATCH] Eliminate references to `History'. --- v7/src/microcode/bchmmg.c | 6 +++--- v7/src/microcode/bchpur.c | 11 ++++++----- v7/src/microcode/fasload.c | 4 ++-- v7/src/microcode/history.h | 32 +++++++++++++++++++------------- v7/src/microcode/hooks.c | 22 ++++++++++++---------- v7/src/microcode/interp.h | 3 +-- v7/src/microcode/memmag.c | 11 +++++------ v7/src/microcode/nttrap.c | 4 ++-- v7/src/microcode/os2xcpt.c | 4 ++-- v7/src/microcode/purify.c | 8 ++++---- v7/src/microcode/stack.h | 7 ++++--- v7/src/microcode/utils.c | 6 +++--- v7/src/microcode/uxtrap.c | 4 ++-- 13 files changed, 65 insertions(+), 57 deletions(-) diff --git a/v7/src/microcode/bchmmg.c b/v7/src/microcode/bchmmg.c index f8259e128..6b0d98524 100644 --- a/v7/src/microcode/bchmmg.c +++ b/v7/src/microcode/bchmmg.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: bchmmg.c,v 9.99 2002/07/02 18:37:33 cph Exp $ +$Id: bchmmg.c,v 9.100 2002/07/02 19:03:15 cph Exp $ Copyright (c) 1987-2000, 2002 Massachusetts Institute of Technology @@ -3227,7 +3227,7 @@ DEFUN (GC_relocate_root, (free_buffer_ptr), SCHEME_OBJECT ** free_buffer_ptr) Set_Fixed_Obj_Slot (Lost_Objects_Base, SHARP_F); *free_buffer++ = Fixed_Objects; - *free_buffer++ = (MAKE_POINTER_OBJECT (UNMARKED_HISTORY_TYPE, History)); + *free_buffer++ = (MAKE_POINTER_OBJECT (UNMARKED_HISTORY_TYPE, history_register)); *free_buffer++ = (Get_Current_Stacklet ()); *free_buffer++ = ((Prev_Restore_History_Stacklet == NULL) ? SHARP_F : @@ -3254,7 +3254,7 @@ DEFUN (GC_end_root_relocation, (root, root2), Set_Fixed_Obj_Slot (Lost_Objects_Base, (LONG_TO_UNSIGNED_FIXNUM (ADDRESS_TO_DATUM (root2)))); - History = (OBJECT_ADDRESS (*root++)); + history_register = (OBJECT_ADDRESS (*root++)); Set_Current_Stacklet (* root); root += 1; if ((* root) != SHARP_F) diff --git a/v7/src/microcode/bchpur.c b/v7/src/microcode/bchpur.c index a02f3d145..a82dba472 100644 --- a/v7/src/microcode/bchpur.c +++ b/v7/src/microcode/bchpur.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: bchpur.c,v 9.70 2000/12/05 21:34:56 cph Exp $ +$Id: bchpur.c,v 9.71 2002/07/02 19:03:20 cph Exp $ -Copyright (c) 1987-2000 Massachusetts Institute of Technology +Copyright (c) 1987-2000, 2002 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +USA. */ /* @@ -50,8 +51,8 @@ static SCHEME_OBJECT * EXFUN (purify_header_overflow, (SCHEME_OBJECT *)); broken hearts which now point into pure space. This primitive does not return normally. It always escapes into - the interpreter because some of its cached registers (eg. History) - have changed. */ + the interpreter because some of its cached registers (e.g. + history_register) have changed. */ DEFINE_PRIMITIVE ("PRIMITIVE-PURIFY", Prim_primitive_purify, 3, 3, 0) { diff --git a/v7/src/microcode/fasload.c b/v7/src/microcode/fasload.c index da19c24c0..a3ebae742 100644 --- a/v7/src/microcode/fasload.c +++ b/v7/src/microcode/fasload.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: fasload.c,v 9.92 2002/07/02 18:38:16 cph Exp $ +$Id: fasload.c,v 9.93 2002/07/02 19:03:26 cph Exp $ Copyright (c) 1987-2002 Massachusetts Institute of Technology @@ -1063,7 +1063,7 @@ DEFINE_PRIMITIVE ("LOAD-BAND", Prim_band_load, 1, 1, 0) /* Clear various interpreter state parameters. */ Trapping = false; Return_Hook_Address = 0; - History = (Make_Dummy_History ()); + history_register = (Make_Dummy_History ()); Prev_Restore_History_Stacklet = 0; Prev_Restore_History_Offset = 0; COMPILER_TRANSPORT_END (); diff --git a/v7/src/microcode/history.h b/v7/src/microcode/history.h index 015fac85d..655915940 100644 --- a/v7/src/microcode/history.h +++ b/v7/src/microcode/history.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: history.h,v 9.29 1999/01/02 06:11:34 cph Exp $ +$Id: history.h,v 9.30 2002/07/02 19:03:32 cph Exp $ -Copyright (c) 1987, 1988, 1989, 1990, 1999 Massachusetts Institute of Technology +Copyright (c) 1987-1990, 1999, 2002 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +USA. */ /* History maintenance data structures and support. */ @@ -63,10 +64,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (TC_CONTROL_POINT, Prev_Restore_History_Stacklet))); \ STACK_PUSH (LONG_TO_UNSIGNED_FIXNUM (Prev_Restore_History_Offset)); \ Store_Expression \ - (MAKE_POINTER_OBJECT (UNMARKED_HISTORY_TYPE, History)); \ + (MAKE_POINTER_OBJECT (UNMARKED_HISTORY_TYPE, history_register)); \ Store_Return (Return_Code); \ Save_Cont (); \ - History = (OBJECT_ADDRESS (Get_Fixed_Obj_Slot (Dummy_History))); \ + history_register \ + = (OBJECT_ADDRESS (Get_Fixed_Obj_Slot (Dummy_History))); \ } /* History manipulation in the interpreter. */ @@ -75,10 +77,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #define New_Subproblem(expression, environment) \ { \ - History = (OBJECT_ADDRESS (History [HIST_NEXT_SUBPROBLEM])); \ - HISTORY_MARK (History [HIST_MARK]); \ + history_register \ + = (OBJECT_ADDRESS (history_register [HIST_NEXT_SUBPROBLEM])); \ + HISTORY_MARK (history_register [HIST_MARK]); \ { \ - fast SCHEME_OBJECT * Rib = (OBJECT_ADDRESS (History [HIST_RIB])); \ + SCHEME_OBJECT * Rib \ + = (OBJECT_ADDRESS (history_register [HIST_RIB])); \ HISTORY_MARK (Rib [RIB_MARK]); \ (Rib [RIB_ENV]) = (environment); \ (Rib [RIB_EXP]) = (expression); \ @@ -87,7 +91,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #define Reuse_Subproblem(expression, environment) \ { \ - fast SCHEME_OBJECT * Rib = (OBJECT_ADDRESS (History [HIST_RIB])); \ + SCHEME_OBJECT * Rib = (OBJECT_ADDRESS (history_register [HIST_RIB])); \ HISTORY_MARK (Rib [RIB_MARK]); \ (Rib [RIB_ENV]) = (environment); \ (Rib [RIB_EXP]) = (expression); \ @@ -97,8 +101,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. { \ fast SCHEME_OBJECT * Rib = \ (OBJECT_ADDRESS \ - (FAST_MEMORY_REF ((History [HIST_RIB]), RIB_NEXT_REDUCTION))); \ - (History [HIST_RIB]) = \ + (FAST_MEMORY_REF ((history_register [HIST_RIB]), \ + RIB_NEXT_REDUCTION))); \ + (history_register [HIST_RIB]) = \ (MAKE_POINTER_OBJECT (UNMARKED_HISTORY_TYPE, Rib)); \ (Rib [RIB_ENV]) = (environment); \ (Rib [RIB_EXP]) = (expression); \ @@ -107,8 +112,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #define End_Subproblem() \ { \ - HISTORY_UNMARK (History [HIST_MARK]); \ - History = (OBJECT_ADDRESS (History [HIST_PREV_SUBPROBLEM])); \ + HISTORY_UNMARK (history_register [HIST_MARK]); \ + history_register \ + = (OBJECT_ADDRESS (history_register [HIST_PREV_SUBPROBLEM])); \ } #else /* DISABLE_HISTORY */ diff --git a/v7/src/microcode/hooks.c b/v7/src/microcode/hooks.c index 0015bf200..840c0eae8 100644 --- a/v7/src/microcode/hooks.c +++ b/v7/src/microcode/hooks.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: hooks.c,v 9.61 2002/07/02 18:38:22 cph Exp $ +$Id: hooks.c,v 9.62 2002/07/02 19:03:38 cph Exp $ Copyright (c) 1988-2002 Massachusetts Institute of Technology @@ -236,7 +236,8 @@ DEFUN (CWCC, (return_code, reuse_flag, receiver), if ((ret_code == RC_RESTORE_HISTORY) || (ret_code == return_code)) { - History = (OBJECT_ADDRESS (Get_Fixed_Obj_Slot (Dummy_History))); + history_register + = (OBJECT_ADDRESS (Get_Fixed_Obj_Slot (Dummy_History))); STACK_RESET (); /* Will_Push(3); */ STACK_PUSH (control_point); @@ -859,7 +860,7 @@ SCHEME_OBJECT initialize_history () { /* Dummy History Structure */ - History = (Make_Dummy_History ()); + history_register = (Make_Dummy_History ()); return (MAKE_POINTER_OBJECT (UNMARKED_HISTORY_TYPE, (Make_Dummy_History ()))); } @@ -871,11 +872,11 @@ Set the interpreter's history object to HISTORY.") PRIMITIVE_HEADER (1); PRIMITIVE_CANONICALIZE_CONTEXT (); CHECK_ARG (1, HUNK3_P); - Val = (*History); + Val = (*history_register); #ifndef DISABLE_HISTORY - History = (OBJECT_ADDRESS (ARG_REF (1))); + history_register = (OBJECT_ADDRESS (ARG_REF (1))); #else - History = (OBJECT_ADDRESS (Get_Fixed_Obj_Slot (Dummy_History))); + history_register = (OBJECT_ADDRESS (Get_Fixed_Obj_Slot (Dummy_History))); #endif POP_PRIMITIVE_FRAME (1); PRIMITIVE_ABORT (PRIM_POP_RETURN); @@ -891,7 +892,7 @@ DEFINE_PRIMITIVE ("WITH-HISTORY-DISABLED", Prim_with_history_disabled, 1, 1, { SCHEME_OBJECT thunk = (ARG_REF (1)); /* Remove one reduction from the history before saving it */ - SCHEME_OBJECT * first_rib = (OBJECT_ADDRESS (History [HIST_RIB])); + SCHEME_OBJECT * first_rib = (OBJECT_ADDRESS (history_register [HIST_RIB])); SCHEME_OBJECT * second_rib = (OBJECT_ADDRESS (first_rib [RIB_NEXT_REDUCTION])); if ((first_rib != second_rib) && @@ -908,9 +909,10 @@ DEFINE_PRIMITIVE ("WITH-HISTORY-DISABLED", Prim_with_history_disabled, 1, 1, break; rib = next_rib; } - /* This maintains the mark in (History [HIST_RIB]). */ - (History [HIST_RIB]) = - (MAKE_POINTER_OBJECT ((OBJECT_TYPE (History [HIST_RIB])), rib)); + /* This maintains the mark in (history_register [HIST_RIB]). */ + (history_register [HIST_RIB]) = + (MAKE_POINTER_OBJECT ((OBJECT_TYPE (history_register [HIST_RIB])), + rib)); } } POP_PRIMITIVE_FRAME (1); diff --git a/v7/src/microcode/interp.h b/v7/src/microcode/interp.h index 4872334f3..e715d9642 100644 --- a/v7/src/microcode/interp.h +++ b/v7/src/microcode/interp.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: interp.h,v 9.44 2002/07/02 18:38:28 cph Exp $ +$Id: interp.h,v 9.45 2002/07/02 19:03:44 cph Exp $ Copyright (c) 1987-1999, 2002 Massachusetts Institute of Technology @@ -26,7 +26,6 @@ extern void EXFUN (abort_to_interpreter, (int argument)); extern int EXFUN (abort_to_interpreter_argument, (void)); #define Regs Registers -#define History history_register #define Env (Registers[REGBLOCK_ENV]) #define Val (Registers[REGBLOCK_VAL]) diff --git a/v7/src/microcode/memmag.c b/v7/src/microcode/memmag.c index 3b7e29143..520016215 100644 --- a/v7/src/microcode/memmag.c +++ b/v7/src/microcode/memmag.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: memmag.c,v 9.67 2002/07/02 18:38:39 cph Exp $ +$Id: memmag.c,v 9.68 2002/07/02 19:03:49 cph Exp $ Copyright (c) 1987-2000, 2002 Massachusetts Institute of Technology @@ -474,7 +474,7 @@ DEFUN_VOID (GC) Root = Free; *Free++ = Fixed_Objects; - *Free++ = (MAKE_POINTER_OBJECT (UNMARKED_HISTORY_TYPE, History)); + *Free++ = (MAKE_POINTER_OBJECT (UNMARKED_HISTORY_TYPE, history_register)); *Free++ = Get_Current_Stacklet (); *Free++ = ((Prev_Restore_History_Stacklet == NULL) @@ -572,7 +572,7 @@ DEFUN_VOID (GC) Set_Fixed_Obj_Slot (Lost_Objects_Base, (LONG_TO_UNSIGNED_FIXNUM (ADDRESS_TO_DATUM (Root2)))); - History = (OBJECT_ADDRESS (*Root++)); + history_register = (OBJECT_ADDRESS (*Root++)); Set_Current_Stacklet (*Root); Root += 1; @@ -612,9 +612,8 @@ DEFUN_VOID (GC) the GC daemon if there is one. This primitive never returns normally. It always escapes into - the interpreter because some of its cached registers (eg. History) - have changed. -*/ + the interpreter because some of its cached registers (e.g. + history_register) have changed. */ DEFINE_PRIMITIVE ("GARBAGE-COLLECT", Prim_garbage_collect, 1, 1, 0) { diff --git a/v7/src/microcode/nttrap.c b/v7/src/microcode/nttrap.c index 558270bc1..a4321461b 100644 --- a/v7/src/microcode/nttrap.c +++ b/v7/src/microcode/nttrap.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: nttrap.c,v 1.20 2002/07/02 18:38:46 cph Exp $ +$Id: nttrap.c,v 1.21 2002/07/02 19:03:55 cph Exp $ Copyright (c) 1992-2002 Massachusetts Institute of Technology @@ -526,7 +526,7 @@ DEFUN (setup_trap_frame, (code, context, trinfo, new_stack_pointer), && (trinfo->state == STATE_COMPILED_CODE)) Stop_History (); - History = (Make_Dummy_History ()); + history_register = (Make_Dummy_History ()); Will_Push (STACK_ENV_EXTRA_SLOTS + 2); STACK_PUSH (trap_name); STACK_PUSH (handler); diff --git a/v7/src/microcode/os2xcpt.c b/v7/src/microcode/os2xcpt.c index 16ddcaa7b..eab7ff4e8 100644 --- a/v7/src/microcode/os2xcpt.c +++ b/v7/src/microcode/os2xcpt.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: os2xcpt.c,v 1.10 2002/07/02 18:38:52 cph Exp $ +$Id: os2xcpt.c,v 1.11 2002/07/02 19:04:01 cph Exp $ Copyright (c) 1994-2002 Massachusetts Institute of Technology @@ -787,7 +787,7 @@ setup_trap_frame (PEXCEPTIONREPORTRECORD report, /* Make sure the history register is properly initialized. */ if ((new_sp != 0) && ((trinfo -> state) == STATE_COMPILED_CODE)) Stop_History (); - History = (Make_Dummy_History ()); + history_register = (Make_Dummy_History ()); /* Push the call frame for the trap handler. */ Will_Push (STACK_ENV_EXTRA_SLOTS + 2); diff --git a/v7/src/microcode/purify.c b/v7/src/microcode/purify.c index b64533254..f927fa21b 100644 --- a/v7/src/microcode/purify.c +++ b/v7/src/microcode/purify.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: purify.c,v 9.61 2001/12/16 06:01:33 cph Exp $ +$Id: purify.c,v 9.62 2002/07/02 19:04:07 cph Exp $ -Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology +Copyright (c) 1988-1999, 2001, 2002 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -482,8 +482,8 @@ purification_failure: everyone else halted. This primitive always "returns" by escaping to the interpreter - because some of its cached registers (eg. History) have changed. -*/ + because some of its cached registers (e.g. history_register) have + changed. */ DEFINE_PRIMITIVE ("PRIMITIVE-PURIFY", Prim_primitive_purify, 3, 3, 0) { diff --git a/v7/src/microcode/stack.h b/v7/src/microcode/stack.h index 91428c0b3..17b085e9b 100644 --- a/v7/src/microcode/stack.h +++ b/v7/src/microcode/stack.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: stack.h,v 9.40 2002/07/02 18:39:04 cph Exp $ +$Id: stack.h,v 9.41 2002/07/02 19:04:13 cph Exp $ Copyright (c) 1987-1999, 2002 Massachusetts Institute of Technology @@ -344,9 +344,10 @@ Pushed() Prev_Restore_History_Offset = 0; \ if ((!Valid_Fixed_Obj_Vector ()) || \ (Get_Fixed_Obj_Slot (Dummy_History) == SHARP_F)) \ - History = Make_Dummy_History (); \ + history_register = Make_Dummy_History (); \ else \ - History = OBJECT_ADDRESS (Get_Fixed_Obj_Slot (Dummy_History)); \ + history_register \ + = OBJECT_ADDRESS (Get_Fixed_Obj_Slot (Dummy_History)); \ } \ else if (Prev_Restore_History_Stacklet == \ OBJECT_ADDRESS (Control_Point)) \ diff --git a/v7/src/microcode/utils.c b/v7/src/microcode/utils.c index fbf0c4283..5975900fc 100644 --- a/v7/src/microcode/utils.c +++ b/v7/src/microcode/utils.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: utils.c,v 9.80 2002/07/02 18:39:20 cph Exp $ +$Id: utils.c,v 9.81 2002/07/02 19:04:19 cph Exp $ Copyright (c) 1987-2002 Massachusetts Institute of Technology @@ -815,8 +815,8 @@ DEFUN (Restore_History, (hist_obj), SCHEME_OBJECT hist_obj) } else { - History = (OBJECT_ADDRESS (new_hist)); - return (true); + history_register = (OBJECT_ADDRESS (new_hist)); + return (1); } } diff --git a/v7/src/microcode/uxtrap.c b/v7/src/microcode/uxtrap.c index 5b225ad0d..f824a84ca 100644 --- a/v7/src/microcode/uxtrap.c +++ b/v7/src/microcode/uxtrap.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: uxtrap.c,v 1.32 2002/07/02 18:39:27 cph Exp $ +$Id: uxtrap.c,v 1.33 2002/07/02 19:04:25 cph Exp $ Copyright (c) 1990-2002 Massachusetts Institute of Technology @@ -339,7 +339,7 @@ DEFUN (setup_trap_frame, (signo, info, scp, trinfo, new_stack_pointer), { Stop_History (); } - History = (Make_Dummy_History ()); + history_register = (Make_Dummy_History ()); Will_Push (STACK_ENV_EXTRA_SLOTS + 2); STACK_PUSH (signal_name); STACK_PUSH (handler); -- 2.25.1