/* -*-C-*-
-$Id: bchmmg.c,v 9.98 2000/12/05 21:34:56 cph Exp $
+$Id: bchmmg.c,v 9.99 2002/07/02 18:37:33 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
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.
*/
/* Memory management top level. Garbage collection to disk. */
DEFUN (initialize_weak_pair_transport, (limit), SCHEME_OBJECT * limit)
{
Weak_Chain = EMPTY_WEAK_CHAIN;
- weak_pair_stack_ptr = Stack_Pointer;
+ weak_pair_stack_ptr = sp_register;
weak_pair_stack_limit = (limit + 1); /* in case it's odd */
return;
}
chain = Weak_Chain;
initialize_new_space_buffer (chain, low_heap);
- limit = Stack_Pointer;
+ limit = sp_register;
for (ptr = weak_pair_stack_ptr; ptr < limit ; ptr += 2)
*ptr = (update_weak_pointer (*ptr, low_heap));
void
DEFUN_VOID (fix_weak_chain_2)
{
- fast SCHEME_OBJECT * ptr, * limit, new_car, * addr;
+ SCHEME_OBJECT * ptr, * limit, new_car, * addr;
- limit = Stack_Pointer;
+ limit = sp_register;
for (ptr = weak_pair_stack_ptr; ptr < limit ; )
{
new_car = *ptr++;
/* -*-C-*-
-$Id: bkpt.c,v 9.30 1999/01/02 06:11:34 cph Exp $
+$Id: bkpt.c,v 9.31 2002/07/02 18:37:39 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
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 breakpoint utilities.
void
DEFUN_VOID (Handle_Pop_Return_Break)
{
- SCHEME_OBJECT *Old_Stack = Stack_Pointer;
+ SCHEME_OBJECT *Old_Stack = sp_register;
- printf ("Pop Return Break: SP = 0x%lx\n", ((long) Stack_Pointer));
+ printf ("Pop Return Break: SP = 0x%lx\n", ((long) sp_register));
(void) (Print_One_Continuation_Frame (Return));
- Stack_Pointer = Old_Stack;
+ sp_register = Old_Stack;
return;
}
void
DEFUN_VOID (Pop_Return_Break_Point)
{
- fast SCHEME_OBJECT *SP = Stack_Pointer;
- fast sp_record_list previous = &One_Before;
- fast sp_record_list this = previous->next; /* = SP_List */
+ SCHEME_OBJECT * SP = sp_register;
+ sp_record_list previous = &One_Before;
+ sp_record_list this = previous->next; /* = SP_List */
for ( ;
this != sp_nil;
/* -*-C-*-
-$Id: boot.c,v 9.105 2001/07/31 03:10:57 cph Exp $
+$Id: boot.c,v 9.106 2002/07/02 18:37:45 cph Exp $
-Copyright (c) 1988-2001 Massachusetts Institute of Technology
+Copyright (c) 1988-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
Store_Expression (expr);
/* Go to it! */
- if ((Stack_Pointer <= Stack_Guard) || (Free > MemTop))
+ if ((sp_register <= Stack_Guard) || (Free > MemTop))
{
outf_fatal ("Configuration won't hold initial data.\n");
termination_init_error ();
/* -*-C-*-
-$Id: cmpint.c,v 1.95 2001/12/16 06:01:32 cph Exp $
+$Id: cmpint.c,v 1.96 2002/07/02 18:37:52 cph Exp $
-Copyright (c) 1989-2001 Massachusetts Institute of Technology
+Copyright (c) 1989-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
gap_location = STACK_LOC (delta);
source_location = STACK_LOC (0);
- Stack_Pointer = gap_location;
+ sp_register = gap_location;
while ((--nactuals) > 0)
{
STACK_LOCATIVE_POP (gap_location) = STACK_LOCATIVE_POP (source_location);
(STACK_LOCATIVE_PUSH (gap_location)) =
(STACK_LOCATIVE_PUSH (source_location));
}
- Stack_Pointer = gap_location;
+ sp_register = gap_location;
return (PRIM_DONE);
}
}
if (result == PRIM_DONE)
{
STACK_PUSH (procedure);
- Stack_Pointer = (STACK_LOC (- arity));
+ sp_register = (STACK_LOC (- arity));
return (SHARP_F);
}
else
STACK_PUSH (FIXNUM_ZERO + REFLECT_CODE_INTERNAL_APPLY);
STACK_PUSH (reflect_to_interface);
- Stack_Pointer = (STACK_LOC (- arity));
+ sp_register = (STACK_LOC (- arity));
return (SHARP_F);
}
\f
STACK_PUSH (reflect_to_interface);
}
- Stack_Pointer = (STACK_LOC (- 2));
+ sp_register = (STACK_LOC (- 2));
return (SHARP_F);
}
STACK_PUSH (reflect_to_interface);
}
- Stack_Pointer = (STACK_LOC (- 3));
+ sp_register = (STACK_LOC (- 3));
return (SHARP_F);
}
\f
/* Discard name, env. and nargs */
- Stack_Pointer = (STACK_LOC (3));
+ sp_register = (STACK_LOC (3));
old_trampoline = (OBJECT_ADDRESS (STACK_POP ()));
code_block = ((TRAMPOLINE_STORAGE (old_trampoline))[1]);
offset = (OBJECT_DATUM ((TRAMPOLINE_STORAGE (old_trampoline))[2]));
{ \
if (Free >= MemTop) \
Request_GC (Free - MemTop); \
- if (Stack_Pointer <= Stack_Guard) \
+ if (sp_register <= Stack_Guard) \
REQUEST_INTERRUPT (INT_Stack_Overflow); \
}
STACK_PUSH (FIXNUM_ZERO + REFLECT_CODE_CC_BKPT);
STACK_PUSH (reflect_to_interface);
- Stack_Pointer = (STACK_LOC (- BKPT_PROCEED_FRAME_SIZE));
+ sp_register = (STACK_LOC (- BKPT_PROCEED_FRAME_SIZE));
return (SHARP_F);
}
#endif /* HAVE_BKPT_SUPPORT */
else
state = Val;
- stack_ptr = (MAKE_POINTER_OBJECT (TC_STACK_ENVIRONMENT, Stack_Pointer));
+ stack_ptr = (MAKE_POINTER_OBJECT (TC_STACK_ENVIRONMENT, sp_register));
STACK_PUSH (state); /* state to preserve */
STACK_PUSH (stack_ptr); /* "Environment" pointer */
STACK_PUSH (entry_point); /* argument to handler */
STACK_PUSH (entry_point); /* return address */
- stack_ptr = (MAKE_POINTER_OBJECT (TC_STACK_ENVIRONMENT, Stack_Pointer));
+ stack_ptr = (MAKE_POINTER_OBJECT (TC_STACK_ENVIRONMENT, sp_register));
STACK_PUSH (SHARP_F); /* state to preserve */
STACK_PUSH (stack_ptr); /* "Environment" pointer */
STACK_PUSH (entry_point); /* argument to handler */
/* -*-C-*-
-$Id: cmpint.h,v 10.7 2000/12/05 21:23:43 cph Exp $
+$Id: cmpint.h,v 10.8 2002/07/02 18:37:58 cph Exp $
-Copyright (c) 1987-1990, 1999, 2000 Massachusetts Institute of Technology
+Copyright (c) 1987-1990, 1999, 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
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.
*/
/* Macros for the interface between compiled code and interpreted code. */
#define With_Stack_Gap(Gap_Size, Gap_Position, Code) \
{ \
- fast long size_to_move = (Gap_Position); \
- fast SCHEME_OBJECT * Destination = (STACK_LOC (- (Gap_Size))); \
+ long size_to_move = (Gap_Position); \
+ SCHEME_OBJECT * Destination = (STACK_LOC (- (Gap_Size))); \
SCHEME_OBJECT * Saved_Destination = Destination; \
while ((--size_to_move) >= 0) \
(STACK_LOCATIVE_POP (Destination)) = (STACK_POP ()); \
Code; \
- Stack_Pointer = Saved_Destination; \
+ sp_register = Saved_Destination; \
}
/* Close_Stack_Gap closes a gap Gap_Size wide Gap_Position cells above the
#define Close_Stack_Gap(Gap_Size, Gap_Position, extra_code) \
{ \
- fast long size_to_move; \
- fast SCHEME_OBJECT *Source; \
+ long size_to_move; \
+ SCHEME_OBJECT *Source; \
\
size_to_move = (Gap_Position); \
Source = (STACK_LOC (size_to_move)); \
- Stack_Pointer = (STACK_LOC ((Gap_Size) + size_to_move)); \
+ sp_register = (STACK_LOC ((Gap_Size) + size_to_move)); \
extra_code; \
while (--size_to_move >= 0) \
{ \
/* -*-C-*-
-$Id: debug.c,v 9.53 2001/07/31 03:11:17 cph Exp $
+$Id: debug.c,v 9.54 2002/07/02 18:38:03 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
((OBJECT_DATUM (Temp)) == RC_HALT))
return (true);
if ((OBJECT_DATUM (Temp)) == RC_JOIN_STACKLETS)
- Stack_Pointer = (Previous_Stack_Pointer (Expr));
+ sp_register = (Previous_Stack_Pointer (Expr));
return (false);
}
SCHEME_OBJECT Temp, * Old_Stack;
Back_Trace_Entry_Hook();
- Old_Stack = Stack_Pointer;
+ Old_Stack = sp_register;
while (true)
{
if ((STACK_LOCATIVE_DIFFERENCE (Stack_Top, (STACK_LOC (0)))) <= 0)
print_expression (stream, Temp, " ...");
if ((OBJECT_TYPE (Temp)) == TC_MANIFEST_NM_VECTOR)
{
- Stack_Pointer = (STACK_LOC (- ((long) (OBJECT_DATUM (Temp)))));
+ sp_register = (STACK_LOC (- ((long) (OBJECT_DATUM (Temp)))));
outf (stream, " (skipping)");
}
outf (stream, "\n");
}
}
- Stack_Pointer = Old_Stack;
+ sp_register = Old_Stack;
Back_Trace_Exit_Hook();
outf_flush (stream);
- return;
}
void
DEFUN (print_stack, (sp), SCHEME_OBJECT * sp)
{
- SCHEME_OBJECT * saved_sp;
-
- saved_sp = Stack_Pointer;
- Stack_Pointer = sp;
+ SCHEME_OBJECT * saved_sp = sp_register;
+ sp_register = sp;
Back_Trace (console_output);
- Stack_Pointer = saved_sp;
- return;
+ sp_register = saved_sp;
}
extern void
/* -*-C-*-
-$Id: default.h,v 9.44 2000/12/05 21:23:44 cph Exp $
+$Id: default.h,v 9.45 2002/07/02 18:38:11 cph Exp $
-Copyright (c) 1988-2000 Massachusetts Institute of Technology
+Copyright (c) 1988-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
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 default definitions for some hooks which
#ifndef INITIALIZE_STACK
#define INITIALIZE_STACK() do \
{ \
- Stack_Pointer = Stack_Top; \
+ sp_register = Stack_Top; \
SET_STACK_GUARD (Stack_Bottom + STACK_GUARD_SIZE); \
* Stack_Bottom \
= (MAKE_POINTER_OBJECT (TC_BROKEN_HEART, Stack_Bottom)); \
#endif
#ifndef CONSTANT_AREA_END
-#define CONSTANT_AREA_END() Free_Constant
+#define CONSTANT_AREA_END() Free_Constant
#endif
#ifndef CONSTANT_AREA_START
-#define CONSTANT_AREA_START() Stack_Pointer
+#define CONSTANT_AREA_START() sp_register
#endif /* CONSTANT_AREA_START */
#ifndef SEAL_CONSTANT_SPACE
/* -*-C-*-
-$Id: fasload.c,v 9.91 2001/12/16 06:01:32 cph Exp $
+$Id: fasload.c,v 9.92 2002/07/02 18:38:16 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
Free_Constant = mp->free_constant;
Constant_Space = mp->constant_space;
Constant_Top = mp->constant_top;
- Stack_Pointer = mp->stack_pointer;
+ sp_register = mp->stack_pointer;
Stack_Bottom = mp->stack_bottom;
Stack_Top = mp->stack_top;
Stack_Guard = mp->stack_guard;
mp->free_constant = Free_Constant;
mp->constant_space = Constant_Space;
mp->constant_top = Constant_Top;
- mp->stack_pointer = Stack_Pointer;
+ mp->stack_pointer = sp_register;
mp->stack_bottom = Stack_Bottom;
mp->stack_top = Stack_Top;
mp->stack_guard = Stack_Guard;
/* -*-C-*-
-$Id: hooks.c,v 9.60 2001/07/31 03:11:31 cph Exp $
+$Id: hooks.c,v 9.61 2002/07/02 18:38:22 cph Exp $
-Copyright (c) 1988-2001 Massachusetts Institute of Technology
+Copyright (c) 1988-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
#else
/* Don't use Will_Push for this -- if the length of the list is too
large to fit on the stack, it could cause Scheme to terminate. */
- if ((Stack_Pointer - (number_of_args + STACK_ENV_EXTRA_SLOTS + 1))
+ if ((sp_register - (number_of_args + STACK_ENV_EXTRA_SLOTS + 1))
<= Stack_Guard)
error_bad_range_arg (2);
POP_PRIMITIVE_FRAME (2);
TOUCH_IN_PRIMITIVE ((PAIR_CDR (scan_list)), scan_list);
}
}
- Stack_Pointer = (STACK_LOC (- number_of_args));
+ sp_register = (STACK_LOC (- number_of_args));
STACK_PUSH (procedure);
STACK_PUSH (STACK_FRAME_HEADER + number_of_args);
#ifdef USE_STACKLETS
#else /* not USE_STACKLETS */
#define CWCC_STACK_SIZE() \
- ((Stack_Top - Stack_Pointer) + STACKLET_HEADER_SIZE \
+ ((Stack_Top - sp_register) + STACKLET_HEADER_SIZE \
+ CONTINUATION_SIZE + HISTORY_SIZE)
/* When there are no stacklets, the two versions of CWCC are identical. */
}
#else /* not USE_STACKLETS */
{
- fast long n_words = (Stack_Top - Stack_Pointer);
+ fast long n_words = (Stack_Top - sp_register);
control_point = (allocate_marked_vector
(TC_CONTROL_POINT,
(n_words + (STACKLET_HEADER_SIZE - 1)),
while ((n_words--) > 0)
(*scan++) = (STACK_POP ());
}
- if (Consistency_Check && (Stack_Pointer != Stack_Top))
+ if (Consistency_Check && (sp_register != Stack_Top))
Microcode_Termination (TERM_BAD_STACK);
CLEAR_INTERRUPT (INT_Stack_Overflow);
STACK_RESET ();
thunk = (ARG_REF (2));
/* This KNOWS the direction of stack growth. */
- Stack_Pointer = (Get_End_Of_Stacklet ());
+ sp_register = (Get_End_Of_Stacklet ());
/* We've discarded the history with the stack contents. */
Prev_Restore_History_Stacklet = NULL;
Prev_Restore_History_Offset = 0;
/* -*-C-*-
-$Id: interp.h,v 9.43 2002/07/02 18:15:18 cph Exp $
+$Id: interp.h,v 9.44 2002/07/02 18:38:28 cph Exp $
Copyright (c) 1987-1999, 2002 Massachusetts Institute of Technology
extern int EXFUN (abort_to_interpreter_argument, (void));
\f
#define Regs Registers
-#define Stack_Pointer sp_register
#define History history_register
#define Env (Registers[REGBLOCK_ENV])
/* -*-C-*-
-$Id: liarc.h,v 1.16 2002/07/02 18:15:23 cph Exp $
+$Id: liarc.h,v 1.17 2002/07/02 18:38:34 cph Exp $
Copyright (c) 1992-2002 Massachusetts Institute of Technology
#define Rvl Val
#define Rhp Free
#define Rrb Regs
-#define Rsp Stack_Pointer
+#define Rsp sp_register
#define DECLARE_VARIABLES() int unsed_variable_to_keep_C_happy
#define UNCACHE_VARIABLES() do {} while (0)
#define DECLARE_VARIABLES() \
REGISTER SCHEME_OBJECT Rvl = Val; \
REGISTER SCHEME_OBJECT * Rhp = Free; \
-REGISTER SCHEME_OBJECT * Rsp = Stack_Pointer
+REGISTER SCHEME_OBJECT * Rsp = sp_register
#define UNCACHE_VARIABLES() do \
{ \
- Stack_Pointer = Rsp; \
+ sp_register = Rsp; \
Free = Rhp; \
Val = Rvl; \
} while (0)
{ \
Rvl = Val; \
Rhp = Free; \
- Rsp = Stack_Pointer; \
+ Rsp = sp_register; \
} while (0)
#endif /* USE_GLOBAL_VARIABLES */
/* -*-C-*-
-$Id: memmag.c,v 9.66 2000/12/05 21:23:45 cph Exp $
+$Id: memmag.c,v 9.67 2002/07/02 18:38:39 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
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.
*/
/* Memory management top level.
\f
#define CONSTANT_SPACE_FUDGE 128
-/* Initialize free pointers within areas. Stack_Pointer is
- special: it always points to a cell which is in use.
- */
+/* Initialize free pointers within areas. sp_register is
+ special: it always points to a cell that is in use. */
static long saved_heap_size, saved_constant_size, saved_stack_size;
extern void EXFUN (reset_allocator_parameters, (void));
/* -*-C-*-
-$Id: nttrap.c,v 1.19 2001/12/16 06:01:32 cph Exp $
+$Id: nttrap.c,v 1.20 2002/07/02 18:38:46 cph Exp $
-Copyright (c) 1992-2001 Massachusetts Institute of Technology
+Copyright (c) 1992-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
"\nContext contains floating-point registers."));
bufptr += (sprintf (bufptr, "\ncontext->Eip = 0x%lx.", context->Eip));
bufptr += (sprintf (bufptr, "\ncontext->Esp = 0x%lx.", context->Esp));
- bufptr += (sprintf (bufptr, "\nStack_Pointer = 0x%lx.", Stack_Pointer));
- bufptr += (sprintf (bufptr, "\nadj (Stack_Pointer) = 0x%lx.",
- (ADDR_TO_SCHEME_ADDR (Stack_Pointer))));
+ bufptr += (sprintf (bufptr, "\nsp_register = 0x%lx.", sp_register));
+ bufptr += (sprintf (bufptr, "\nadj (sp_register) = 0x%lx.",
+ (ADDR_TO_SCHEME_ADDR (sp_register))));
}
#endif /* W32_TRAP_DEBUG */
static int size;
static SCHEME_OBJECT * temp_stack_ptr, * new_sp;
- temp_stack_ptr = Stack_Pointer;
+ temp_stack_ptr = sp_register;
size = (temp_stack_limit - temp_stack_ptr);
IFVERBOSE (TellUserEx (MB_OKCANCEL, "WinntExceptionTransferHook."));
INITIALIZE_STACK ();
else
{
- Stack_Pointer = real_stack_pointer;
+ sp_register = real_stack_pointer;
Stack_Guard = real_stack_guard;
}
new_sp = (real_stack_pointer - size);
if (new_sp != temp_stack_ptr)
memcpy (new_sp, temp_stack_ptr, (size * (sizeof (SCHEME_OBJECT))));
- Stack_Pointer = new_sp;
+ sp_register = new_sp;
SET_INTERRUPT_MASK ((FETCH_INTERRUPT_MASK ()));
if (return_by_aborting)
abort_to_interpreter (PRIM_APPLY);
if (! stack_recovered_p)
INITIALIZE_STACK ();
clear_real_stack = FALSE;
- real_stack_pointer = Stack_Pointer;
+ real_stack_pointer = sp_register;
real_stack_guard = Stack_Guard;
- temp_stack_limit = Stack_Pointer;
+ temp_stack_limit = sp_register;
}
else
{
real_stack_pointer = new_stack_pointer;
real_stack_guard = Stack_Guard;
temp_stack_limit = temp_stack_end;
- Stack_Pointer = temp_stack_end;
+ sp_register = temp_stack_end;
Stack_Guard = temp_stack;
}
\f
IFVERBOSE
(TellUserEx
(MB_OKCANCEL,
- "continue_from_trap: SS = C DS; Stack_Pointer = 0x%lx; Esp = 0x%lx.",
- Stack_Pointer, context->Esp));
+ "continue_from_trap: SS = C DS; sp_register = 0x%lx; Esp = 0x%lx.",
+ sp_register, context->Esp));
scheme_sp = (context->Esp);
}
else
(scheme_sp_valid
? ((SCHEME_OBJECT *) scheme_sp)
: ((pc_in_C
- && (Stack_Pointer < Stack_Top)
- && (Stack_Pointer > Stack_Bottom))
- ? Stack_Pointer
+ && (sp_register < Stack_Top)
+ && (sp_register > Stack_Bottom))
+ ? sp_register
: ((SCHEME_OBJECT *) 0)));
\f
IFVERBOSE (TellUserEx (MB_OKCANCEL, "continue_from_trap 3"));
/* -*-C-*-
-$Id: os2xcpt.c,v 1.9 2001/12/16 06:01:32 cph Exp $
+$Id: os2xcpt.c,v 1.10 2002/07/02 18:38:52 cph Exp $
-Copyright (c) 1994-2001 Massachusetts Institute of Technology
+Copyright (c) 1994-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
case pc_in_utility:
case pc_in_primitive:
case pc_in_c:
- new_sp = Stack_Pointer;
+ new_sp = sp_register;
break;
default:
new_sp = 0;
/* Make sure the stack is correctly initialized. */
if (new_sp != 0)
- Stack_Pointer = new_sp;
+ sp_register = new_sp;
else
{
INITIALIZE_STACK ();
/* -*-C-*-
-$Id: sdata.h,v 9.39 2001/12/21 04:36:11 cph Exp $
+$Id: sdata.h,v 9.40 2002/07/02 18:38:57 cph Exp $
-Copyright (c) 1987-1989, 1999, 2001 Massachusetts Institute of Technology
+Copyright (c) 1987-1989, 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
| | ... |\
| | not yet in use -- garbage | > m
n < _______________________________________/
- | | Top of Stack, useful contents | <---Stack_Pointer
+ | | Top of Stack, useful contents | <---sp_register
| _______________________________________
\ | ... |
\ | useful stuff |
/* -*-C-*-
-$Id: stack.h,v 9.39 2002/07/02 18:15:28 cph Exp $
+$Id: stack.h,v 9.40 2002/07/02 18:39:04 cph Exp $
Copyright (c) 1987-1999, 2002 Massachusetts Institute of Technology
*Free = \
(MAKE_OBJECT (TC_MANIFEST_VECTOR, (Default_Stacklet_Size - 1))); \
Free += Default_Stacklet_Size; \
- Stack_Pointer = Free; \
+ sp_register = Free; \
Free_Stacklets = NULL; \
Prev_Restore_History_Stacklet = NULL; \
Prev_Restore_History_Offset = 0; \
#define Internal_Will_Push(N) \
{ \
- if ((Stack_Pointer - (N)) < Stack_Guard) \
+ if ((sp_register - (N)) < Stack_Guard) \
{ \
Allocate_New_Stacklet((N)); \
} \
{ \
Current_Stacklet[STACKLET_REUSE_FLAG] = SHARP_T; \
Current_Stacklet[STACKLET_UNUSED_LENGTH] = \
- MAKE_OBJECT (TC_MANIFEST_NM_VECTOR, (Stack_Pointer - Stack_Guard)); \
+ MAKE_OBJECT (TC_MANIFEST_NM_VECTOR, (sp_register - Stack_Guard)); \
}
\f
#ifdef ENABLE_DEBUGGING_TOOLS
#define Terminate_Old_Stacklet() \
{ \
- if (Stack_Pointer < Stack_Guard) \
+ if (sp_register < Stack_Guard) \
{ \
- outf_fatal ("\nStack_Pointer: 0x%lx, Guard: 0x%lx\n", \
- ((long) Stack_Pointer), ((long) Stack_Guard)); \
+ outf_fatal ("\nsp_register: 0x%lx, Guard: 0x%lx\n", \
+ ((long) sp_register), ((long) Stack_Guard)); \
Microcode_Termination(TERM_EXIT); \
} \
Internal_Terminate_Old_Stacklet(); \
\
Our_Where = (Where); \
SET_STACK_GUARD (MEMORY_LOC (Our_Where, STACKLET_HEADER_SIZE)); \
- Stack_Pointer = Previous_Stack_Pointer(Our_Where); \
+ sp_register = Previous_Stack_Pointer(Our_Where); \
}
#define STACKLET_SLACK (STACKLET_HEADER_SIZE + CONTINUATION_SIZE)
\
Free_Stacklets = \
((SCHEME_OBJECT *) Free_Stacklets[STACKLET_FREE_LIST_LINK]); \
- Stack_Pointer = Get_End_Of_Stacklet(); \
+ sp_register = Get_End_Of_Stacklet(); \
Prev_Restore_History_Stacklet = NULL; \
Prev_Restore_History_Offset = 0
OBJECT_DATUM (Old_Stacklet_Top[STACKLET_UNUSED_LENGTH]) + \
STACKLET_HEADER_SIZE; \
temp += Unused_Length; \
- Stack_Pointer = temp; \
+ sp_register = temp; \
Used_Length = \
(OBJECT_DATUM (Old_Stacklet_Top[STACKLET_LENGTH]) - \
Unused_Length) + 1; \
} \
} while (0)
-#define Internal_Will_Push(N) Stack_Check(Stack_Pointer - (N))
+#define Internal_Will_Push(N) Stack_Check(sp_register - (N))
#define Terminate_Old_Stacklet()
To_Where = (Stack_Top - valid); \
From_Where = MEMORY_LOC (Control_Point, invalid); \
Stack_Check (To_Where); \
- Stack_Pointer = To_Where; \
+ sp_register = To_Where; \
while (--valid >= 0) \
*To_Where++ = *From_Where++; \
if (Consistency_Check) \
/* -*-C-*-
-$Id: step.c,v 9.34 1999/01/02 06:11:34 cph Exp $
+$Id: step.c,v 9.35 2002/07/02 18:39:09 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
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.
*/
/* Support for the stepper */
fast SCHEME_OBJECT scan_list;
fast long i;
Will_Push (number_of_args + STACK_ENV_EXTRA_SLOTS + 1);
- Stack_Pointer = scan_stack;
+ sp_register = scan_stack;
TOUCH_IN_PRIMITIVE (argument_list, scan_list);
for (i = number_of_args; (i > 0); i -= 1)
{
/* -*-C-*-
-$Id: sysprim.c,v 9.47 2000/12/05 21:23:48 cph Exp $
+$Id: sysprim.c,v 9.48 2002/07/02 18:39:15 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
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.
*/
/* Random system primitives. Most are implemented in terms of
heap_high = Heap_Top;
#ifndef USE_STACKLETS
stack_low = Stack_Bottom;
- stack_free = Stack_Pointer;
+ stack_free = sp_register;
stack_limit = Stack_Guard;
stack_high = Stack_Top;
#endif /* USE_STACKLETS */
/* -*-C-*-
-$Id: utils.c,v 9.79 2001/07/31 03:12:15 cph Exp $
+$Id: utils.c,v 9.80 2002/07/02 18:39:20 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
Save_History(RC_RESTORE_DONT_COPY_HISTORY);
Pushed();
Prev_Restore_History_Stacklet = NULL;
- Prev_Restore_History_Offset = ((Get_End_Of_Stacklet() - Stack_Pointer) +
+ Prev_Restore_History_Offset = ((Get_End_Of_Stacklet() - sp_register) +
CONTINUATION_RETURN_CODE);
Store_Expression(Saved_Expression);
Store_Return(Saved_Return_Code);
if (Primitive_Debug)
Print_Primitive (primitive);
{
- SCHEME_OBJECT * saved_stack = Stack_Pointer;
+ SCHEME_OBJECT * saved_stack = sp_register;
PRIMITIVE_APPLY_INTERNAL (result, primitive);
- if (saved_stack != Stack_Pointer)
+ if (saved_stack != sp_register)
{
int arity = (PRIMITIVE_N_ARGUMENTS (primitive));
Print_Expression (primitive, "Stack bad after ");
outf_fatal ("\nStack was 0x%lx, now 0x%lx, #args=%ld.\n",
- ((long) saved_stack), ((long) Stack_Pointer), ((long) arity));
+ ((long) saved_stack), ((long) sp_register), ((long) arity));
Microcode_Termination (TERM_EXIT);
}
}
Free[STACKLET_LENGTH] = MAKE_OBJECT (TC_MANIFEST_VECTOR, (size - 1));
SET_STACK_GUARD (& (Free[STACKLET_HEADER_SIZE]));
Free += size;
- Stack_Pointer = Free;
+ sp_register = Free;
}
else
{
New_Stacklet = Free_Stacklets;
Free_Stacklets =
((SCHEME_OBJECT *) Free_Stacklets[STACKLET_FREE_LIST_LINK]);
- Stack_Pointer =
+ sp_register =
&New_Stacklet[1 + (OBJECT_DATUM (New_Stacklet[STACKLET_LENGTH]))];
SET_STACK_GUARD (& (New_Stacklet[STACKLET_HEADER_SIZE]));
}
if (! (PRIMITIVE_P (primitive)))
abort_to_interpreter (ERR_CANNOT_RECURSE);
/*NOTREACHED*/
- sp = Stack_Pointer;
+ sp = sp_register;
\f
Will_Push ((2 * CONTINUATION_SIZE) + (nargs + STACK_ENV_EXTRA_SLOTS + 1));
{
Pushed ();
result = (Re_Enter_Interpreter ());
- if (Stack_Pointer != sp)
+ if (sp_register != sp)
signal_error_from_primitive (ERR_STACK_HAS_SLIPPED);
/*NOTREACHED*/
/* -*-C-*-
-$Id: uxtrap.c,v 1.31 2001/12/16 06:01:33 cph Exp $
+$Id: uxtrap.c,v 1.32 2002/07/02 18:39:27 cph Exp $
-Copyright (c) 1990-2001 Massachusetts Institute of Technology
+Copyright (c) 1990-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
Pushed ();
}
else
- Stack_Pointer = new_stack_pointer;
+ sp_register = new_stack_pointer;
Will_Push (7 + CONTINUATION_SIZE);
STACK_PUSH (trinfo -> extra_trap_info);
STACK_PUSH (trinfo -> pc_info_2);
{
struct trap_recovery_info trinfo;
SCHEME_OBJECT * new_stack_pointer =
- (((Stack_Pointer <= Stack_Top) && (Stack_Pointer > Stack_Guard))
- ? Stack_Pointer
+ (((sp_register <= Stack_Top) && (sp_register > Stack_Guard))
+ ? sp_register
: 0);
if ((Regs[REGBLOCK_PRIMITIVE]) != SHARP_F)
{
new_stack_pointer =
(scheme_sp_valid
? ((SCHEME_OBJECT *) scheme_sp)
- : (pc_in_C && (Stack_Pointer < Stack_Top)
- && (Stack_Pointer > Stack_Bottom))
- ? Stack_Pointer
+ : (pc_in_C && (sp_register < Stack_Top)
+ && (sp_register > Stack_Bottom))
+ ? sp_register
: ((SCHEME_OBJECT *) 0));
\f
if (pc_in_hyper_space || (pc_in_scheme && ALLOW_ONLY_C))
/* -*-C-*-
-$Id: xdebug.c,v 9.34 2000/12/05 21:23:49 cph Exp $
+$Id: xdebug.c,v 9.35 2002/07/02 18:39:33 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
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 primitives to debug memory management. */
Find_Mode, print_p, store_p);
#ifndef USE_STACKLETS
n += Find_In_Area("the Stack",
- Stack_Pointer, Stack_Top, Obj,
+ sp_register, Stack_Top, Obj,
Find_Mode, print_p, store_p);
#endif
if (print_p)