reference it for stack-overflow checks.
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpint.c,v 1.46 1992/06/11 18:51:35 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpint.c,v 1.47 1992/07/29 19:54:49 cph Exp $
-Copyright (c) 1989-1992 Massachusetts Institute of Technology
+Copyright (c) 1989-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
long ignore_1 AND long ignore_2 AND long ignore_3 AND long ignore_4)
{
TEST_GC_NEEDED();
- if ((PENDING_INTERRUPTS()) == 0)
+ if (((PENDING_INTERRUPTS()) == 0) && (Stack_Pointer > Stack_Guard))
{
SCHEME_OBJECT entry_point;
SCHEME_OBJECT state)
{
TEST_GC_NEEDED();
- if ((PENDING_INTERRUPTS()) == 0)
+ if (((PENDING_INTERRUPTS()) == 0) && (Stack_Pointer > Stack_Guard))
{
Store_Env (state);
Val = state;
/* -*-C-*-
-Copyright (c) 1987-1991 Massachusetts Institute of Technology
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/const.h,v 9.40 1992/07/29 19:54:52 cph Exp $
+
+Copyright (c) 1987-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
promotional, or sales literature without prior written consent from
MIT in each case. */
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/const.h,v 9.39 1991/07/24 02:26:55 cph Exp $
- *
- * Named constants used throughout the interpreter
- *
- */
+/* Named constants used throughout the interpreter */
\f
#if (CHAR_BIT != 8)
#define MAX_CHAR ((1<<CHAR_BIT)-1)
#define REGBLOCK_PRIMITIVE 8
#define REGBLOCK_CLOSURE_FREE 9 /* For use by compiler */
#define REGBLOCK_CLOSURE_SPACE 10 /* For use by compiler */
-#define REGBLOCK_MINIMUM_LENGTH 11
+#define REGBLOCK_STACK_GUARD 11
+#define REGBLOCK_MINIMUM_LENGTH 12
\f
/* Codes specifying how to start scheme at boot time. */
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/extern.h,v 9.44 1992/02/03 23:26:46 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/extern.h,v 9.45 1992/07/29 19:54:52 cph Exp $
Copyright (c) 1987-92 Massachusetts Institute of Technology
* MemTop, /* Top of heap space available */
* Ext_Stack_Pointer, /* Next available slot in control stack */
* Stack_Top, /* Top of control stack */
- * Stack_Guard, /* Guard area at end of stack */
* Free_Stacklets, /* Free list of stacklets */
* Constant_Space, /* Bottom of constant+pure space */
* Free_Constant, /* Next free cell in constant+pure area */
/* -*-C-*-
-Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/gc.h,v 9.31 1992/07/29 19:54:53 cph Exp $
+
+Copyright (c) 1987-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
promotional, or sales literature without prior written consent from
MIT in each case. */
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/gc.h,v 9.30 1989/10/28 15:38:26 jinx Rel $
- *
+/*
* Garbage collection related macros of sufficient utility to be
* included in all compilations.
*/
#define Set_Stack_Guard(Addr) \
{ \
- Stack_Guard = Addr; \
+ (Regs[REGBLOCK_STACK_GUARD]) = ((SCHEME_OBJECT) (Addr)); \
}
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/interp.h,v 9.34 1991/07/18 15:59:41 markf Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/interp.h,v 9.35 1992/07/29 19:54:54 cph Exp $
-Copyright (c) 1987, 1988, 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1987-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
#define Val Regs[REGBLOCK_VAL]
#define Expression Regs[REGBLOCK_EXPR]
#define Return Regs[REGBLOCK_RETURN]
+#define Stack_Guard ((SCHEME_OBJECT *) (Regs[REGBLOCK_STACK_GUARD]))
\f
/* Internal_Will_Push is in stack.h. */
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/stack.h,v 9.30 1992/02/03 23:38:30 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/stack.h,v 9.31 1992/07/29 19:54:55 cph Exp $
-Copyright (c) 1987-1992 Massachusetts Institute of Technology
+Copyright (c) 1987-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
{ \
Microcode_Termination(TERM_STACK_ALLOCATION_FAILED); \
} \
- Stack_Guard = (Free + STACKLET_HEADER_SIZE); \
+ Set_Stack_Guard (Free + STACKLET_HEADER_SIZE); \
*Free = \
(MAKE_OBJECT (TC_MANIFEST_VECTOR, (Default_Stacklet_Size - 1))); \
Free += Default_Stacklet_Size; \
SCHEME_OBJECT Our_Where; \
\
Our_Where = (Where); \
- Stack_Guard = MEMORY_LOC (Our_Where, STACKLET_HEADER_SIZE); \
+ Set_Stack_Guard (MEMORY_LOC (Our_Where, STACKLET_HEADER_SIZE)); \
Stack_Pointer = Previous_Stack_Pointer(Our_Where); \
}
MEMORY_SET (Older_Stacklet, STACKLET_REUSE_FLAG, SHARP_F); \
} \
temp = Free; \
- Stack_Guard = &(temp[STACKLET_HEADER_SIZE]); \
+ Set_Stack_Guard (& (temp[STACKLET_HEADER_SIZE])); \
temp[STACKLET_LENGTH] = Old_Stacklet_Top[STACKLET_LENGTH]; \
Unused_Length = \
OBJECT_DATUM (Old_Stacklet_Top[STACKLET_UNUSED_LENGTH]) + \
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/storage.c,v 9.49 1992/07/28 14:44:37 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/storage.c,v 9.50 1992/07/29 19:54:55 cph Exp $
-Copyright (c) 1987-1992 Massachusetts Institute of Technology
+Copyright (c) 1987-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
* Free, /* Next free word in storage */
* Ext_Stack_Pointer, /* Next available slot in control stack */
* Stack_Top, /* Top of control stack */
- * Stack_Guard, /* Guard area at end of stack */
* Free_Stacklets, /* Free list of stacklets */
* Constant_Space, /* Bottom of constant+pure space */
* Free_Constant, /* Next free cell in constant+pure area */
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utils.c,v 9.52 1992/02/03 23:41:57 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utils.c,v 9.53 1992/07/29 19:54:56 cph Exp $
Copyright (c) 1987-92 Massachusetts Institute of Technology
}
}
Free[STACKLET_LENGTH] = MAKE_OBJECT (TC_MANIFEST_VECTOR, (size - 1));
- Stack_Guard = &(Free[STACKLET_HEADER_SIZE]);
+ Set_Stack_Guard (& (Free[STACKLET_HEADER_SIZE]));
Free += size;
Stack_Pointer = Free;
}
((SCHEME_OBJECT *) Free_Stacklets[STACKLET_FREE_LIST_LINK]);
Stack_Pointer =
&New_Stacklet[1 + (OBJECT_DATUM (New_Stacklet[STACKLET_LENGTH]))];
- Stack_Guard = &New_Stacklet[STACKLET_HEADER_SIZE];
+ Set_Stack_Guard (& (New_Stacklet[STACKLET_HEADER_SIZE]));
}
Old_Expression = Fetch_Expression();
Old_Return = Fetch_Return();
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.117 1992/07/20 20:12:30 arthur Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.118 1992/07/29 19:54:58 cph Exp $
-Copyright (c) 1988-1992 Massachusetts Institute of Technology
+Copyright (c) 1988-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
#define VERSION 11
#endif
#ifndef SUBVERSION
-#define SUBVERSION 117
+#define SUBVERSION 118
#endif
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/cmpint.c,v 1.46 1992/06/11 18:51:35 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/cmpint.c,v 1.47 1992/07/29 19:54:49 cph Exp $
-Copyright (c) 1989-1992 Massachusetts Institute of Technology
+Copyright (c) 1989-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
long ignore_1 AND long ignore_2 AND long ignore_3 AND long ignore_4)
{
TEST_GC_NEEDED();
- if ((PENDING_INTERRUPTS()) == 0)
+ if (((PENDING_INTERRUPTS()) == 0) && (Stack_Pointer > Stack_Guard))
{
SCHEME_OBJECT entry_point;
SCHEME_OBJECT state)
{
TEST_GC_NEEDED();
- if ((PENDING_INTERRUPTS()) == 0)
+ if (((PENDING_INTERRUPTS()) == 0) && (Stack_Pointer > Stack_Guard))
{
Store_Env (state);
Val = state;
/* -*-C-*-
-Copyright (c) 1987-1991 Massachusetts Institute of Technology
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/const.h,v 9.40 1992/07/29 19:54:52 cph Exp $
+
+Copyright (c) 1987-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
promotional, or sales literature without prior written consent from
MIT in each case. */
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/const.h,v 9.39 1991/07/24 02:26:55 cph Exp $
- *
- * Named constants used throughout the interpreter
- *
- */
+/* Named constants used throughout the interpreter */
\f
#if (CHAR_BIT != 8)
#define MAX_CHAR ((1<<CHAR_BIT)-1)
#define REGBLOCK_PRIMITIVE 8
#define REGBLOCK_CLOSURE_FREE 9 /* For use by compiler */
#define REGBLOCK_CLOSURE_SPACE 10 /* For use by compiler */
-#define REGBLOCK_MINIMUM_LENGTH 11
+#define REGBLOCK_STACK_GUARD 11
+#define REGBLOCK_MINIMUM_LENGTH 12
\f
/* Codes specifying how to start scheme at boot time. */
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.117 1992/07/20 20:12:30 arthur Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.118 1992/07/29 19:54:58 cph Exp $
-Copyright (c) 1988-1992 Massachusetts Institute of Technology
+Copyright (c) 1988-92 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
#define VERSION 11
#endif
#ifndef SUBVERSION
-#define SUBVERSION 117
+#define SUBVERSION 118
#endif