From bf75e965fa918c589e41386a850d8ce6f884c0bf Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 2 Jul 2002 20:52:10 +0000 Subject: [PATCH] Eliminate the following macros: Env Val Expression Return Fetch_Expression Fetch_Env Fetch_Return Store_Expression Store_Env --- v7/src/microcode/bchmmg.c | 4 +- v7/src/microcode/bchpur.c | 4 +- v7/src/microcode/bkpt.c | 4 +- v7/src/microcode/bkpt.h | 4 +- v7/src/microcode/boot.c | 12 +- v7/src/microcode/cmpauxmd/c.c | 11 +- v7/src/microcode/cmpint.c | 96 ++++---- v7/src/microcode/cmpint.h | 14 +- v7/src/microcode/cmpintmd/hppa.h | 13 +- v7/src/microcode/debug.c | 4 +- v7/src/microcode/dmpwrld.c | 11 +- v7/src/microcode/fasload.c | 8 +- v7/src/microcode/fhooks.c | 9 +- v7/src/microcode/futures.h | 9 +- v7/src/microcode/history.h | 6 +- v7/src/microcode/hooks.c | 28 +-- v7/src/microcode/intercom.c | 11 +- v7/src/microcode/interp.c | 403 +++++++++++++++---------------- v7/src/microcode/interp.h | 31 +-- v7/src/microcode/liarc.h | 12 +- v7/src/microcode/memmag.c | 4 +- v7/src/microcode/nttrap.c | 4 +- v7/src/microcode/os2xcpt.c | 6 +- v7/src/microcode/prims.h | 9 +- v7/src/microcode/prmcon.c | 17 +- v7/src/microcode/purify.c | 4 +- v7/src/microcode/returns.h | 9 +- v7/src/microcode/stack.h | 12 +- v7/src/microcode/step.c | 8 +- v7/src/microcode/term.c | 19 +- v7/src/microcode/utils.c | 38 +-- v7/src/microcode/uxtrap.c | 6 +- 32 files changed, 402 insertions(+), 428 deletions(-) diff --git a/v7/src/microcode/bchmmg.c b/v7/src/microcode/bchmmg.c index 6b0d98524..81accab9d 100644 --- a/v7/src/microcode/bchmmg.c +++ b/v7/src/microcode/bchmmg.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: bchmmg.c,v 9.100 2002/07/02 19:03:15 cph Exp $ +$Id: bchmmg.c,v 9.101 2002/07/02 20:48:43 cph Exp $ Copyright (c) 1987-2000, 2002 Massachusetts Institute of Technology @@ -3396,7 +3396,7 @@ DEFINE_PRIMITIVE ("GARBAGE-COLLECT", Prim_garbage_collect, 1, 1, 0) Will_Push (CONTINUATION_SIZE); Store_Return (RC_NORMAL_GC_DONE); - Store_Expression (LONG_TO_UNSIGNED_FIXNUM (MemTop - Free)); + exp_register = (LONG_TO_UNSIGNED_FIXNUM (MemTop - Free)); Save_Cont (); Pushed (); diff --git a/v7/src/microcode/bchpur.c b/v7/src/microcode/bchpur.c index a82dba472..839168fa6 100644 --- a/v7/src/microcode/bchpur.c +++ b/v7/src/microcode/bchpur.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: bchpur.c,v 9.71 2002/07/02 19:03:20 cph Exp $ +$Id: bchpur.c,v 9.72 2002/07/02 20:48:48 cph Exp $ Copyright (c) 1987-2000, 2002 Massachusetts Institute of Technology @@ -79,7 +79,7 @@ DEFINE_PRIMITIVE ("PRIMITIVE-PURIFY", Prim_primitive_purify, 3, 3, 0) Will_Push (CONTINUATION_SIZE); Store_Return (RC_NORMAL_GC_DONE); - Store_Expression (result); + exp_register = result; Save_Cont (); Pushed (); diff --git a/v7/src/microcode/bkpt.c b/v7/src/microcode/bkpt.c index 894612ff0..10457be68 100644 --- a/v7/src/microcode/bkpt.c +++ b/v7/src/microcode/bkpt.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: bkpt.c,v 9.31 2002/07/02 18:37:39 cph Exp $ +$Id: bkpt.c,v 9.32 2002/07/02 20:48:54 cph Exp $ Copyright (c) 1987-1999, 2002 Massachusetts Institute of Technology @@ -68,7 +68,7 @@ DEFUN_VOID (Handle_Pop_Return_Break) SCHEME_OBJECT *Old_Stack = sp_register; printf ("Pop Return Break: SP = 0x%lx\n", ((long) sp_register)); - (void) (Print_One_Continuation_Frame (Return)); + (void) (Print_One_Continuation_Frame (ret_register)); sp_register = Old_Stack; return; } diff --git a/v7/src/microcode/bkpt.h b/v7/src/microcode/bkpt.h index c0221b4bc..6253cbb41 100644 --- a/v7/src/microcode/bkpt.h +++ b/v7/src/microcode/bkpt.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: bkpt.h,v 9.33 2002/07/02 18:15:02 cph Exp $ +$Id: bkpt.h,v 9.34 2002/07/02 20:48:59 cph Exp $ Copyright (c) 1987-1999, 2002 Massachusetts Institute of Technology @@ -38,7 +38,7 @@ typedef struct sp_record * sp_record_list; #define Eval_Ucode_Hook() \ { \ - (local_circle [local_slotno++]) = (Fetch_Expression ()); \ + (local_circle [local_slotno++]) = exp_register; \ if (local_slotno >= debug_maxslots) \ local_slotno = 0; \ if (local_nslots < debug_maxslots) \ diff --git a/v7/src/microcode/boot.c b/v7/src/microcode/boot.c index 72c8210fb..90718fe4b 100644 --- a/v7/src/microcode/boot.c +++ b/v7/src/microcode/boot.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: boot.c,v 9.106 2002/07/02 18:37:45 cph Exp $ +$Id: boot.c,v 9.107 2002/07/02 20:49:05 cph Exp $ Copyright (c) 1988-2002 Massachusetts Institute of Technology @@ -458,18 +458,18 @@ DEFUN (Start_Scheme, (Start_Prim, File_Name), /* Setup registers */ INITIALIZE_INTERRUPTS (); SET_INTERRUPT_MASK (0); - Env = THE_GLOBAL_ENV; + env_register = THE_GLOBAL_ENV; Trapping = false; Return_Hook_Address = NULL; /* Give the interpreter something to chew on, and ... */ Will_Push (CONTINUATION_SIZE); Store_Return (RC_END_OF_COMPUTATION); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Save_Cont (); Pushed (); - Store_Expression (expr); + exp_register = expr; /* Go to it! */ if ((sp_register <= Stack_Guard) || (Free > MemTop)) @@ -514,8 +514,8 @@ extern SCHEME_OBJECT EXFUN (Re_Enter_Interpreter, (void)); SCHEME_OBJECT DEFUN_VOID (Re_Enter_Interpreter) { - Interpret (true); - return Val; + Interpret (1); + return (val_register); } /* Garbage collection debugging utilities. */ diff --git a/v7/src/microcode/cmpauxmd/c.c b/v7/src/microcode/cmpauxmd/c.c index c76e8c917..092cbbbe9 100644 --- a/v7/src/microcode/cmpauxmd/c.c +++ b/v7/src/microcode/cmpauxmd/c.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: c.c,v 1.12 1999/01/02 06:11:34 cph Exp $ +$Id: c.c,v 1.13 2002/07/02 20:52:10 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-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. */ #include "liarc.h" @@ -141,7 +142,7 @@ SCHEME_OBJECT * DEFUN (unspecified_code, (entry, dispatch), SCHEME_OBJECT * entry AND unsigned long dispatch) { - Store_Expression ((SCHEME_OBJECT) entry); + exp_register = ((SCHEME_OBJECT) entry); C_return_value = (ERR_EXECUTE_MANIFEST_VECTOR); return (&dummy_entry); } @@ -501,7 +502,7 @@ DEFUN (C_to_interface, (in_entry), PTR in_entry) { if (entry != &dummy_entry) { - Store_Expression ((SCHEME_OBJECT) entry); + exp_register = ((SCHEME_OBJECT) entry); C_return_value = (ERR_EXECUTE_MANIFEST_VECTOR); } return; diff --git a/v7/src/microcode/cmpint.c b/v7/src/microcode/cmpint.c index f496cae93..e657f98a0 100644 --- a/v7/src/microcode/cmpint.c +++ b/v7/src/microcode/cmpint.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: cmpint.c,v 1.96 2002/07/02 18:37:52 cph Exp $ +$Id: cmpint.c,v 1.97 2002/07/02 20:49:11 cph Exp $ Copyright (c) 1989-2002 Massachusetts Institute of Technology @@ -597,12 +597,12 @@ DEFUN_VOID (enter_compiled_expression) instruction * compiled_entry_address; compiled_entry_address = - ((instruction *) (OBJECT_ADDRESS (Fetch_Expression ()))); + ((instruction *) (OBJECT_ADDRESS (exp_register))); if ((COMPILED_ENTRY_FORMAT_WORD (compiled_entry_address)) != FORMAT_WORD_EXPR) { /* It self evaluates. */ - Val = (Fetch_Expression ()); + val_register = exp_register; ENTER_SCHEME (OBJECT_ADDRESS (STACK_POP ())); } ENTER_SCHEME (compiled_entry_address); @@ -797,7 +797,7 @@ static utility_result { \ if (((long) (ADDR_TO_SCHEME_ADDR (Free))) \ >= ((long) (Regs[REGBLOCK_MEMTOP]))) \ - return (compiler_interrupt_common (0, Val)); \ + return (compiler_interrupt_common (0, val_register)); \ else \ RETURN_TO_SCHEME (OBJECT_ADDRESS (STACK_POP ())); \ } while (0) @@ -821,7 +821,7 @@ DEFNX (comutil_primitive_apply, SCHEME_OBJECT primitive AND long ignore_2 AND long ignore_3 AND long ignore_4) { - PRIMITIVE_APPLY (Val, primitive); + PRIMITIVE_APPLY (val_register, primitive); POP_PRIMITIVE_FRAME (PRIMITIVE_ARITY (primitive)); INVOKE_RETURN_ADDRESS (); } @@ -840,7 +840,7 @@ DEFNX (comutil_primitive_lexpr_apply, SCHEME_OBJECT primitive AND long ignore_2 AND long ignore_3 AND long ignore_4) { - PRIMITIVE_APPLY (Val, primitive); + PRIMITIVE_APPLY (val_register, primitive); POP_PRIMITIVE_FRAME (((long) Regs[REGBLOCK_LEXPR_ACTUALS])); INVOKE_RETURN_ADDRESS (); } @@ -1168,7 +1168,7 @@ DEFUN (link_cc_block, STACK_PUSH (LONG_TO_UNSIGNED_FIXNUM (count + 1)); STACK_PUSH (LONG_TO_UNSIGNED_FIXNUM (total_count)); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Store_Return (RC_COMP_LINK_CACHES_RESTART); Save_Cont (); @@ -1240,7 +1240,7 @@ DEFNX (comutil_link, unsigned long offset; #ifdef AUTOCLOBBER_BUG - block_address[OBJECT_DATUM (* block_address)] = Regs[REGBLOCK_ENV]; + block_address[OBJECT_DATUM (* block_address)] = env_register; #endif offset = (constant_address - block_address); @@ -1274,7 +1274,7 @@ DEFUN_VOID (comp_link_caches_restart) (void) STACK_POP (); /* Loop count, for debugger */ block = (STACK_POP ()); environment = (compiled_block_environment (block)); - Store_Env (environment); + env_register = environment; offset = (OBJECT_DATUM (STACK_POP ())); last_header_offset = (OBJECT_DATUM (STACK_POP ())); sections = (OBJECT_DATUM (STACK_POP ())); @@ -1451,7 +1451,7 @@ DEFNX (comutil_operator_lookup_trap, STACK_PUSH (LONG_TO_UNSIGNED_FIXNUM (nargs)); STACK_PUSH (compiled_block_environment (block)); STACK_PUSH (compiler_var_error (cache, block, CACHE_REFERENCES_OPERATOR)); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Store_Return (RC_COMP_OP_REF_TRAP_RESTART); Save_Cont (); RETURN_TO_C (code); @@ -1659,9 +1659,9 @@ DEFNX (comutil_operator_4_0_trap, The code that handles RC_COMP_INTERRUPT_RESTART in "interp.c" will return control to comp_interrupt_restart (below). This assumes that the Scheme stack contains a compiled code entry address - (start of continuation, procedure, etc.). The Expression register + (start of continuation, procedure, etc.). The exp_register saved with the continuation is a piece of state that will be - returned to Val and Env (both) upon return. + returned to val_register and env_register (both) upon return. */ #define MAYBE_REQUEST_INTERRUPTS() \ @@ -1685,7 +1685,7 @@ DEFUN (compiler_interrupt_common, (entry_point_raw, state), STACK_PUSH (ENTRY_TO_OBJECT (entry_point)); } STACK_PUSH (state); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Store_Return (RC_COMP_INTERRUPT_RESTART); Save_Cont (); RETURN_TO_C (PRIM_INTERRUPT); @@ -1726,7 +1726,7 @@ DEFNX (comutil_interrupt_procedure, return (compiler_interrupt_common (entry_point_raw, SHARP_F)); } -/* Val has live data, and there is no entry address on the stack */ +/* val_register has live data, and there is no entry address on the stack */ SCHEME_UTILITY utility_result DEFNX (comutil_interrupt_continuation, @@ -1736,10 +1736,10 @@ DEFNX (comutil_interrupt_continuation, long ignore_3 AND long ignore_4) { - return (compiler_interrupt_common (return_address_raw, Val)); + return (compiler_interrupt_common (return_address_raw, val_register)); } -/* Env has live data; no entry point on the stack */ +/* env_register has live data; no entry point on the stack */ SCHEME_UTILITY utility_result DEFNX (comutil_interrupt_ic_procedure, @@ -1749,7 +1749,7 @@ DEFNX (comutil_interrupt_ic_procedure, long ignore_3 AND long ignore_4) { - return (compiler_interrupt_common (entry_point_raw, (Fetch_Env ()))); + return (compiler_interrupt_common (entry_point_raw, env_register)); } SCHEME_UTILITY utility_result @@ -1760,15 +1760,15 @@ DEFNX (comutil_interrupt_continuation_2, long ignore_3 AND long ignore_4) { - return (compiler_interrupt_common (0, Val)); + return (compiler_interrupt_common (0, val_register)); } C_TO_SCHEME long DEFUN_VOID (comp_interrupt_restart) { SCHEME_OBJECT state = (STACK_POP ()); - Store_Env (state); - Val = state; + env_register = state; + val_register = state; ENTER_SCHEME (OBJECT_ADDRESS (STACK_POP ())); } @@ -1789,7 +1789,7 @@ DEFNX (comutil_assignment_trap, SCHEME_OBJECT cache = (MAKE_POINTER_OBJECT (CACHE_TYPE, (SCHEME_ADDR_TO_ADDR (cache_addr_raw)))); - long code = (compiler_assignment_trap (cache, value, (&Val))); + long code = (compiler_assignment_trap (cache, value, (&val_register))); if (code == PRIM_DONE) RETURN_TO_SCHEME (return_address); else @@ -1801,7 +1801,7 @@ DEFNX (comutil_assignment_trap, STACK_PUSH (compiled_block_environment (block)); STACK_PUSH (compiler_var_error (cache, block, CACHE_REFERENCES_ASSIGNMENT)); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Store_Return (RC_COMP_ASSIGNMENT_TRAP_RESTART); Save_Cont (); RETURN_TO_C (code); @@ -1814,7 +1814,7 @@ DEFUN_VOID (comp_assignment_trap_restart) SCHEME_OBJECT name = (STACK_POP ()); SCHEME_OBJECT environment = (STACK_POP ()); SCHEME_OBJECT value = (STACK_POP ()); - long code = (assign_variable (environment, name, value, (&Val))); + long code = (assign_variable (environment, name, value, (&val_register))); if (code == PRIM_DONE) ENTER_SCHEME (OBJECT_ADDRESS (STACK_POP ())); else @@ -1822,7 +1822,7 @@ DEFUN_VOID (comp_assignment_trap_restart) STACK_PUSH (value); STACK_PUSH (environment); STACK_PUSH (name); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Store_Return (RC_COMP_ASSIGNMENT_TRAP_RESTART); Save_Cont (); return (code); @@ -1852,7 +1852,7 @@ DEFNX (comutil_cache_lookup_apply, STACK_PUSH (compiled_block_environment (block)); STACK_PUSH (compiler_var_error (cache, block, CACHE_REFERENCES_OPERATOR)); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Store_Return (RC_COMP_CACHE_REF_APPLY_RESTART); Save_Cont (); RETURN_TO_C (code); @@ -1879,7 +1879,7 @@ DEFUN_VOID (comp_cache_lookup_apply_restart) { STACK_PUSH (environment); STACK_PUSH (name); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Store_Return (RC_COMP_CACHE_REF_APPLY_RESTART); Save_Cont (); return (code); @@ -1904,7 +1904,7 @@ DEFNX (name, \ SCHEME_OBJECT cache \ = (MAKE_POINTER_OBJECT \ (CACHE_TYPE, (SCHEME_ADDR_TO_ADDR (cache_addr_raw)))); \ - long code = (c_trap (cache, (&Val))); \ + long code = (c_trap (cache, (&val_register))); \ if (code == PRIM_DONE) \ RETURN_TO_SCHEME (return_address); \ else \ @@ -1916,7 +1916,7 @@ DEFNX (name, \ STACK_PUSH \ (compiler_var_error \ (cache, block, CACHE_REFERENCES_LOOKUP)); \ - Store_Expression (SHARP_F); \ + exp_register = SHARP_F; \ Store_Return (ret_code); \ Save_Cont (); \ RETURN_TO_C (code); \ @@ -1926,16 +1926,16 @@ DEFNX (name, \ C_TO_SCHEME long \ DEFUN_VOID (restart) \ { \ - SCHEME_OBJECT name = (Fetch_Expression ()); \ + SCHEME_OBJECT name = exp_register; \ SCHEME_OBJECT environment = (STACK_POP ()); \ - long code = (c_lookup (environment, name, (&Val))); \ + long code = (c_lookup (environment, name, (&val_register))); \ if (code == PRIM_DONE) \ ENTER_SCHEME (OBJECT_ADDRESS (STACK_POP ())); \ else \ { \ STACK_PUSH (environment); \ STACK_PUSH (name); \ - Store_Expression (SHARP_F); \ + exp_register = SHARP_F; \ Store_Return (ret_code); \ Save_Cont (); \ return (code); \ @@ -2017,7 +2017,7 @@ DEFNX (util_name, \ = ((instruction *) (SCHEME_ADDR_TO_ADDR (ret_add_raw))); \ long code; \ \ - code = (c_proc (environment, variable, (&Val))); \ + code = (c_proc (environment, variable, (&val_register))); \ if (code == PRIM_DONE) \ { \ RETURN_TO_SCHEME (ret_add); \ @@ -2027,7 +2027,7 @@ DEFNX (util_name, \ STACK_PUSH (ENTRY_TO_OBJECT (ret_add)); \ STACK_PUSH (variable); \ STACK_PUSH (environment); \ - Store_Expression (SHARP_F); \ + exp_register = SHARP_F; \ Store_Return (ret_code); \ Save_Cont (); \ RETURN_TO_C (code); \ @@ -2042,17 +2042,17 @@ DEFUN_VOID (restart_name) \ \ environment = (STACK_POP ()); \ variable = (STACK_POP ()); \ - code = (c_proc (environment, variable, (&Val))); \ + code = (c_proc (environment, variable, (&val_register))); \ if (code == PRIM_DONE) \ { \ - Regs[REGBLOCK_ENV] = environment; \ + env_register = environment; \ ENTER_SCHEME (OBJECT_ADDRESS (STACK_POP ())); \ } \ else \ { \ STACK_PUSH (variable); \ STACK_PUSH (environment); \ - Store_Expression (SHARP_F); \ + exp_register = SHARP_F; \ Store_Return (ret_code); \ Save_Cont (); \ return (code); \ @@ -2081,7 +2081,7 @@ DEFNX (util_name, \ STACK_PUSH (value); \ STACK_PUSH (variable); \ STACK_PUSH (environment); \ - Store_Expression (SHARP_F); \ + exp_register = SHARP_F; \ Store_Return (ret_code); \ Save_Cont (); \ RETURN_TO_C (code); \ @@ -2094,13 +2094,13 @@ DEFUN_VOID (restart_name) \ SCHEME_OBJECT environment, variable, value; \ long code; \ \ - environment = (Fetch_Expression ()); \ + environment = exp_register; \ variable = (STACK_POP ()); \ value = (STACK_POP ()); \ code = (c_proc (environment, variable, value)); \ if (code == PRIM_DONE) \ { \ - Regs[REGBLOCK_ENV] = environment; \ + env_register = environment; \ ENTER_SCHEME (OBJECT_ADDRESS (STACK_POP ())); \ } \ else \ @@ -2108,7 +2108,7 @@ DEFUN_VOID (restart_name) \ STACK_PUSH (value); \ STACK_PUSH (variable); \ STACK_PUSH (environment); \ - Store_Expression (SHARP_F); \ + exp_register = SHARP_F; \ Store_Return (ret_code); \ Save_Cont (); \ return (code); \ @@ -2144,7 +2144,7 @@ static long compiler_assign_variable (SCHEME_OBJECT environment, SCHEME_OBJECT symbol, SCHEME_OBJECT value) { - return (assign_variable (environment, symbol, value, (&Val))); + return (assign_variable (environment, symbol, value, (&val_register))); } CMPLR_ASSIGNMENT(comutil_assignment, @@ -2158,7 +2158,7 @@ compiler_define_variable (SCHEME_OBJECT environment, SCHEME_OBJECT symbol, { long result = (define_variable (environment, symbol, value)); if (result == PRIM_DONE) - Val = symbol; + val_register = symbol; return (result); } @@ -2173,14 +2173,14 @@ DEFNX (comutil_lookup_apply, SCHEME_OBJECT environment AND SCHEME_OBJECT variable AND long nactuals AND long ignore_4) { - long code = (lookup_variable (environment, variable, (&Val))); + long code = (lookup_variable (environment, variable, (&val_register))); if (code == PRIM_DONE) - return (comutil_apply (Val, nactuals, 0, 0)); + return (comutil_apply (val_register, nactuals, 0, 0)); { STACK_PUSH (LONG_TO_UNSIGNED_FIXNUM (nactuals)); STACK_PUSH (variable); STACK_PUSH (environment); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Store_Return (RC_COMP_LOOKUP_APPLY_RESTART); Save_Cont (); RETURN_TO_C (code); @@ -2208,7 +2208,7 @@ DEFUN_VOID (comp_lookup_apply_restart) { STACK_PUSH (variable); STACK_PUSH (environment); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Store_Return (RC_COMP_LOOKUP_APPLY_RESTART); Save_Cont (); return (code); @@ -2227,7 +2227,7 @@ DEFNX (comutil_primitive_error, STACK_PUSH (ENTRY_TO_OBJECT (ret_add)); STACK_PUSH (primitive); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Store_Return (RC_COMP_ERROR_RESTART); Save_Cont (); RETURN_TO_C (ERR_COMPILED_CODE_ERROR); @@ -2952,7 +2952,7 @@ DEFNX (comutil_compiled_code_bkpt, state = (MAKE_POINTER_OBJECT (TC_STACK_ENVIRONMENT, (SCHEME_ADDR_TO_ADDR (state_raw)))); else - state = Val; + state = val_register; stack_ptr = (MAKE_POINTER_OBJECT (TC_STACK_ENVIRONMENT, sp_register)); STACK_PUSH (state); /* state to preserve */ diff --git a/v7/src/microcode/cmpint.h b/v7/src/microcode/cmpint.h index c6ac3fbd8..f28a83072 100644 --- a/v7/src/microcode/cmpint.h +++ b/v7/src/microcode/cmpint.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: cmpint.h,v 10.8 2002/07/02 18:37:58 cph Exp $ +$Id: cmpint.h,v 10.9 2002/07/02 20:49:17 cph Exp $ Copyright (c) 1987-1990, 1999, 2000, 2002 Massachusetts Institute of Technology @@ -119,7 +119,7 @@ USA. long segment_size; \ \ Restore_Cont(); \ - segment_size = OBJECT_DATUM (Fetch_Expression()); \ + segment_size = OBJECT_DATUM (exp_register); \ last_return_code = (STACK_LOC (segment_size)); \ /* Undo the subproblem rotation. */ \ Compiler_End_Subproblem(); \ @@ -139,7 +139,7 @@ USA. #define compiled_code_restart() \ { \ - long segment_size = OBJECT_DATUM (Fetch_Expression()); \ + long segment_size = OBJECT_DATUM (exp_register); \ last_return_code = (STACK_LOC (segment_size)); \ /* Undo the subproblem rotation. */ \ Compiler_End_Subproblem(); \ @@ -176,7 +176,7 @@ USA. long segment_size = \ (STACK_LOCATIVE_DIFFERENCE \ (last_return_code, (STACK_LOC (0)))); \ - Store_Expression (LONG_TO_UNSIGNED_FIXNUM (segment_size)); \ + exp_register = (LONG_TO_UNSIGNED_FIXNUM (segment_size)); \ Store_Return (RC_REENTER_COMPILED_CODE); \ Save_Cont (); \ }); \ @@ -215,7 +215,7 @@ USA. { \ long segment_size = \ (STACK_LOCATIVE_DIFFERENCE (last_return_code, (STACK_LOC (0)))); \ - Store_Expression (LONG_TO_UNSIGNED_FIXNUM (segment_size)); \ + exp_register = (LONG_TO_UNSIGNED_FIXNUM (segment_size)); \ Store_Return (RC_REENTER_COMPILED_CODE); \ Save_Cont (); \ /* Rotate history to a new subproblem. */ \ @@ -239,10 +239,10 @@ USA. Restore_Cont(); \ segment_size = \ (STACK_LOCATIVE_DIFFERENCE (last_return_code, (STACK_LOC (0)))); \ - Store_Expression (LONG_TO_UNSIGNED_FIXNUM (segment_size)); \ + exp_register = (LONG_TO_UNSIGNED_FIXNUM (segment_size)); \ /* The Store_Return is a NOP, the Save_Cont is done by the code \ that follows. */ \ - /* Store_Return (OBJECT_DATUM (Fetch_Return ())); */ \ + /* Store_Return (OBJECT_DATUM (ret_register)); */ \ /* Save_Cont (); */ \ Compiler_New_Subproblem (); \ } diff --git a/v7/src/microcode/cmpintmd/hppa.h b/v7/src/microcode/cmpintmd/hppa.h index f51630bad..ab9b3ee84 100644 --- a/v7/src/microcode/cmpintmd/hppa.h +++ b/v7/src/microcode/cmpintmd/hppa.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: hppa.h,v 1.51 1999/01/02 06:06:43 cph Exp $ +$Id: hppa.h,v 1.52 2002/07/02 20:51:54 cph Exp $ -Copyright (c) 1989-1999 Massachusetts Institute of Technology +Copyright (c) 1989-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. */ /* @@ -921,7 +922,7 @@ DEFUN (do_bkpt_proceed, (value), unsigned long * value) buffer[len - 2] = ((unsigned long) clos_entry); buffer[len - 1] = real_entry_point; - Val = SHARP_F; + val_register = SHARP_F; * value = ((unsigned long) buffer); return (TRUE); } @@ -938,7 +939,7 @@ DEFUN (do_bkpt_proceed, (value), unsigned long * value) cache_flush_region (((PTR) buffer), (len - 1), (D_CACHE | I_CACHE)); buffer[len - 1] = (((unsigned long) (OBJECT_ADDRESS (ep))) + 4); - Val = state; + val_register = state; * value = ((unsigned long) buffer); return (TRUE); } @@ -996,7 +997,7 @@ DEFUN (do_bkpt_proceed, (value), unsigned long * value) buffer[len - 1] = ((((unsigned long) instrs) + 8) + offset); - Val = state; + val_register = state; * value = ((unsigned long) &buffer[clobber]); return (TRUE); } diff --git a/v7/src/microcode/debug.c b/v7/src/microcode/debug.c index 306b2613d..9356de8dd 100644 --- a/v7/src/microcode/debug.c +++ b/v7/src/microcode/debug.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: debug.c,v 9.54 2002/07/02 18:38:03 cph Exp $ +$Id: debug.c,v 9.55 2002/07/02 20:49:22 cph Exp $ Copyright (c) 1987-2002 Massachusetts Institute of Technology @@ -268,7 +268,7 @@ void DEFUN (Print_Return, (String), char * String) { outf_console ("%s: ", String); - print_return_name (console_output, Fetch_Return ()); + print_return_name (console_output, ret_register); outf_console ("\n"); } diff --git a/v7/src/microcode/dmpwrld.c b/v7/src/microcode/dmpwrld.c index e6e092678..83902368f 100644 --- a/v7/src/microcode/dmpwrld.c +++ b/v7/src/microcode/dmpwrld.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: dmpwrld.c,v 9.40 2000/12/05 21:23:44 cph Exp $ +$Id: dmpwrld.c,v 9.41 2002/07/02 20:49:27 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. */ /* This file contains a primitive to dump an executable version of Scheme. @@ -211,7 +212,7 @@ DEFINE_PRIMITIVE ("DUMP-WORLD", Prim_dump_world, 1, 1, 0) saved_dumped_p = scheme_dumped_p; scheme_dumped_p = true; - Val = SHARP_T; + val_register = SHARP_T; POP_PRIMITIVE_FRAME (1); /* Dump! */ @@ -225,7 +226,7 @@ DEFINE_PRIMITIVE ("DUMP-WORLD", Prim_dump_world, 1, 1, 0) /* Restore State */ - Val = SHARP_F; + val_register = SHARP_F; scheme_dumped_p = saved_dumped_p; /* IO: Restoring cached input for this job. */ diff --git a/v7/src/microcode/fasload.c b/v7/src/microcode/fasload.c index a3ebae742..d52ba55b6 100644 --- a/v7/src/microcode/fasload.c +++ b/v7/src/microcode/fasload.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: fasload.c,v 9.93 2002/07/02 19:03:26 cph Exp $ +$Id: fasload.c,v 9.94 2002/07/02 20:49:32 cph Exp $ Copyright (c) 1987-2002 Massachusetts Institute of Technology @@ -1056,10 +1056,10 @@ DEFINE_PRIMITIVE ("LOAD-BAND", Prim_band_load, 1, 1, 0) Current_State_Point = SHARP_F; /* Setup initial program */ Store_Return (RC_END_OF_COMPUTATION); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Save_Cont (); - Store_Expression (MEMORY_REF (result, 0)); - Store_Env (THE_GLOBAL_ENV); + exp_register = (MEMORY_REF (result, 0)); + env_register = THE_GLOBAL_ENV; /* Clear various interpreter state parameters. */ Trapping = false; Return_Hook_Address = 0; diff --git a/v7/src/microcode/fhooks.c b/v7/src/microcode/fhooks.c index bfe972632..f16c92e85 100644 --- a/v7/src/microcode/fhooks.c +++ b/v7/src/microcode/fhooks.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: fhooks.c,v 9.34 1999/01/02 06:11:34 cph Exp $ +$Id: fhooks.c,v 9.35 2002/07/02 20:49:37 cph Exp $ -Copyright (c) 1988, 1989, 1990, 1999 Massachusetts Institute of Technology +Copyright (c) 1988, 1989, 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. */ /* This file contains hooks and handles for the new fluid bindings @@ -54,7 +55,7 @@ DEFINE_PRIMITIVE ("WITH-SAVED-FLUID-BINDINGS", Prim_with_saved_fluid_bindings, 1 POP_PRIMITIVE_FRAME (1); Will_Push (CONTINUATION_SIZE + STACK_ENV_EXTRA_SLOTS + 1); /* Save previous fluid bindings for later restore */ - Store_Expression (Fluid_Bindings); + exp_register = Fluid_Bindings; Store_Return (RC_RESTORE_FLUIDS); Save_Cont (); /* Invoke the thunk. */ diff --git a/v7/src/microcode/futures.h b/v7/src/microcode/futures.h index 64e44f416..62d73795d 100644 --- a/v7/src/microcode/futures.h +++ b/v7/src/microcode/futures.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: futures.h,v 9.29 1999/01/02 06:11:34 cph Exp $ +$Id: futures.h,v 9.30 2002/07/02 20:49:42 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. */ /* This file contains macros useful for dealing with futures */ @@ -133,7 +134,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. } \ else \ { \ - Val = Value; \ + val_register = Value; \ PRIMITIVE_ABORT (PRIM_TOUCH); \ } \ } \ diff --git a/v7/src/microcode/history.h b/v7/src/microcode/history.h index 655915940..39159fabf 100644 --- a/v7/src/microcode/history.h +++ b/v7/src/microcode/history.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: history.h,v 9.30 2002/07/02 19:03:32 cph Exp $ +$Id: history.h,v 9.31 2002/07/02 20:49:47 cph Exp $ Copyright (c) 1987-1990, 1999, 2002 Massachusetts Institute of Technology @@ -63,8 +63,8 @@ USA. : (MAKE_POINTER_OBJECT \ (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_register)); \ + exp_register \ + = (MAKE_POINTER_OBJECT (UNMARKED_HISTORY_TYPE, history_register)); \ Store_Return (Return_Code); \ Save_Cont (); \ history_register \ diff --git a/v7/src/microcode/hooks.c b/v7/src/microcode/hooks.c index 840c0eae8..6918012b3 100644 --- a/v7/src/microcode/hooks.c +++ b/v7/src/microcode/hooks.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: hooks.c,v 9.62 2002/07/02 19:03:38 cph Exp $ +$Id: hooks.c,v 9.63 2002/07/02 20:49:53 cph Exp $ Copyright (c) 1988-2002 Massachusetts Institute of Technology @@ -294,7 +294,7 @@ DEFUN (CWCC, (return_code, reuse_flag, receiver), STACK_RESET (); Will_Push (CONTINUATION_SIZE); Store_Return (RC_JOIN_STACKLETS); - Store_Expression (control_point); + exp_register = control_point; Save_Cont (); Pushed (); } @@ -381,7 +381,7 @@ Invoke THUNK with CONTROL-POINT as its control stack.") CLEAR_INTERRUPT (INT_Stack_Overflow); Will_Push (CONTINUATION_SIZE); - Store_Expression (control_point); + exp_register = control_point; Store_Return (RC_JOIN_STACKLETS); Save_Cont (); Pushed (); @@ -435,8 +435,8 @@ Evaluate SCODE-EXPRESSION in ENVIRONMENT.") fast SCHEME_OBJECT expression = (ARG_REF (1)); fast SCHEME_OBJECT environment = (ARG_REF (2)); POP_PRIMITIVE_FRAME (2); - Store_Env (environment); - Store_Expression (expression); + env_register = environment; + exp_register = expression; } PRIMITIVE_ABORT (PRIM_DO_EXPRESSION); /*NOTREACHED*/ @@ -462,7 +462,7 @@ memoized yet.") POP_PRIMITIVE_FRAME (1); Will_Push (CONTINUATION_SIZE + STACK_ENV_EXTRA_SLOTS + 1); Store_Return (RC_SNAP_NEED_THUNK); - Store_Expression (thunk); + exp_register = thunk; Save_Cont (); STACK_PUSH (MEMORY_REF (thunk, THUNK_VALUE)); STACK_PUSH (STACK_FRAME_HEADER); @@ -478,11 +478,11 @@ memoized yet.") POP_PRIMITIVE_FRAME (1); Will_Push (CONTINUATION_SIZE); Store_Return (RC_SNAP_NEED_THUNK); - Store_Expression (thunk); + exp_register = thunk; Save_Cont (); Pushed (); - Store_Env (FAST_MEMORY_REF (thunk, THUNK_ENVIRONMENT)); - Store_Expression (FAST_MEMORY_REF (thunk, THUNK_PROCEDURE)); + env_register = (FAST_MEMORY_REF (thunk, THUNK_ENVIRONMENT)); + exp_register = (FAST_MEMORY_REF (thunk, THUNK_PROCEDURE)); PRIMITIVE_ABORT (PRIM_DO_EXPRESSION); /*NOTREACHED*/ PRIMITIVE_RETURN (UNSPECIFIC); @@ -532,7 +532,7 @@ space is used as the starting point.") Will_Push((2 * CONTINUATION_SIZE) + (STACK_ENV_EXTRA_SLOTS + 1)); /* Push a continuation to go back to the current state after the body is evaluated */ - Store_Expression (old_point); + exp_register = old_point; Store_Return (RC_RESTORE_TO_STATE_POINT); Save_Cont (); /* Push a stack frame which will call the body after we have moved @@ -540,7 +540,7 @@ space is used as the starting point.") STACK_PUSH (during_thunk); STACK_PUSH (STACK_FRAME_HEADER); /* Push the continuation to go with the stack frame */ - Store_Expression (SHARP_F); + exp_register = SHARP_F; Store_Return (RC_INTERNAL_APPLY); Save_Cont (); Pushed (); @@ -740,8 +740,8 @@ identified by the continuation parser.") { SCHEME_OBJECT thunk = (STACK_POP ()); STACK_PUSH (STACK_FRAME_HEADER + (nargs - 2)); - Store_Env (THE_NULL_ENV); - Store_Expression (SHARP_F); + env_register = THE_NULL_ENV; + exp_register = SHARP_F; Store_Return (RC_INTERNAL_APPLY); Save_Cont (); Will_Push (STACK_ENV_EXTRA_SLOTS + 1); @@ -872,7 +872,7 @@ Set the interpreter's history object to HISTORY.") PRIMITIVE_HEADER (1); PRIMITIVE_CANONICALIZE_CONTEXT (); CHECK_ARG (1, HUNK3_P); - Val = (*history_register); + val_register = (*history_register); #ifndef DISABLE_HISTORY history_register = (OBJECT_ADDRESS (ARG_REF (1))); #else diff --git a/v7/src/microcode/intercom.c b/v7/src/microcode/intercom.c index 488e68b8a..9a0d71eb6 100644 --- a/v7/src/microcode/intercom.c +++ b/v7/src/microcode/intercom.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: intercom.c,v 9.31 1999/01/02 06:11:34 cph Exp $ +$Id: intercom.c,v 9.32 2002/07/02 20:49:58 cph Exp $ -Copyright (c) 1987-1999 Massachusetts Institute of Technology +Copyright (c) 1987-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. */ /* Single-processor simulation of locking, propagating, and @@ -63,7 +64,7 @@ DEFINE_PRIMITIVE ("GLOBAL-INTERRUPT", Prim_send_global_interrupt, 3, 3, 0) POP_PRIMITIVE_FRAME (3); Will_Push (CONTINUATION_SIZE + STACK_ENV_EXTRA_SLOTS + 1); Store_Return (RC_FINISH_GLOBAL_INT); - Store_Expression (LONG_TO_UNSIGNED_FIXNUM (Which_Level)); + exp_register = (LONG_TO_UNSIGNED_FIXNUM (Which_Level)); Save_Cont (); STACK_PUSH (test); STACK_PUSH (STACK_FRAME_HEADER); @@ -183,7 +184,7 @@ DEFINE_PRIMITIVE ("GET-WORK", Prim_get_work, 1, 1, 0) STACK_PUSH (SHARP_F); STACK_PUSH (primitive); STACK_PUSH (STACK_FRAME_HEADER + 1); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Store_Return (RC_INTERNAL_APPLY); Save_Cont (); /* Invoke the thunk. */ diff --git a/v7/src/microcode/interp.c b/v7/src/microcode/interp.c index c8887b7ab..0736012b2 100644 --- a/v7/src/microcode/interp.c +++ b/v7/src/microcode/interp.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: interp.c,v 9.93 2002/07/02 18:15:13 cph Exp $ +$Id: interp.c,v 9.94 2002/07/02 20:50:03 cph Exp $ Copyright (c) 1988-2002 Massachusetts Institute of Technology @@ -91,7 +91,7 @@ extern void EXFUN (preserve_signal_mask, (void)); Store_Return(Return_Code); \ Save_Cont(); \ Store_Return(RC_RESTORE_VALUE); \ - (Registers[REGBLOCK_EXPR]) = temp; \ + exp_register = temp; \ Save_Cont(); \ } @@ -117,7 +117,7 @@ if (GC_Check(Amount)) \ #define Prepare_Eval_Repeat() \ { \ Will_Push(CONTINUATION_SIZE+1); \ - STACK_PUSH (Registers[REGBLOCK_ENV]); \ + STACK_PUSH (env_register); \ Store_Return(RC_EVAL_ERROR); \ Save_Cont(); \ Pushed(); \ @@ -142,23 +142,19 @@ if (GC_Check(Amount)) \ #define Reduces_To(Expr) \ { \ - (Registers[REGBLOCK_EXPR]) = Expr; \ - New_Reduction \ - ((Registers[REGBLOCK_EXPR]), (Registers[REGBLOCK_ENV])); \ + exp_register = Expr; \ + New_Reduction (exp_register, env_register); \ goto Do_Expression; \ } -#define Reduces_To_Nth(N) \ - Reduces_To(FAST_MEMORY_REF ((Registers[REGBLOCK_EXPR]), (N))) +#define Reduces_To_Nth(N) (Reduces_To (FAST_MEMORY_REF (exp_register, (N)))) #define Do_Nth_Then(Return_Code, N, Extra) \ { \ Store_Return (Return_Code); \ Save_Cont (); \ - (Registers[REGBLOCK_EXPR]) \ - = (FAST_MEMORY_REF ((Registers[REGBLOCK_EXPR]), (N))); \ - New_Subproblem \ - ((Registers[REGBLOCK_EXPR]), (Registers[REGBLOCK_ENV])); \ + exp_register = (FAST_MEMORY_REF (exp_register, (N))); \ + New_Subproblem (exp_register, env_register); \ Extra; \ goto Do_Expression; \ } @@ -167,10 +163,8 @@ if (GC_Check(Amount)) \ { \ Store_Return (Return_Code); \ Save_Cont (); \ - (Registers[REGBLOCK_EXPR]) \ - = (FAST_MEMORY_REF ((Registers[REGBLOCK_EXPR]), (N))); \ - Reuse_Subproblem \ - ((Registers[REGBLOCK_EXPR]), (Registers[REGBLOCK_ENV])); \ + exp_register = (FAST_MEMORY_REF (exp_register, (N))); \ + Reuse_Subproblem (exp_register, env_register); \ goto Do_Expression; \ } @@ -265,26 +259,26 @@ if (GC_Check(Amount)) \ #define Pop_Return_Val_Check() \ { \ - SCHEME_OBJECT Orig_Val = Val; \ +` SCHEME_OBJECT Orig_Val = val_register; \ \ - while (OBJECT_TYPE (Val) == TC_FUTURE) \ + while (OBJECT_TYPE (val_register) == TC_FUTURE) \ { \ - if (Future_Has_Value(Val)) \ + if (Future_Has_Value(val_register)) \ { \ - if (Future_Is_Keep_Slot(Val)) \ + if (Future_Is_Keep_Slot(val_register)) \ { \ - Log_Touch_Of_Future(Val); \ + Log_Touch_Of_Future(val_register); \ } \ - Val = Future_Value(Val); \ + val_register = Future_Value(val_register); \ } \ else \ { \ Save_Cont(); \ Will_Push(CONTINUATION_SIZE + (STACK_ENV_EXTRA_SLOTS + 2)); \ Store_Return(RC_RESTORE_VALUE); \ - (Registers[REGBLOCK_EXPR]) = Orig_Val; \ + exp_register = Orig_Val; \ Save_Cont(); \ - STACK_PUSH (Val); \ + STACK_PUSH (val_register); \ STACK_PUSH (Get_Fixed_Obj_Slot(System_Scheduler)); \ STACK_PUSH (STACK_FRAME_HEADER + 1); \ Pushed(); \ @@ -294,9 +288,8 @@ if (GC_Check(Amount)) \ } /* This saves stuff unnecessarily in most cases. - For example, when Which_Way is PRIM_APPLY, Val, Env, Expr, - and Return_Code are undefined. - */ + For example, when Which_Way is PRIM_APPLY, val_register, + env_register, exp_register, and ret_register are undefined. */ #define LOG_FUTURES() \ { \ @@ -304,11 +297,10 @@ if (GC_Check(Amount)) \ { \ Save_Cont(); \ Will_Push(CONTINUATION_SIZE + 2); \ - STACK_PUSH (Val); \ - STACK_PUSH (Registers[REGBLOCK_ENV]); \ + STACK_PUSH (val_register); \ + STACK_PUSH (env_register); \ Store_Return (RC_REPEAT_DISPATCH); \ - (Registers[REGBLOCK_EXPR]) \ - = (LONG_TO_FIXNUM (CODE_MAP (Which_Way))); \ + exp_register = (LONG_TO_FIXNUM (CODE_MAP (Which_Way))); \ Save_Cont(); \ Pushed(); \ Call_Future_Logging(); \ @@ -447,7 +439,7 @@ DEFUN (Interpret, (pop_return_p), Boolean pop_return_p) /* Primitives jump back here for errors, requests to evaluate an * expression, apply a function, or handle an interrupt request. On * errors or interrupts they leave their arguments on the stack, the - * primitive itself in Expression. The code should do a primitive + * primitive itself in exp_register. The code should do a primitive * backout in these cases, but not in others (apply, eval, etc.), since * the primitive itself will have left the state of the interpreter ready * for operation. @@ -472,16 +464,16 @@ Repeat_Dispatch: goto Apply_Non_Trapping; case PRIM_DO_EXPRESSION: - Val = (Registers[REGBLOCK_EXPR]); + val_register = exp_register; PROCEED_AFTER_PRIMITIVE(); case CODE_MAP(PRIM_DO_EXPRESSION): - Reduces_To(Val); + Reduces_To(val_register); case PRIM_NO_TRAP_EVAL: - Val = (Registers[REGBLOCK_EXPR]); + val_register = exp_register; PROCEED_AFTER_PRIMITIVE(); case CODE_MAP(PRIM_NO_TRAP_EVAL): - New_Reduction(Val, (Registers[REGBLOCK_ENV])); + New_Reduction(val_register, env_register); goto Eval_Non_Trapping; case 0: /* first time */ @@ -510,14 +502,14 @@ Repeat_Dispatch: { SCHEME_OBJECT temp; - temp = Val; + temp = val_register; BACK_OUT_AFTER_PRIMITIVE(); - Val = temp; + val_register = temp; LOG_FUTURES(); } /* fall through */ case CODE_MAP(PRIM_TOUCH): - TOUCH_SETUP(Val); + TOUCH_SETUP(val_register); goto Internal_Apply; case PRIM_INTERRUPT: @@ -568,12 +560,12 @@ Do_Expression: if (0 && Eval_Debug) { - Print_Expression ((Registers[REGBLOCK_EXPR]), "Eval, expression"); + Print_Expression (exp_register, "Eval, expression"); outf_console ("\n"); } - /* The expression register has an Scode item in it which - * should be evaluated and the result left in Val. + /* exp_register has an Scode item in it that + * should be evaluated and the result left in val_register. * * A "break" after the code for any operation indicates that * all processing for this operation has been completed, and @@ -588,8 +580,7 @@ Do_Expression: * the current Scode item is the value returned when the * new expression is evaluated. Therefore no new * continuation is created and processing continues at - * Do_Expression with the new expression in the expression - * register. + * Do_Expression with the new expression in exp_register. * * Finally, an operation can terminate with a Do_Nth_Then * macro. This indicates that another expression must be @@ -597,8 +588,7 @@ Do_Expression: * performed before the value of this S-Code item available. * Thus a new continuation is created and placed on the * stack (using Save_Cont), the new expression is placed in - * the Expression register, and processing continues at - * Do_Expression. + * the exp_register, and processing continues at Do_Expression. */ /* Handling of Eval Trapping. @@ -615,8 +605,8 @@ Do_Expression: { Stop_Trapping (); Will_Push (4); - STACK_PUSH (Registers[REGBLOCK_ENV]); - STACK_PUSH (Registers[REGBLOCK_EXPR]); + STACK_PUSH (env_register); + STACK_PUSH (exp_register); STACK_PUSH (Fetch_Eval_Trapper ()); STACK_PUSH (STACK_FRAME_HEADER + 2); Pushed (); @@ -625,7 +615,7 @@ Do_Expression: Eval_Non_Trapping: Eval_Ucode_Hook(); - switch (OBJECT_TYPE (Registers[REGBLOCK_EXPR])) + switch (OBJECT_TYPE (exp_register)) { default: #if 0 @@ -663,7 +653,7 @@ Eval_Non_Trapping: case TC_VECTOR: case TC_VECTOR_16B: case TC_VECTOR_1B: - Val = (Registers[REGBLOCK_EXPR]); + val_register = exp_register; break; case TC_ACCESS: @@ -672,7 +662,7 @@ Eval_Non_Trapping: case TC_ASSIGNMENT: Will_Push(CONTINUATION_SIZE + 1); - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); Do_Nth_Then(RC_EXECUTE_ASSIGNMENT_FINISH, ASSIGN_VALUE, Pushed()); case TC_BROKEN_HEART: @@ -680,9 +670,7 @@ Eval_Non_Trapping: case TC_COMBINATION: { - long Array_Length; - - Array_Length = (VECTOR_LENGTH (Registers[REGBLOCK_EXPR]) - 1); + long Array_Length = ((VECTOR_LENGTH (exp_register)) - 1); #ifdef USE_STACKLETS /* Finger */ Eval_GC_Check @@ -698,18 +686,18 @@ Eval_Non_Trapping: STACK_PUSH (STACK_FRAME_HEADER); /* Frame size */ Do_Nth_Then(RC_COMB_APPLY_FUNCTION, COMB_FN_SLOT, {}); } - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); Do_Nth_Then(RC_COMB_SAVE_VALUE, Array_Length+1, {}); } case TC_COMBINATION_1: Will_Eventually_Push(CONTINUATION_SIZE + STACK_ENV_FIRST_ARG + 1); - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); Do_Nth_Then(RC_COMB_1_PROCEDURE, COMB_1_ARG_1, {}); case TC_COMBINATION_2: Will_Eventually_Push(CONTINUATION_SIZE + STACK_ENV_FIRST_ARG + 2); - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); Do_Nth_Then(RC_COMB_2_FIRST_OPERAND, COMB_2_ARG_2, {}); case TC_COMMENT: @@ -717,58 +705,55 @@ Eval_Non_Trapping: case TC_CONDITIONAL: Will_Push(CONTINUATION_SIZE + 1); - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); Do_Nth_Then(RC_CONDITIONAL_DECIDE, COND_PREDICATE, Pushed()); case TC_COMPILED_ENTRY: { - SCHEME_OBJECT compiled_expression; - - compiled_expression = (Registers[REGBLOCK_EXPR]); + SCHEME_OBJECT compiled_expression = exp_register; execute_compiled_setup(); - (Registers[REGBLOCK_EXPR]) = compiled_expression; + exp_register = compiled_expression; Which_Way = enter_compiled_expression(); goto return_from_compiled_code; } case TC_DEFINITION: Will_Push(CONTINUATION_SIZE + 1); - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); Do_Nth_Then(RC_EXECUTE_DEFINITION_FINISH, DEFINE_VALUE, Pushed()); case TC_DELAY: /* Deliberately omitted: Eval_GC_Check(2); */ - Val = MAKE_POINTER_OBJECT (TC_DELAYED, Free); - Free[THUNK_ENVIRONMENT] = (Registers[REGBLOCK_ENV]); - Free[THUNK_PROCEDURE] = - FAST_MEMORY_REF ((Registers[REGBLOCK_EXPR]), DELAY_OBJECT); + val_register = MAKE_POINTER_OBJECT (TC_DELAYED, Free); + Free[THUNK_ENVIRONMENT] = env_register; + Free[THUNK_PROCEDURE] = (FAST_MEMORY_REF (exp_register, DELAY_OBJECT)); Free += 2; break; case TC_DISJUNCTION: Will_Push(CONTINUATION_SIZE + 1); - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); Do_Nth_Then(RC_DISJUNCTION_DECIDE, OR_PREDICATE, Pushed()); case TC_EXTENDED_LAMBDA: /* Close the procedure */ /* Deliberately omitted: Eval_GC_Check(2); */ - Val = MAKE_POINTER_OBJECT (TC_EXTENDED_PROCEDURE, Free); - Free[PROCEDURE_LAMBDA_EXPR] = (Registers[REGBLOCK_EXPR]); - Free[PROCEDURE_ENVIRONMENT] = (Registers[REGBLOCK_ENV]); + val_register = MAKE_POINTER_OBJECT (TC_EXTENDED_PROCEDURE, Free); + Free[PROCEDURE_LAMBDA_EXPR] = exp_register; + Free[PROCEDURE_ENVIRONMENT] = env_register; Free += 2; break; #ifdef COMPILE_FUTURES case TC_FUTURE: - if (Future_Has_Value(Registers[REGBLOCK_EXPR])) + if (Future_Has_Value (exp_register)) { - SCHEME_OBJECT Future = (Registers[REGBLOCK_EXPR]); + SCHEME_OBJECT Future = exp_register; if (Future_Is_Keep_Slot(Future)) Log_Touch_Of_Future(Future); Reduces_To_Nth(FUTURE_VALUE); } Prepare_Eval_Repeat(); Will_Push(STACK_ENV_EXTRA_SLOTS+2); - STACK_PUSH (Registers[REGBLOCK_EXPR]); /* Arg: FUTURE object */ + STACK_PUSH (exp_register); /* Arg: FUTURE object */ STACK_PUSH (Get_Fixed_Obj_Slot(System_Scheduler)); STACK_PUSH (STACK_FRAME_HEADER+1); Pushed(); @@ -783,9 +768,9 @@ Eval_Non_Trapping: case TC_LAMBDA: /* Close the procedure */ case TC_LEXPR: /* Deliberately omitted: Eval_GC_Check(2); */ - Val = MAKE_POINTER_OBJECT (TC_PROCEDURE, Free); - Free[PROCEDURE_LAMBDA_EXPR] = (Registers[REGBLOCK_EXPR]); - Free[PROCEDURE_ENVIRONMENT] = (Registers[REGBLOCK_ENV]); + val_register = MAKE_POINTER_OBJECT (TC_PROCEDURE, Free); + Free[PROCEDURE_LAMBDA_EXPR] = exp_register; + Free[PROCEDURE_ENVIRONMENT] = env_register; Free += 2; break; @@ -801,8 +786,7 @@ Eval_Non_Trapping: case TC_PCOMB0: Will_Eventually_Push(CONTINUATION_SIZE + STACK_ENV_FIRST_ARG); Finished_Eventual_Pushing(CONTINUATION_SIZE + STACK_ENV_FIRST_ARG); - (Registers[REGBLOCK_EXPR]) - = (OBJECT_NEW_TYPE (TC_PRIMITIVE, (Registers[REGBLOCK_EXPR]))); + exp_register = (OBJECT_NEW_TYPE (TC_PRIMITIVE, exp_register)); goto Primitive_Internal_Apply; case TC_PCOMB1: @@ -811,30 +795,30 @@ Eval_Non_Trapping: case TC_PCOMB2: Will_Eventually_Push(CONTINUATION_SIZE + STACK_ENV_FIRST_ARG + 2); - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); Do_Nth_Then(RC_PCOMB2_DO_1, PCOMB2_ARG_2_SLOT, {}); case TC_PCOMB3: Will_Eventually_Push(CONTINUATION_SIZE + STACK_ENV_FIRST_ARG + 3); - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); Do_Nth_Then(RC_PCOMB3_DO_2, PCOMB3_ARG_3_SLOT, {}); case TC_SCODE_QUOTE: - Val = FAST_MEMORY_REF ((Registers[REGBLOCK_EXPR]), SCODE_QUOTE_OBJECT); + val_register = FAST_MEMORY_REF (exp_register, SCODE_QUOTE_OBJECT); break; case TC_SEQUENCE_2: Will_Push(CONTINUATION_SIZE + 1); - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); Do_Nth_Then(RC_SEQ_2_DO_2, SEQUENCE_1, Pushed()); case TC_SEQUENCE_3: Will_Push(CONTINUATION_SIZE + 1); - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); Do_Nth_Then(RC_SEQ_3_DO_2, SEQUENCE_1, Pushed()); case TC_THE_ENVIRONMENT: - Val = (Registers[REGBLOCK_ENV]); + val_register = env_register; break; case TC_VARIABLE: @@ -842,10 +826,7 @@ Eval_Non_Trapping: long temp; Set_Time_Zone(Zone_Lookup); - temp - = (lookup_variable ((Registers[REGBLOCK_ENV]), - (Registers[REGBLOCK_EXPR]), - (&Val))); + temp = (lookup_variable (env_register, exp_register, (&val_register))); if (temp == PRIM_DONE) goto Pop_Return; @@ -877,7 +858,7 @@ Pop_Return: { Will_Push(3); Stop_Trapping(); - STACK_PUSH (Val); + STACK_PUSH (val_register); STACK_PUSH (Fetch_Return_Trapper()); STACK_PUSH (STACK_FRAME_HEADER+1); Pushed(); @@ -887,16 +868,16 @@ Pop_Return_Non_Trapping: Pop_Return_Ucode_Hook(); Restore_Cont(); if (Consistency_Check && - (OBJECT_TYPE (Registers[REGBLOCK_RETURN]) != TC_RETURN_CODE)) + (OBJECT_TYPE (ret_register) != TC_RETURN_CODE)) { - STACK_PUSH (Val); /* For possible stack trace */ + STACK_PUSH (val_register); /* For possible stack trace */ Save_Cont(); Microcode_Termination (TERM_BAD_STACK); } if (0 && Eval_Debug) { Print_Return ("Pop_Return, return code"); - Print_Expression (Val, "Pop_Return, value"); + Print_Expression (val_register, "Pop_Return, value"); outf_console ("\n"); }; @@ -905,26 +886,26 @@ Pop_Return_Non_Trapping: * common occurrence. */ - switch (OBJECT_DATUM (Registers[REGBLOCK_RETURN])) + switch (OBJECT_DATUM (ret_register)) { case RC_COMB_1_PROCEDURE: - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); - STACK_PUSH (Val); /* Arg. 1 */ - STACK_PUSH (SHARP_F); /* Operator */ + env_register = (STACK_POP ()); + STACK_PUSH (val_register); /* Arg. 1 */ + STACK_PUSH (SHARP_F); /* Operator */ STACK_PUSH (STACK_FRAME_HEADER + 1); Finished_Eventual_Pushing(CONTINUATION_SIZE); Do_Another_Then(RC_COMB_APPLY_FUNCTION, COMB_1_FN); case RC_COMB_2_FIRST_OPERAND: - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); - STACK_PUSH (Val); - STACK_PUSH (Registers[REGBLOCK_ENV]); + env_register = (STACK_POP ()); + STACK_PUSH (val_register); + STACK_PUSH (env_register); Do_Another_Then(RC_COMB_2_PROCEDURE, COMB_2_ARG_1); case RC_COMB_2_PROCEDURE: - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); - STACK_PUSH (Val); /* Arg 1, just calculated */ - STACK_PUSH (SHARP_F); /* Function */ + env_register = (STACK_POP ()); + STACK_PUSH (val_register); /* Arg 1, just calculated */ + STACK_PUSH (SHARP_F); /* Function */ STACK_PUSH (STACK_FRAME_HEADER + 2); Finished_Eventual_Pushing(CONTINUATION_SIZE); Do_Another_Then(RC_COMB_APPLY_FUNCTION, COMB_2_FN); @@ -936,21 +917,21 @@ Pop_Return_Non_Trapping: case RC_COMB_SAVE_VALUE: { long Arg_Number; - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); + env_register = (STACK_POP ()); Arg_Number = OBJECT_DATUM (STACK_REF(STACK_COMB_FINGER))-1; - STACK_REF(STACK_COMB_FIRST_ARG+Arg_Number) = Val; + STACK_REF(STACK_COMB_FIRST_ARG+Arg_Number) = val_register; STACK_REF(STACK_COMB_FINGER) = MAKE_OBJECT (TC_MANIFEST_NM_VECTOR, Arg_Number); /* DO NOT count on the type code being NMVector here, since the stack parser may create them with #F here! */ if (Arg_Number > 0) { - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); Do_Another_Then(RC_COMB_SAVE_VALUE, (COMB_ARG_1_SLOT - 1) + Arg_Number); } /* Frame Size */ - STACK_PUSH (FAST_MEMORY_REF ((Registers[REGBLOCK_EXPR]), 0)); + STACK_PUSH (FAST_MEMORY_REF (exp_register, 0)); Do_Another_Then(RC_COMB_APPLY_FUNCTION, COMB_FN_SLOT); } @@ -1022,15 +1003,16 @@ Pop_Return_Non_Trapping: case RC_CONDITIONAL_DECIDE: Pop_Return_Val_Check(); End_Subproblem(); - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); - Reduces_To_Nth ((Val == SHARP_F) ? COND_ALTERNATIVE : COND_CONSEQUENT); + env_register = (STACK_POP ()); + Reduces_To_Nth + ((val_register == SHARP_F) ? COND_ALTERNATIVE : COND_CONSEQUENT); case RC_DISJUNCTION_DECIDE: /* Return predicate if it isn't #F; else do ALTERNATIVE */ Pop_Return_Val_Check(); End_Subproblem(); - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); - if (Val != SHARP_F) goto Pop_Return; + env_register = (STACK_POP ()); + if (val_register != SHARP_F) goto Pop_Return; Reduces_To_Nth(OR_ALTERNATIVE); case RC_END_OF_COMPUTATION: @@ -1055,8 +1037,8 @@ Pop_Return_Non_Trapping: case RC_EVAL_ERROR: /* Should be called RC_REDO_EVALUATION. */ - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); - Reduces_To(Registers[REGBLOCK_EXPR]); + env_register = (STACK_POP ()); + Reduces_To (exp_register); case RC_EXECUTE_ACCESS_FINISH: { @@ -1064,15 +1046,15 @@ Pop_Return_Non_Trapping: SCHEME_OBJECT value; Pop_Return_Val_Check(); - value = Val; + value = val_register; - if (ENVIRONMENT_P (Val)) + if (ENVIRONMENT_P (val_register)) { Result = (lookup_variable (value, - (FAST_MEMORY_REF ((Registers[REGBLOCK_EXPR]), + (FAST_MEMORY_REF (exp_register, ACCESS_NAME)), - (&Val))); + (&val_register))); if (Result == PRIM_DONE) { End_Subproblem(); @@ -1080,13 +1062,13 @@ Pop_Return_Non_Trapping: } if (Result != PRIM_INTERRUPT) { - Val = value; + val_register = value; Pop_Return_Error(Result); } Prepare_Pop_Return_Interrupt(RC_EXECUTE_ACCESS_FINISH, value); Interrupt(PENDING_INTERRUPTS()); } - Val = value; + val_register = value; Pop_Return_Error(ERR_BAD_FRAME); } @@ -1098,15 +1080,15 @@ Pop_Return_Non_Trapping: DECLARE_LOCK (set_serializer); #endif - value = Val; + value = val_register; Set_Time_Zone(Zone_Lookup); - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); + env_register = (STACK_POP ()); temp = (assign_variable - ((Registers[REGBLOCK_ENV]), - (MEMORY_REF ((Registers[REGBLOCK_EXPR]), ASSIGN_NAME)), + (env_register, + (MEMORY_REF (exp_register, ASSIGN_NAME)), value, - (&Val))); + (&val_register))); if (temp == PRIM_DONE) { End_Subproblem(); @@ -1115,10 +1097,10 @@ Pop_Return_Non_Trapping: } Set_Time_Zone(Zone_Working); - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); if (temp != PRIM_INTERRUPT) { - Val = value; + val_register = value; Pop_Return_Error(temp); } @@ -1129,43 +1111,42 @@ Pop_Return_Non_Trapping: case RC_EXECUTE_DEFINITION_FINISH: { - SCHEME_OBJECT name - = (FAST_MEMORY_REF ((Registers[REGBLOCK_EXPR]), DEFINE_NAME)); - SCHEME_OBJECT value = Val; + SCHEME_OBJECT name = (FAST_MEMORY_REF (exp_register, DEFINE_NAME)); + SCHEME_OBJECT value = val_register; long result; - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); - result = (define_variable ((Registers[REGBLOCK_ENV]), name, value)); + env_register = (STACK_POP ()); + result = (define_variable (env_register, name, value)); if (result == PRIM_DONE) { End_Subproblem(); - Val = name; + val_register = name; break; } - STACK_PUSH (Registers[REGBLOCK_ENV]); + STACK_PUSH (env_register); if (result == PRIM_INTERRUPT) { Prepare_Pop_Return_Interrupt(RC_EXECUTE_DEFINITION_FINISH, value); Interrupt(PENDING_INTERRUPTS()); } - Val = value; + val_register = value; Pop_Return_Error(result); } case RC_EXECUTE_IN_PACKAGE_CONTINUE: Pop_Return_Val_Check(); - if (ENVIRONMENT_P (Val)) + if (ENVIRONMENT_P (val_register)) { End_Subproblem(); - (Registers[REGBLOCK_ENV]) = Val; + env_register = val_register; Reduces_To_Nth(IN_PACKAGE_EXPRESSION); } Pop_Return_Error(ERR_BAD_FRAME); #ifdef COMPILE_FUTURES case RC_FINISH_GLOBAL_INT: - Val = Global_Int_Part_2((Registers[REGBLOCK_EXPR]), Val); + val_register = Global_Int_Part_2(exp_register, val_register); break; #endif @@ -1210,24 +1191,24 @@ Pop_Return_Non_Trapping: */ #define Prepare_Apply_Interrupt() \ - { \ - (Registers[REGBLOCK_EXPR]) = SHARP_F; \ - Prepare_Pop_Return_Interrupt \ - (RC_INTERNAL_APPLY_VAL, (STACK_REF (STACK_ENV_FUNCTION))); \ - } +{ \ + exp_register = SHARP_F; \ + Prepare_Pop_Return_Interrupt \ + (RC_INTERNAL_APPLY_VAL, (STACK_REF (STACK_ENV_FUNCTION))); \ +} #define Apply_Error(N) \ - { \ - (Registers[REGBLOCK_EXPR]) = SHARP_F; \ - Store_Return (RC_INTERNAL_APPLY_VAL); \ - Val = (STACK_REF (STACK_ENV_FUNCTION)); \ - Pop_Return_Error (N); \ - } +{ \ + exp_register = SHARP_F; \ + Store_Return (RC_INTERNAL_APPLY_VAL); \ + val_register = (STACK_REF (STACK_ENV_FUNCTION)); \ + Pop_Return_Error (N); \ +} case RC_INTERNAL_APPLY_VAL: Internal_Apply_Val: - STACK_REF (STACK_ENV_FUNCTION) = Val; + STACK_REF (STACK_ENV_FUNCTION) = val_register; case RC_INTERNAL_APPLY: Internal_Apply: @@ -1383,7 +1364,7 @@ Pop_Return_Non_Trapping: while(--nargs >= 0) *scan++ = (STACK_POP ()); Free = scan; - (Registers[REGBLOCK_ENV]) = temp; + env_register = temp; Reduces_To(FAST_MEMORY_REF (Function, LAMBDA_SCODE)); } } @@ -1395,7 +1376,7 @@ Pop_Return_Non_Trapping: { Apply_Error(ERR_WRONG_NUMBER_OF_ARGUMENTS); } - Val = (STACK_REF (STACK_ENV_FIRST_ARG)); + val_register = (STACK_REF (STACK_ENV_FIRST_ARG)); Our_Throw(0, Function); Apply_Stacklet_Backout(); Our_Throw_Part_2(); @@ -1434,12 +1415,12 @@ Pop_Return_Non_Trapping: } sp_register = (STACK_LOC (STACK_ENV_FIRST_ARG)); - (Registers[REGBLOCK_EXPR]) = Function; - APPLY_PRIMITIVE_FROM_INTERPRETER (Val, Function); + exp_register = Function; + APPLY_PRIMITIVE_FROM_INTERPRETER (val_register, Function); POP_PRIMITIVE_FRAME (nargs); if (Must_Report_References()) { - (Registers[REGBLOCK_EXPR]) = Val; + exp_register = val_register; Store_Return(RC_RESTORE_VALUE); Save_Cont(); Call_Future_Logging(); @@ -1532,7 +1513,7 @@ Pop_Return_Non_Trapping: } Free = scan; - (Registers[REGBLOCK_ENV]) = temp; + env_register = temp; Reduces_To(Get_Body_Elambda(lambda)); } @@ -1596,9 +1577,8 @@ Pop_Return_Non_Trapping: */ execute_compiled_backout (); - Val - = (OBJECT_NEW_TYPE - (TC_COMPILED_ENTRY, (Registers[REGBLOCK_EXPR]))); + val_register + = (OBJECT_NEW_TYPE (TC_COMPILED_ENTRY, exp_register)); Pop_Return_Error (Which_Way); } @@ -1609,7 +1589,7 @@ Pop_Return_Non_Trapping: in a system without compiler support. */ - (Registers[REGBLOCK_EXPR]) = SHARP_F; + exp_register = SHARP_F; Store_Return (RC_REENTER_COMPILED_CODE); Pop_Return_Error (Which_Way); } @@ -1627,7 +1607,7 @@ Pop_Return_Non_Trapping: } /* End of RC_INTERNAL_APPLY case */ case RC_MOVE_TO_ADJACENT_POINT: - /* Expression contains the space in which we are moving */ + /* exp_register contains the space in which we are moving */ { long From_Count; SCHEME_OBJECT Thunk, New_Location; @@ -1676,11 +1656,9 @@ Pop_Return_Non_Trapping: Save_Cont (); } } - if ((Registers[REGBLOCK_EXPR]) != SHARP_F) + if (exp_register != SHARP_F) { - MEMORY_SET ((Registers[REGBLOCK_EXPR]), - STATE_SPACE_NEAREST_POINT, - New_Location); + MEMORY_SET (exp_register, STATE_SPACE_NEAREST_POINT, New_Location); } else { @@ -1696,20 +1674,20 @@ Pop_Return_Non_Trapping: case RC_INVOKE_STACK_THREAD: /* Used for WITH_THREADED_STACK primitive */ Will_Push(3); - STACK_PUSH (Val); /* Value calculated by thunk */ - STACK_PUSH (Registers[REGBLOCK_EXPR]); + STACK_PUSH (val_register); /* Value calculated by thunk */ + STACK_PUSH (exp_register); STACK_PUSH (STACK_FRAME_HEADER+1); Pushed(); goto Internal_Apply; case RC_JOIN_STACKLETS: - Our_Throw(1, (Registers[REGBLOCK_EXPR])); + Our_Throw (1, exp_register); Join_Stacklet_Backout(); Our_Throw_Part_2(); break; case RC_NORMAL_GC_DONE: - Val = (Registers[REGBLOCK_EXPR]); + val_register = exp_register; if (GC_Space_Needed < 0) { /* Paranoia */ @@ -1725,10 +1703,9 @@ Pop_Return_Non_Trapping: case RC_PCOMB1_APPLY: End_Subproblem(); - STACK_PUSH (Val); /* Argument value */ + STACK_PUSH (val_register); /* Argument value */ Finished_Eventual_Pushing(CONTINUATION_SIZE + STACK_ENV_FIRST_ARG); - (Registers[REGBLOCK_EXPR]) - = (FAST_MEMORY_REF ((Registers[REGBLOCK_EXPR]), PCOMB1_FN_SLOT)); + exp_register = (FAST_MEMORY_REF (exp_register, PCOMB1_FN_SLOT)); Primitive_Internal_Apply: if (Microcode_Does_Stepping && @@ -1740,10 +1717,10 @@ Pop_Return_Non_Trapping: We may have a non-contiguous frame. -- Jinx */ Will_Push(3); - STACK_PUSH (Registers[REGBLOCK_EXPR]); + STACK_PUSH (exp_register); STACK_PUSH (Fetch_Apply_Trapper()); STACK_PUSH (STACK_FRAME_HEADER + 1 + - PRIMITIVE_N_PARAMETERS(Registers[REGBLOCK_EXPR])); + PRIMITIVE_N_PARAMETERS(exp_register)); Pushed(); Stop_Trapping(); goto Apply_Non_Trapping; @@ -1759,12 +1736,12 @@ Pop_Return_Non_Trapping: */ { - SCHEME_OBJECT primitive = (Registers[REGBLOCK_EXPR]); - APPLY_PRIMITIVE_FROM_INTERPRETER (Val, primitive); + SCHEME_OBJECT primitive = exp_register; + APPLY_PRIMITIVE_FROM_INTERPRETER (val_register, primitive); POP_PRIMITIVE_FRAME (PRIMITIVE_ARITY (primitive)); if (Must_Report_References ()) { - (Registers[REGBLOCK_EXPR]) = Val; + exp_register = val_register; Store_Return (RC_RESTORE_VALUE); Save_Cont (); Call_Future_Logging (); @@ -1774,61 +1751,59 @@ Pop_Return_Non_Trapping: case RC_PCOMB2_APPLY: End_Subproblem(); - STACK_PUSH (Val); /* Value of arg. 1 */ + STACK_PUSH (val_register); /* Value of arg. 1 */ Finished_Eventual_Pushing(CONTINUATION_SIZE + STACK_ENV_FIRST_ARG); - (Registers[REGBLOCK_EXPR]) - = (FAST_MEMORY_REF ((Registers[REGBLOCK_EXPR]), PCOMB2_FN_SLOT)); + exp_register = (FAST_MEMORY_REF (exp_register, PCOMB2_FN_SLOT)); goto Primitive_Internal_Apply; case RC_PCOMB2_DO_1: - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); - STACK_PUSH (Val); /* Save value of arg. 2 */ + env_register = (STACK_POP ()); + STACK_PUSH (val_register); /* Save value of arg. 2 */ Do_Another_Then(RC_PCOMB2_APPLY, PCOMB2_ARG_1_SLOT); case RC_PCOMB3_APPLY: End_Subproblem(); - STACK_PUSH (Val); /* Save value of arg. 1 */ + STACK_PUSH (val_register); /* Save value of arg. 1 */ Finished_Eventual_Pushing(CONTINUATION_SIZE + STACK_ENV_FIRST_ARG); - (Registers[REGBLOCK_EXPR]) - = (FAST_MEMORY_REF ((Registers[REGBLOCK_EXPR]), PCOMB3_FN_SLOT)); + exp_register = (FAST_MEMORY_REF (exp_register, PCOMB3_FN_SLOT)); goto Primitive_Internal_Apply; case RC_PCOMB3_DO_1: { SCHEME_OBJECT Temp; - Temp = (STACK_POP ()); /* Value of arg. 3 */ - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); - STACK_PUSH (Temp); /* Save arg. 3 again */ - STACK_PUSH (Val); /* Save arg. 2 */ + Temp = (STACK_POP ()); /* Value of arg. 3 */ + env_register = (STACK_POP ()); + STACK_PUSH (Temp); /* Save arg. 3 again */ + STACK_PUSH (val_register); /* Save arg. 2 */ Do_Another_Then(RC_PCOMB3_APPLY, PCOMB3_ARG_1_SLOT); } case RC_PCOMB3_DO_2: - (Registers[REGBLOCK_ENV]) = (STACK_REF (0)); - STACK_PUSH (Val); /* Save value of arg. 3 */ + env_register = (STACK_REF (0)); + STACK_PUSH (val_register); /* Save value of arg. 3 */ Do_Another_Then(RC_PCOMB3_DO_1, PCOMB3_ARG_2_SLOT); case RC_POP_RETURN_ERROR: case RC_RESTORE_VALUE: - Val = (Registers[REGBLOCK_EXPR]); + val_register = exp_register; break; case RC_PRIMITIVE_CONTINUE: - Val = (continue_primitive ()); + val_register = (continue_primitive ()); break; case RC_REPEAT_DISPATCH: - Which_Way = (FIXNUM_TO_LONG (Registers[REGBLOCK_EXPR])); - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); - Val = (STACK_POP ()); + Which_Way = (FIXNUM_TO_LONG (exp_register)); + env_register = (STACK_POP ()); + val_register = (STACK_POP ()); Restore_Cont(); goto Repeat_Dispatch; /* The following two return codes are both used to restore a saved history object. The difference is that the first does not copy the history object while the second does. - In both cases, the Expression register contains the history + In both cases, the exp_register contains the history object and the next item to be popped off the stack contains the offset back to the previous restore history return code. @@ -1841,7 +1816,7 @@ Pop_Return_Non_Trapping: Prev_Restore_History_Offset = OBJECT_DATUM (STACK_POP ()); Stacklet = (STACK_POP ()); - history_register = OBJECT_ADDRESS (Registers[REGBLOCK_EXPR]); + history_register = OBJECT_ADDRESS (exp_register); if (Prev_Restore_History_Offset == 0) { Prev_Restore_History_Stacklet = NULL; @@ -1861,11 +1836,11 @@ Pop_Return_Non_Trapping: { SCHEME_OBJECT Stacklet; - if (! Restore_History(Registers[REGBLOCK_EXPR])) + if (! Restore_History(exp_register)) { Save_Cont(); Will_Push(CONTINUATION_SIZE); - (Registers[REGBLOCK_EXPR]) = Val; + exp_register = val_register; Store_Return(RC_RESTORE_VALUE); Save_Cont(); Pushed(); @@ -1894,17 +1869,17 @@ Pop_Return_Non_Trapping: } case RC_RESTORE_FLUIDS: - Fluid_Bindings = (Registers[REGBLOCK_EXPR]); + Fluid_Bindings = exp_register; break; case RC_RESTORE_INT_MASK: - SET_INTERRUPT_MASK (UNSIGNED_FIXNUM_TO_LONG (Registers[REGBLOCK_EXPR])); + SET_INTERRUPT_MASK (UNSIGNED_FIXNUM_TO_LONG (exp_register)); if (GC_Check (0)) Request_GC (0); if ((PENDING_INTERRUPTS ()) != 0) { Store_Return (RC_RESTORE_VALUE); - (Registers[REGBLOCK_EXPR]) = Val; + exp_register = val_register; Save_Cont (); Interrupt (PENDING_INTERRUPTS ()); } @@ -1912,17 +1887,17 @@ Pop_Return_Non_Trapping: case RC_STACK_MARKER: /* Frame consists of the return code followed by two objects. - The first object has already been popped into the Expression - register, so just pop the second argument. */ + The first object has already been popped into exp_register, + so just pop the second argument. */ sp_register = (STACK_LOCATIVE_OFFSET (sp_register, 1)); break; case RC_RESTORE_TO_STATE_POINT: { - SCHEME_OBJECT Where_To_Go = (Registers[REGBLOCK_EXPR]); + SCHEME_OBJECT Where_To_Go = exp_register; Will_Push(CONTINUATION_SIZE); - /* Restore the contents of Val after moving to point */ - (Registers[REGBLOCK_EXPR]) = Val; + /* Restore the contents of val_register after moving to point */ + exp_register = val_register; Store_Return(RC_RESTORE_VALUE); Save_Cont(); Pushed(); @@ -1932,27 +1907,27 @@ Pop_Return_Non_Trapping: case RC_SEQ_2_DO_2: End_Subproblem(); - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); + env_register = (STACK_POP ()); Reduces_To_Nth(SEQUENCE_2); case RC_SEQ_3_DO_2: - (Registers[REGBLOCK_ENV]) = (STACK_REF (0)); + env_register = (STACK_REF (0)); Do_Another_Then(RC_SEQ_3_DO_3, SEQUENCE_2); case RC_SEQ_3_DO_3: End_Subproblem(); - (Registers[REGBLOCK_ENV]) = (STACK_POP ()); + env_register = (STACK_POP ()); Reduces_To_Nth(SEQUENCE_3); case RC_SNAP_NEED_THUNK: /* Don't snap thunk twice; evaluation of the thunk's body might have snapped it already. */ - if ((MEMORY_REF ((Registers[REGBLOCK_EXPR]), THUNK_SNAPPED)) == SHARP_T) - Val = (MEMORY_REF ((Registers[REGBLOCK_EXPR]), THUNK_VALUE)); + if ((MEMORY_REF (exp_register, THUNK_SNAPPED)) == SHARP_T) + val_register = (MEMORY_REF (exp_register, THUNK_VALUE)); else { - MEMORY_SET ((Registers[REGBLOCK_EXPR]), THUNK_SNAPPED, SHARP_T); - MEMORY_SET ((Registers[REGBLOCK_EXPR]), THUNK_VALUE, Val); + MEMORY_SET (exp_register, THUNK_SNAPPED, SHARP_T); + MEMORY_SET (exp_register, THUNK_VALUE, val_register); } break; diff --git a/v7/src/microcode/interp.h b/v7/src/microcode/interp.h index e715d9642..679451f03 100644 --- a/v7/src/microcode/interp.h +++ b/v7/src/microcode/interp.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: interp.h,v 9.45 2002/07/02 19:03:44 cph Exp $ +$Id: interp.h,v 9.46 2002/07/02 20:50:08 cph Exp $ Copyright (c) 1987-1999, 2002 Massachusetts Institute of Technology @@ -27,36 +27,25 @@ extern int EXFUN (abort_to_interpreter_argument, (void)); #define Regs Registers -#define Env (Registers[REGBLOCK_ENV]) -#define Val (Registers[REGBLOCK_VAL]) -#define Expression (Registers[REGBLOCK_EXPR]) -#define Return (Registers[REGBLOCK_RETURN]) +#define env_register (Registers[REGBLOCK_ENV]) +#define val_register (Registers[REGBLOCK_VAL]) +#define exp_register (Registers[REGBLOCK_EXPR]) +#define ret_register (Registers[REGBLOCK_RETURN]) -/* Fetch from register */ - -#define Fetch_Expression() (Registers[REGBLOCK_EXPR]) -#define Fetch_Env() (Registers[REGBLOCK_ENV]) -#define Fetch_Return() (Registers[REGBLOCK_RETURN]) - -/* Store into register */ - -#define Store_Expression(P) (Registers[REGBLOCK_EXPR]) = (P) -#define Store_Env(P) (Registers[REGBLOCK_ENV]) = (P) -#define Store_Return(P) \ - (Registers[REGBLOCK_RETURN]) = (MAKE_OBJECT (TC_RETURN_CODE, (P))) +#define Store_Return(P) ret_register = (MAKE_OBJECT (TC_RETURN_CODE, (P))) /* Note: Save_Cont must match the definitions in sdata.h */ #define Save_Cont() \ { \ - STACK_PUSH (Registers[REGBLOCK_EXPR]); \ - STACK_PUSH (Registers[REGBLOCK_RETURN]); \ + STACK_PUSH (exp_register); \ + STACK_PUSH (ret_register); \ } #define Restore_Cont() \ { \ - Registers[REGBLOCK_RETURN] = (STACK_POP ()); \ - Registers[REGBLOCK_EXPR] = (STACK_POP ()); \ + ret_register = (STACK_POP ()); \ + exp_register = (STACK_POP ()); \ } #define Stop_Trapping() Trapping = 0 diff --git a/v7/src/microcode/liarc.h b/v7/src/microcode/liarc.h index fe40167eb..c46f305ca 100644 --- a/v7/src/microcode/liarc.h +++ b/v7/src/microcode/liarc.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: liarc.h,v 1.17 2002/07/02 18:38:34 cph Exp $ +$Id: liarc.h,v 1.18 2002/07/02 20:50:13 cph Exp $ Copyright (c) 1992-2002 Massachusetts Institute of Technology @@ -142,7 +142,7 @@ typedef union machine_word_u machine_word; #ifdef USE_GLOBAL_VARIABLES -#define Rvl Val +#define Rvl val_register #define Rhp Free #define Rrb Regs #define Rsp sp_register @@ -158,7 +158,7 @@ typedef union machine_word_u machine_word; #define Rrb Regs #define DECLARE_VARIABLES() \ -REGISTER SCHEME_OBJECT Rvl = Val; \ +REGISTER SCHEME_OBJECT Rvl = val_register; \ REGISTER SCHEME_OBJECT * Rhp = Free; \ REGISTER SCHEME_OBJECT * Rsp = sp_register @@ -166,12 +166,12 @@ REGISTER SCHEME_OBJECT * Rsp = sp_register { \ sp_register = Rsp; \ Free = Rhp; \ - Val = Rvl; \ + val_register = Rvl; \ } while (0) #define CACHE_VARIABLES() do \ { \ - Rvl = Val; \ + Rvl = val_register; \ Rhp = Free; \ Rsp = sp_register; \ } while (0) @@ -201,7 +201,7 @@ REGISTER SCHEME_OBJECT * Rsp = sp_register SCHEME_OBJECT * destination; \ \ UNCACHE_VARIABLES (); \ - PRIMITIVE_APPLY (Val, primitive); \ + PRIMITIVE_APPLY (val_register, primitive); \ POP_PRIMITIVE_FRAME (primitive_nargs); \ destination = (OBJECT_ADDRESS (STACK_POP ())); \ CACHE_VARIABLES (); \ diff --git a/v7/src/microcode/memmag.c b/v7/src/microcode/memmag.c index 520016215..fd86655df 100644 --- a/v7/src/microcode/memmag.c +++ b/v7/src/microcode/memmag.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: memmag.c,v 9.68 2002/07/02 19:03:49 cph Exp $ +$Id: memmag.c,v 9.69 2002/07/02 20:50:18 cph Exp $ Copyright (c) 1987-2000, 2002 Massachusetts Institute of Technology @@ -644,7 +644,7 @@ DEFINE_PRIMITIVE ("GARBAGE-COLLECT", Prim_garbage_collect, 1, 1, 0) Will_Push (CONTINUATION_SIZE); Store_Return (RC_NORMAL_GC_DONE); - Store_Expression (LONG_TO_UNSIGNED_FIXNUM (MemTop - Free)); + exp_register = (LONG_TO_UNSIGNED_FIXNUM (MemTop - Free)); Save_Cont (); Pushed (); diff --git a/v7/src/microcode/nttrap.c b/v7/src/microcode/nttrap.c index a4321461b..c1450aea6 100644 --- a/v7/src/microcode/nttrap.c +++ b/v7/src/microcode/nttrap.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: nttrap.c,v 1.21 2002/07/02 19:03:55 cph Exp $ +$Id: nttrap.c,v 1.22 2002/07/02 20:50:23 cph Exp $ Copyright (c) 1992-2002 Massachusetts Institute of Technology @@ -518,7 +518,7 @@ DEFUN (setup_trap_frame, (code, context, trinfo, new_stack_pointer), STACK_PUSH (trap_code); STACK_PUSH (trap_name); Store_Return (RC_HARDWARE_TRAP); - Store_Expression (long_to_integer (code)); + exp_register = (long_to_integer (code)); Save_Cont (); Pushed (); if (stack_recovered_p diff --git a/v7/src/microcode/os2xcpt.c b/v7/src/microcode/os2xcpt.c index eab7ff4e8..b4274bd5a 100644 --- a/v7/src/microcode/os2xcpt.c +++ b/v7/src/microcode/os2xcpt.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: os2xcpt.c,v 1.11 2002/07/02 19:04:01 cph Exp $ +$Id: os2xcpt.c,v 1.12 2002/07/02 20:50:28 cph Exp $ Copyright (c) 1994-2002 Massachusetts Institute of Technology @@ -759,7 +759,7 @@ setup_trap_frame (PEXCEPTIONREPORTRECORD report, INITIALIZE_STACK (); Will_Push (CONTINUATION_SIZE); Store_Return (RC_END_OF_COMPUTATION); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Save_Cont (); Pushed (); } @@ -780,7 +780,7 @@ setup_trap_frame (PEXCEPTIONREPORTRECORD report, STACK_PUSH (long_to_integer (report -> ExceptionNum)); STACK_PUSH (trap_name); Store_Return (RC_HARDWARE_TRAP); - Store_Expression (UNSPECIFIC); + exp_register = UNSPECIFIC; Save_Cont (); Pushed (); diff --git a/v7/src/microcode/prims.h b/v7/src/microcode/prims.h index 16eb9dd8d..26969f9a9 100644 --- a/v7/src/microcode/prims.h +++ b/v7/src/microcode/prims.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: prims.h,v 9.48 2001/03/08 17:03:32 cph Exp $ +$Id: prims.h,v 9.49 2002/07/02 20:50:33 cph Exp $ -Copyright (c) 1987-2001 Massachusetts Institute of Technology +Copyright (c) 1987-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. */ /* This file contains some macros for defining primitives, @@ -40,7 +41,7 @@ SCHEME_OBJECT DEFUN_VOID (fn_name) /* Primitives should have this as their first statement. */ #ifdef ENABLE_PRIMITIVE_PROFILING -#define PRIMITIVE_HEADER(n_args) record_primitive_entry (Fetch_Expression ()) +#define PRIMITIVE_HEADER(n_args) record_primitive_entry (exp_register) #else #define PRIMITIVE_HEADER(n_args) {} #endif diff --git a/v7/src/microcode/prmcon.c b/v7/src/microcode/prmcon.c index a82eea083..ad9cad1b7 100644 --- a/v7/src/microcode/prmcon.c +++ b/v7/src/microcode/prmcon.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: prmcon.c,v 1.3 1999/01/02 06:11:34 cph Exp $ +$Id: prmcon.c,v 1.4 2002/07/02 20:50:38 cph Exp $ -Copyright (c) 1990-1999 Massachusetts Institute of Technology +Copyright (c) 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. */ #define SCM_PRMCON_C @@ -62,7 +63,7 @@ DEFUN (suspend_primitive, STACK_PUSH (reentry_record[i]); } STACK_PUSH (LONG_TO_UNSIGNED_FIXNUM (reentry_record_length)); - Store_Expression (LONG_TO_UNSIGNED_FIXNUM ((long) continuation)); + exp_register = (LONG_TO_UNSIGNED_FIXNUM ((long) continuation)); Store_Return (RC_PRIMITIVE_CONTINUE); Save_Cont (); Pushed (); @@ -77,10 +78,10 @@ DEFUN_VOID (continue_primitive) int continuation, record_length; SCHEME_OBJECT primitive, *buffer, result; - continuation = ((int) (UNSIGNED_FIXNUM_TO_LONG (Fetch_Expression ()))); + continuation = ((int) (UNSIGNED_FIXNUM_TO_LONG (exp_register))); if (continuation > CONT_MAX_INDEX) { - Store_Expression (LONG_TO_UNSIGNED_FIXNUM ((long) continuation)); + exp_register = (LONG_TO_UNSIGNED_FIXNUM ((long) continuation)); Store_Return (RC_PRIMITIVE_CONTINUE); Save_Cont (); immediate_error (ERR_UNKNOWN_PRIMITIVE_CONTINUATION); @@ -91,7 +92,7 @@ DEFUN_VOID (continue_primitive) { Request_GC (record_length); STACK_PUSH (LONG_TO_UNSIGNED_FIXNUM ((long) record_length)); - Store_Expression (LONG_TO_UNSIGNED_FIXNUM ((long) continuation)); + exp_register = (LONG_TO_UNSIGNED_FIXNUM ((long) continuation)); Store_Return (RC_PRIMITIVE_CONTINUE); Save_Cont (); immediate_interrupt (); @@ -132,7 +133,7 @@ DEFUN_VOID (continue_primitive) } Regs[REGBLOCK_LEXPR_ACTUALS] = ((SCHEME_OBJECT) nargs); } - Store_Expression (primitive); + exp_register = primitive; Regs[REGBLOCK_PRIMITIVE] = primitive; result = (*(continuation_procedures[continuation]))(buffer); Regs[REGBLOCK_PRIMITIVE] = SHARP_F; diff --git a/v7/src/microcode/purify.c b/v7/src/microcode/purify.c index f927fa21b..8875c52ef 100644 --- a/v7/src/microcode/purify.c +++ b/v7/src/microcode/purify.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: purify.c,v 9.62 2002/07/02 19:04:07 cph Exp $ +$Id: purify.c,v 9.63 2002/07/02 20:50:43 cph Exp $ Copyright (c) 1988-1999, 2001, 2002 Massachusetts Institute of Technology @@ -517,7 +517,7 @@ DEFINE_PRIMITIVE ("PRIMITIVE-PURIFY", Prim_primitive_purify, 3, 3, 0) Will_Push (CONTINUATION_SIZE); Store_Return (RC_NORMAL_GC_DONE); - Store_Expression (result); + exp_register = result; Save_Cont (); Pushed (); diff --git a/v7/src/microcode/returns.h b/v7/src/microcode/returns.h index 076ea9600..b7497fa07 100644 --- a/v7/src/microcode/returns.h +++ b/v7/src/microcode/returns.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: returns.h,v 9.42 1999/01/02 06:06:43 cph Exp $ +$Id: returns.h,v 9.43 2002/07/02 20:50:48 cph Exp $ -Copyright (c) 1987-1999 Massachusetts Institute of Technology +Copyright (c) 1987-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,10 +16,11 @@ 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. */ -/* Return codes. These are placed in Return when an +/* Return codes. These are placed in ret_register when an interpreter operation needs to operate in several phases. */ #define RC_END_OF_COMPUTATION 0x00 diff --git a/v7/src/microcode/stack.h b/v7/src/microcode/stack.h index 17b085e9b..6a1183fea 100644 --- a/v7/src/microcode/stack.h +++ b/v7/src/microcode/stack.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: stack.h,v 9.41 2002/07/02 19:04:13 cph Exp $ +$Id: stack.h,v 9.42 2002/07/02 20:50:53 cph Exp $ Copyright (c) 1987-1999, 2002 Massachusetts Institute of Technology @@ -128,10 +128,10 @@ USA. #define Apply_Stacklet_Backout() \ Will_Push((2 * CONTINUATION_SIZE) + (STACK_ENV_EXTRA_SLOTS + 2)); \ - Store_Expression(SHARP_F); \ + exp_register = SHARP_F; \ Store_Return(RC_END_OF_COMPUTATION); \ Save_Cont(); \ - STACK_PUSH (Val); \ + STACK_PUSH (val_register); \ STACK_PUSH (Previous_Stacklet); \ STACK_PUSH (STACK_FRAME_HEADER + 1); \ Store_Return(RC_INTERNAL_APPLY); \ @@ -151,11 +151,11 @@ Pushed() { \ SCHEME_OBJECT Old_Expression; \ \ - Old_Expression = Fetch_Expression(); \ - Store_Expression(Previous_Stacklet); \ + Old_Expression = exp_register; \ + exp_register = Previous_Stacklet; \ Store_Return(RC_JOIN_STACKLETS); \ Save_Cont(); \ - Store_Expression(Old_Expression); \ + exp_register = Old_Expression; \ } /* Our_Throw is used in chaining from one stacklet to another. In diff --git a/v7/src/microcode/step.c b/v7/src/microcode/step.c index c741d1614..80e16fdb4 100644 --- a/v7/src/microcode/step.c +++ b/v7/src/microcode/step.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: step.c,v 9.35 2002/07/02 18:39:09 cph Exp $ +$Id: step.c,v 9.36 2002/07/02 20:50:58 cph Exp $ Copyright (c) 1987-1999, 2002 Massachusetts Institute of Technology @@ -68,8 +68,8 @@ DEFINE_PRIMITIVE ("PRIMITIVE-EVAL-STEP", Prim_eval_step, 3, 3, 0) PRIMITIVE_CANONICALIZE_CONTEXT (); POP_PRIMITIVE_FRAME (3); Install_Traps (hooks); - Store_Expression (expression); - Store_Env (environment); + exp_register = expression; + env_register = environment; } PRIMITIVE_ABORT (PRIM_NO_TRAP_EVAL); /*NOTREACHED*/ @@ -149,7 +149,7 @@ DEFINE_PRIMITIVE ("PRIMITIVE-RETURN-STEP", Prim_return_step, 2, 2, 0) POP_PRIMITIVE_FRAME (2); Install_Traps (hooks); - Val = (value); + val_register = value; PRIMITIVE_ABORT (PRIM_NO_TRAP_POP_RETURN); PRIMITIVE_RETURN (UNSPECIFIC); } diff --git a/v7/src/microcode/term.c b/v7/src/microcode/term.c index 57a536e6f..1ea9574f4 100644 --- a/v7/src/microcode/term.c +++ b/v7/src/microcode/term.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: term.c,v 1.15 2000/12/05 21:23:48 cph Exp $ +$Id: term.c,v 1.16 2002/07/02 20:51:04 cph Exp $ -Copyright (c) 1990-2000 Massachusetts Institute of Technology +Copyright (c) 1990-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. */ #include "scheme.h" @@ -83,14 +84,14 @@ DEFUN (attempt_termination_backout, (code), int code) + STACK_ENV_EXTRA_SLOTS + ((code == TERM_NO_ERROR_HANDLER) ? 5 : 4)); Store_Return (RC_HALT); - Store_Expression (LONG_TO_UNSIGNED_FIXNUM (code)); + exp_register = (LONG_TO_UNSIGNED_FIXNUM (code)); Save_Cont (); if (code == TERM_NO_ERROR_HANDLER) STACK_PUSH (LONG_TO_UNSIGNED_FIXNUM (death_blow)); - STACK_PUSH (Val); /* Arg 3 */ - STACK_PUSH (Fetch_Env ()); /* Arg 2 */ - STACK_PUSH (Fetch_Expression ()); /* Arg 1 */ - STACK_PUSH (Handler); /* The handler function */ + STACK_PUSH (val_register); /* Arg 3 */ + STACK_PUSH (env_register); /* Arg 2 */ + STACK_PUSH (exp_register); /* Arg 1 */ + STACK_PUSH (Handler); /* The handler function */ STACK_PUSH (STACK_FRAME_HEADER + ((code == TERM_NO_ERROR_HANDLER) ? 4 : 3)); Pushed (); @@ -188,7 +189,7 @@ void DEFUN_VOID (termination_end_of_computation) { termination_prefix (TERM_END_OF_COMPUTATION); - Print_Expression (Val, "Final result"); + Print_Expression (val_register, "Final result"); outf_console("\n"); termination_suffix (TERM_END_OF_COMPUTATION, 0, 0); } diff --git a/v7/src/microcode/utils.c b/v7/src/microcode/utils.c index 5975900fc..337e42623 100644 --- a/v7/src/microcode/utils.c +++ b/v7/src/microcode/utils.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: utils.c,v 9.81 2002/07/02 19:04:19 cph Exp $ +$Id: utils.c,v 9.82 2002/07/02 20:51:09 cph Exp $ Copyright (c) 1987-2002 Massachusetts Institute of Technology @@ -220,7 +220,7 @@ DEFUN_VOID (preserve_interrupt_mask) { Will_Push (CONTINUATION_SIZE); Store_Return (RC_RESTORE_INT_MASK); - Store_Expression (LONG_TO_FIXNUM (FETCH_INTERRUPT_MASK ())); + exp_register = (LONG_TO_FIXNUM (FETCH_INTERRUPT_MASK ())); Save_Cont (); Pushed (); return; @@ -251,10 +251,10 @@ DEFUN_VOID (back_out_of_primitive_internal) compiler_apply_procedure (nargs); STACK_PUSH (primitive); STACK_PUSH (STACK_FRAME_HEADER + nargs); - Store_Env (THE_NULL_ENV); - Val = SHARP_F; + env_register = THE_NULL_ENV; + val_register = SHARP_F; Store_Return (RC_INTERNAL_APPLY); - Store_Expression (SHARP_F); + exp_register = SHARP_F; (Regs [REGBLOCK_PRIMITIVE]) = SHARP_F; return; } @@ -553,9 +553,9 @@ DEFUN (Do_Micro_Error, (Err, From_Pop_Return), if (Consistency_Check) { err_print(Err, error_output); - Print_Expression(Fetch_Expression(), "Expression was"); + Print_Expression(exp_register, "Expression was"); outf_error ("\nEnvironment 0x%lx (#%lo).\n", - ((long) (Fetch_Env ())), ((long) (Fetch_Env ()))); + ((long) exp_register), ((long) env_register)); Print_Return("Return code"); outf_error ("\n"); } @@ -598,9 +598,9 @@ DEFUN (Do_Micro_Error, (Err, From_Pop_Return), Will_Push (CONTINUATION_SIZE + (From_Pop_Return ? 0 : 1)); if (From_Pop_Return) - Store_Expression (Val); + exp_register = val_register; else - STACK_PUSH (Fetch_Env ()); + STACK_PUSH (env_register); Store_Return ((From_Pop_Return) ? RC_POP_RETURN_ERROR : RC_EVAL_ERROR); @@ -695,15 +695,15 @@ DEFUN_VOID (Stop_History) SCHEME_OBJECT Saved_Expression; long Saved_Return_Code; - Saved_Expression = Fetch_Expression(); - Saved_Return_Code = Fetch_Return(); + Saved_Expression = exp_register; + Saved_Return_Code = ret_register; Will_Push(HISTORY_SIZE); Save_History(RC_RESTORE_DONT_COPY_HISTORY); Pushed(); Prev_Restore_History_Stacklet = NULL; Prev_Restore_History_Offset = ((Get_End_Of_Stacklet() - sp_register) + CONTINUATION_RETURN_CODE); - Store_Expression(Saved_Expression); + exp_register = Saved_Expression; Store_Return(Saved_Return_Code); return; } @@ -930,15 +930,15 @@ DEFUN (Allocate_New_Stacklet, (N), long N) &New_Stacklet[1 + (OBJECT_DATUM (New_Stacklet[STACKLET_LENGTH]))]; SET_STACK_GUARD (& (New_Stacklet[STACKLET_HEADER_SIZE])); } - Old_Expression = Fetch_Expression(); - Old_Return = Fetch_Return(); - Store_Expression(MAKE_POINTER_OBJECT (TC_CONTROL_POINT, Old_Stacklet)); + Old_Expression = exp_register; + Old_Return = ret_register; + exp_register = (MAKE_POINTER_OBJECT (TC_CONTROL_POINT, Old_Stacklet)); Store_Return(RC_JOIN_STACKLETS); /* Will_Push omitted because size calculation includes enough room. */ Save_Cont(); - Store_Expression(Old_Expression); + exp_register = Old_Expression; Store_Return(Old_Return); return; } @@ -1062,7 +1062,7 @@ DEFUN (Translate_To_Point, (Target), SCHEME_OBJECT Target) STACK_PUSH (Target); STACK_PUSH (LONG_TO_UNSIGNED_FIXNUM((From_Depth - Merge_Depth))); STACK_PUSH (Current_Location); - Store_Expression(State_Space); + exp_register = State_Space; Store_Return(RC_MOVE_TO_ADJACENT_POINT); Save_Cont(); Pushed(); @@ -1130,7 +1130,7 @@ DEFUN (C_call_scheme, (proc, nargs, argvec), long i; Store_Return (RC_END_OF_COMPUTATION); - Store_Expression (primitive); + exp_register = primitive; Save_Cont (); for (i = nargs; --i >= 0; ) @@ -1139,7 +1139,7 @@ DEFUN (C_call_scheme, (proc, nargs, argvec), STACK_PUSH (STACK_FRAME_HEADER + nargs); Store_Return (RC_INTERNAL_APPLY); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Save_Cont (); } Pushed (); diff --git a/v7/src/microcode/uxtrap.c b/v7/src/microcode/uxtrap.c index f824a84ca..9e3303218 100644 --- a/v7/src/microcode/uxtrap.c +++ b/v7/src/microcode/uxtrap.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: uxtrap.c,v 1.33 2002/07/02 19:04:25 cph Exp $ +$Id: uxtrap.c,v 1.34 2002/07/02 20:51:14 cph Exp $ Copyright (c) 1990-2002 Massachusetts Institute of Technology @@ -315,7 +315,7 @@ DEFUN (setup_trap_frame, (signo, info, scp, trinfo, new_stack_pointer), INITIALIZE_STACK (); Will_Push (CONTINUATION_SIZE); Store_Return (RC_END_OF_COMPUTATION); - Store_Expression (SHARP_F); + exp_register = SHARP_F; Save_Cont (); Pushed (); } @@ -330,7 +330,7 @@ DEFUN (setup_trap_frame, (signo, info, scp, trinfo, new_stack_pointer), STACK_PUSH (signal_code); STACK_PUSH (signal_name); Store_Return (RC_HARDWARE_TRAP); - Store_Expression (long_to_integer (signo)); + exp_register = (long_to_integer (signo)); Save_Cont (); Pushed (); if (stack_recovered_p -- 2.25.1