From 25b1d71e68a3be933820df9574cb7e6f754c1fdb Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Thu, 30 Nov 1989 03:04:15 +0000 Subject: [PATCH] Fix bug in boot.c by which GC_Reserve was set after MemTop was computed in Clear_Memory. GC_Reserve is now set by Clear_Memory. Rename Heap_In_Low_Memory to HEAP_IN_LOW_MEMORY. Clean up Spectrum stuff and remove previous version of the quad bit kludge which forced 8 bit type codes to be used. --- v7/src/microcode/bchmmg.c | 6 ++-- v7/src/microcode/boot.c | 26 ++++++++---------- v7/src/microcode/config.h | 56 ++++++++++++++++++-------------------- v7/src/microcode/dump.c | 6 ++-- v7/src/microcode/memmag.c | 6 ++-- v7/src/microcode/object.h | 31 ++++++++++++--------- v7/src/microcode/ppband.c | 4 +-- v7/src/microcode/psbmap.h | 4 +-- v7/src/microcode/storage.c | 4 +-- v7/src/microcode/version.h | 4 +-- v7/src/microcode/wsize.c | 4 +-- v8/src/microcode/object.h | 31 ++++++++++++--------- v8/src/microcode/ppband.c | 4 +-- v8/src/microcode/psbmap.h | 4 +-- v8/src/microcode/version.h | 4 +-- 15 files changed, 102 insertions(+), 92 deletions(-) diff --git a/v7/src/microcode/bchmmg.c b/v7/src/microcode/bchmmg.c index 9a01f5304..9a0c26938 100644 --- a/v7/src/microcode/bchmmg.c +++ b/v7/src/microcode/bchmmg.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchmmg.c,v 9.49 1989/11/02 04:01:56 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchmmg.c,v 9.50 1989/11/30 03:03:35 jinx Exp $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -198,6 +198,8 @@ void Clear_Memory (Our_Heap_Size, Our_Stack_Size, Our_Constant_Size) int Our_Heap_Size, Our_Stack_Size, Our_Constant_Size; { + GC_Reserve = 4500; + GC_Space_Needed = 0; Heap_Top = (Heap_Bottom + Our_Heap_Size); SET_MEMTOP(Heap_Top - GC_Reserve); Free = Heap_Bottom; @@ -259,7 +261,7 @@ Setup_Memory(Our_Heap_Size, Our_Stack_Size, Our_Constant_Size) fprintf(stderr, "Largest address does not fit in datum field of object.\n"); fprintf(stderr, - "Allocate less space or re-compile without Heap_In_Low_Memory.\n"); + "Allocate less space or re-configure without HEAP_IN_LOW_MEMORY.\n"); exit(1); } diff --git a/v7/src/microcode/boot.c b/v7/src/microcode/boot.c index dbf6346b6..ac26e99c1 100644 --- a/v7/src/microcode/boot.c +++ b/v7/src/microcode/boot.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/boot.c,v 9.59 1989/10/26 07:49:17 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/boot.c,v 9.60 1989/11/30 03:03:40 jinx Exp $ Copyright (c) 1988, 1989 Massachusetts Institute of Technology @@ -307,27 +307,27 @@ main (argc, argv) printf("Executable Scheme Image\n"); if (!supplied_p) { - printf("Scheme Microcode Version %d.%d\n", VERSION, SUBVERSION); - OS_initialize(true); - Enter_Interpreter(); + printf ("Scheme Microcode Version %d.%d\n", VERSION, SUBVERSION); + OS_initialize (true); + Enter_Interpreter (); } else { - Clear_Memory(blocks(Heap_Size), blocks(Stack_Size), - blocks(Constant_Size)); + Clear_Memory ((blocks (Heap_Size)), (blocks (Stack_Size)), + (blocks (Constant_Size))); /* We are reloading from scratch anyway. */ Was_Scheme_Dumped = false; - Start_Scheme((cold_load_p ? BOOT_FASLOAD : BOOT_LOAD_BAND), - file_name); + Start_Scheme ((cold_load_p ? BOOT_FASLOAD : BOOT_LOAD_BAND), + file_name); } } Command_Line_Hook(); - Setup_Memory(blocks(Heap_Size), blocks(Stack_Size), + Setup_Memory ((blocks(Heap_Size)), (blocks(Stack_Size)), blocks(Constant_Size)); - compiler_initialize((long) cold_load_p); - Start_Scheme((cold_load_p ? BOOT_FASLOAD : BOOT_LOAD_BAND), - file_name); + compiler_initialize ((long) cold_load_p); + Start_Scheme ((cold_load_p ? BOOT_FASLOAD : BOOT_LOAD_BAND), + file_name); } #define Default_Init_Fixed_Objects(Fixed_Objects) \ @@ -452,8 +452,6 @@ Start_Scheme(Start_Prim, File_Name) } Current_State_Point = SHARP_F; Fluid_Bindings = EMPTY_LIST; - GC_Reserve = 4500; - GC_Space_Needed = 0; Photo_Open = false; Init_Fixed_Objects (); } diff --git a/v7/src/microcode/config.h b/v7/src/microcode/config.h index e3edfe8e7..49fc669fb 100644 --- a/v7/src/microcode/config.h +++ b/v7/src/microcode/config.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/config.h,v 9.50 1989/10/26 07:49:33 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/config.h,v 9.51 1989/11/30 03:03:46 jinx Exp $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -162,7 +162,7 @@ typedef unsigned long SCHEME_OBJECT; constants directly rather than in terms of other constants. Similar things can be done for other word sizes. - Heap_In_Low_Memory should be defined if malloc returns the lowest + HEAP_IN_LOW_MEMORY should be defined if malloc returns the lowest available memory and thus all addresses will fit in the datum portion of a Scheme object. The datum portion of a Scheme object is 8 bits less than the length of a C long. @@ -226,7 +226,7 @@ typedef unsigned long SCHEME_OBJECT; #ifdef pdp10 #define MACHINE_TYPE "pdp10" -#define Heap_In_Low_Memory +#define HEAP_IN_LOW_MEMORY #define CHAR_BIT 36 / * Ugh! Supposedly fixed in newer Cs * / #define BELL '\007' #define FASL_INTERNAL_FORMAT FASL_PDP10 @@ -234,7 +234,7 @@ typedef unsigned long SCHEME_OBJECT; #ifdef nu #define MACHINE_TYPE "nu" -#define Heap_In_Low_Memory +#define HEAP_IN_LOW_MEMORY #define CHAR_BIT 8 #define USHORT_SIZE 16 #define ULONG_SIZE 32 @@ -258,7 +258,7 @@ typedef unsigned long SCHEME_OBJECT; /* Amazingly unix and vms agree on all these */ #define MACHINE_TYPE "vax" -#define Heap_In_Low_Memory +#define HEAP_IN_LOW_MEMORY #define UNSIGNED_SHIFT #define VAX_BYTE_ORDER #define CHAR_BIT 8 @@ -323,7 +323,7 @@ longjmp(Exit_Point, NORMAL_EXIT) #ifdef hp9000s200 /* and s300, pretty indistinguishable */ #define MACHINE_TYPE "hp9000s200" -#define Heap_In_Low_Memory +#define HEAP_IN_LOW_MEMORY #define UNSIGNED_SHIFT #define CHAR_BIT 8 #define USHORT_SIZE 16 @@ -347,7 +347,7 @@ longjmp(Exit_Point, NORMAL_EXIT) #ifdef hp9000s500 #define MACHINE_TYPE "hp9000s500" /* An unfortunate fact of life on this machine: - the C heap is in high memory thus Heap_In_Low_Memory is not + the C heap is in high memory thus HEAP_IN_LOW_MEMORY is not defined and the whole thing runs slowly. *Sigh* */ #define UNSIGNED_SHIFT @@ -371,7 +371,7 @@ longjmp(Exit_Point, NORMAL_EXIT) #endif #ifdef sun -#define Heap_In_Low_Memory +#define HEAP_IN_LOW_MEMORY #define UNSIGNED_SHIFT #define CHAR_BIT 8 #define USHORT_SIZE 16 @@ -407,7 +407,7 @@ longjmp(Exit_Point, NORMAL_EXIT) #ifdef butterfly #define MACHINE_TYPE "butterfly" -#define Heap_In_Low_Memory +#define HEAP_IN_LOW_MEMORY #define CHAR_BIT 8 #define USHORT_SIZE 16 #define ULONG_SIZE 32 @@ -425,7 +425,7 @@ longjmp(Exit_Point, NORMAL_EXIT) #ifdef cyber180 #define MACHINE_TYPE "cyber180" /* Word size is 64 bits. */ -#define Heap_In_Low_Memory +#define HEAP_IN_LOW_MEMORY #define CHAR_BIT 8 #define USHORT_SIZE ??? #define ULONG_SIZE ??? @@ -442,7 +442,7 @@ longjmp(Exit_Point, NORMAL_EXIT) #ifdef celerity #define MACHINE_TYPE "celerity" -#define Heap_In_Low_Memory +#define HEAP_IN_LOW_MEMORY #define UNSIGNED_SHIFT #define CHAR_BIT 8 #define USHORT_SIZE 16 @@ -470,31 +470,29 @@ longjmp(Exit_Point, NORMAL_EXIT) #define HAS_FREXP #define HAS_MODF -#ifndef AVOID_SPECTRUM_TC_KLUDGE +/* Heap resides in data space, pointed at by space register 5. + Short pointers must have their high two bits set to 01 so that + it is interpreted as space register 5, 2nd quadrant. -/* Heap resides in "Quad 1", and hence memory addresses have a 1 - in the second MSBit. This is kludged by the definitions below, and is - still considered Heap_In_Low_Memory. */ -#define Heap_In_Low_Memory + This is kludged by the definitions below, and is still considered + HEAP_IN_LOW_MEMORY. + */ -/* It must be at least one more than the minimum necessary, - and it may not work if it is not even. */ -#define TYPE_CODE_LENGTH 8 +#define HEAP_IN_LOW_MEMORY -/* Datum includes the quad tag, type doesn't. */ -#define TYPE_CODE_MASK 0x3F000000 -#define DATUM_MASK 0x40FFFFFF -#define OBJECT_MASKS_DEFINED +#define HPPA_QUAD_BIT 0x40000000 -/* Clear the quad tag if there */ -#define OBJECT_TYPE(object) (((object) >> DATUM_LENGTH) & 0x3F) +#define DATUM_TO_ADDRESS(datum) \ +((SCHEME_OBJECT *) (((unsigned long) (datum)) | HPPA_QUAD_BIT)) + +#define ADDRESS_TO_DATUM(address) \ +((SCHEME_OBJECT) (((unsigned long) (address)) & (~(HPPA_QUAD_BIT)))) -#endif /* AVOID_SPECTRUM_TC_KLUDGE */ #endif /* spectrum */ #ifdef umax #define MACHINE_TYPE "umax" -#define Heap_In_Low_Memory +#define HEAP_IN_LOW_MEMORY #define UNSIGNED_SHIFT #define VAX_BYTE_ORDER #define CHAR_BIT 8 @@ -513,7 +511,7 @@ longjmp(Exit_Point, NORMAL_EXIT) #ifdef pyr #define MACHINE_TYPE "pyramid" -#define Heap_In_Low_Memory +#define HEAP_IN_LOW_MEMORY #define UNSIGNED_SHIFT #define CHAR_BIT 8 #define USHORT_SIZE 16 @@ -527,7 +525,7 @@ longjmp(Exit_Point, NORMAL_EXIT) #ifdef alliant #define MACHINE_TYPE "alliant" -#define Heap_In_Low_Memory +#define HEAP_IN_LOW_MEMORY #define UNSIGNED_SHIFT #define CHAR_BIT 8 #define USHORT_SIZE 16 diff --git a/v7/src/microcode/dump.c b/v7/src/microcode/dump.c index 7b3b1212d..cdc8ce50c 100644 --- a/v7/src/microcode/dump.c +++ b/v7/src/microcode/dump.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/dump.c,v 9.29 1989/09/20 23:07:39 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/dump.c,v 9.30 1989/11/30 03:03:51 jinx Exp $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -55,9 +55,9 @@ prepare_dump_header(Buffer, Dumped_Object, #ifdef DEBUG -#ifndef Heap_In_Low_Memory +#ifndef HEAP_IN_LOW_MEMORY fprintf(stderr, "\nmemory_base = 0x%x\n", memory_base); -#endif /* Heap_In_Low_Memory */ +#endif /* HEAP_IN_LOW_MEMORY */ fprintf(stderr, "\nHeap_Relocation=0x%x, dumped as 0x%x\n", Heap_Relocation, diff --git a/v7/src/microcode/memmag.c b/v7/src/microcode/memmag.c index 733936e51..558a84d42 100644 --- a/v7/src/microcode/memmag.c +++ b/v7/src/microcode/memmag.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/memmag.c,v 9.41 1989/10/28 15:38:44 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/memmag.c,v 9.42 1989/11/30 03:03:56 jinx Exp $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -85,6 +85,8 @@ void Clear_Memory (Our_Heap_Size, Our_Stack_Size, Our_Constant_Size) int Our_Heap_Size, Our_Stack_Size, Our_Constant_Size; { + GC_Reserve = 4500; + GC_Space_Needed = 0; Heap_Top = (Heap_Bottom + Our_Heap_Size); Local_Heap_Base = Heap_Bottom; Unused_Heap_Top = (Heap_Bottom + (2 * Our_Heap_Size)); @@ -144,7 +146,7 @@ Setup_Memory(Our_Heap_Size, Our_Stack_Size, Our_Constant_Size) fprintf(stderr, "Largest address does not fit in datum field of object.\n"); fprintf(stderr, - "Allocate less space or re-compile without Heap_In_Low_Memory.\n"); + "Allocate less space or re-configure without HEAP_IN_LOW_MEMORY.\n"); exit(1); } diff --git a/v7/src/microcode/object.h b/v7/src/microcode/object.h index ba329697c..15081d89f 100644 --- a/v7/src/microcode/object.h +++ b/v7/src/microcode/object.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/object.h,v 9.33 1989/09/24 15:13:04 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/object.h,v 9.34 1989/11/30 03:04:01 jinx Exp $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -58,11 +58,8 @@ MIT in each case. */ #define BIGGEST_FIXNUM ((long) 0x007FFFFF) #define HALF_DATUM_LENGTH 12 #define HALF_DATUM_MASK 0x00000FFF - -#ifndef OBJECT_MASKS_DEFINED #define DATUM_MASK 0x00FFFFFF #define TYPE_CODE_MASK 0xFF000000 -#endif /* not OBJECT_MASKS_DEFINED */ #endif /* (TYPE_CODE_LENGTH == 8) */ #if (TYPE_CODE_LENGTH == 6) @@ -76,11 +73,8 @@ MIT in each case. */ #define BIGGEST_FIXNUM ((long) 0x01FFFFFF) #define HALF_DATUM_LENGTH 13 #define HALF_DATUM_MASK 0x00001FFF - -#ifndef OBJECT_MASKS_DEFINED #define DATUM_MASK 0x03FFFFFF #define TYPE_CODE_MASK 0XFC000000 -#endif /* not OBJECT_MASKS_DEFINED */ #endif /* (TYPE_CODE_LENGTH == 6) */ #endif /* b32 */ @@ -96,11 +90,8 @@ MIT in each case. */ #define BIGGEST_FIXNUM ((1 << FIXNUM_LENGTH) - 1) #define HALF_DATUM_LENGTH (DATUM_LENGTH / 2) #define HALF_DATUM_MASK ((1 << HALF_DATUM_LENGTH) - 1) - -#ifndef OBJECT_MASKS_DEFINED #define DATUM_MASK ((1 << DATUM_LENGTH) - 1) #define TYPE_CODE_MASK (~ DATUM_MASK) -#endif /* not OBJECT_MASKS_DEFINED */ #endif /* DATUM_LENGTH */ @@ -136,8 +127,10 @@ MIT in each case. */ #define OBJECT_NEW_ADDRESS(object, address) \ (OBJECT_NEW_DATUM ((object), (ADDRESS_TO_DATUM (address)))) + +/* Machine dependencies */ -#ifdef Heap_In_Low_Memory /* Storing absolute addresses */ +#ifdef HEAP_IN_LOW_MEMORY /* Storing absolute addresses */ typedef long relocation_type; /* Used to relocate pointers on fasload */ @@ -148,13 +141,20 @@ typedef long relocation_type; /* Used to relocate pointers on fasload */ ((SCHEME_OBJECT *) (malloc ((sizeof (SCHEME_OBJECT)) * (space)))), \ ((Heap + (space)) - 1)) +#ifndef DATUM_TO_ADDRESS #define DATUM_TO_ADDRESS(datum) ((SCHEME_OBJECT *) (datum)) +#endif + +#ifndef ADDRESS_TO_DATUM #define ADDRESS_TO_DATUM(address) ((SCHEME_OBJECT) (address)) +#endif -#else /* not Heap_In_Low_Memory (portable version) */ +#else /* not HEAP_IN_LOW_MEMORY (portable version) */ /* Used to relocate pointers on fasload */ + typedef SCHEME_OBJECT * relocation_type; + extern SCHEME_OBJECT * memory_base; /* The "-1" in the value returned is a guarantee that there is one @@ -165,10 +165,15 @@ extern SCHEME_OBJECT * memory_base; Heap = memory_base, \ ((memory_base + (space)) - 1)) +#ifndef DATUM_TO_ADDRESS #define DATUM_TO_ADDRESS(datum) ((SCHEME_OBJECT *) ((datum) + memory_base)) +#endif + +#ifndef ADDRESS_TO_DATUM #define ADDRESS_TO_DATUM(address) ((SCHEME_OBJECT) ((address) - memory_base)) +#endif -#endif /* Heap_In_Low_Memory */ +#endif /* HEAP_IN_LOW_MEMORY */ /* Lots of type predicates */ diff --git a/v7/src/microcode/ppband.c b/v7/src/microcode/ppband.c index 9d9f0f558..580fd1adf 100644 --- a/v7/src/microcode/ppband.c +++ b/v7/src/microcode/ppband.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/ppband.c,v 9.35 1989/09/20 23:04:42 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/ppband.c,v 9.36 1989/11/30 03:03:25 jinx Exp $ Copyright (c) 1987, 1989 Massachusetts Institute of Technology @@ -82,7 +82,7 @@ Close_Dump_File() #define INHIBIT_COMPILED_VERSION_CHECK #include "load.c" -#ifdef Heap_In_Low_Memory +#ifdef HEAP_IN_LOW_MEMORY #ifdef spectrum #define File_To_Pointer(P) \ ((((long) (P)) & DATUM_MASK) / sizeof(SCHEME_OBJECT)) diff --git a/v7/src/microcode/psbmap.h b/v7/src/microcode/psbmap.h index 6390b0615..8f9602a84 100644 --- a/v7/src/microcode/psbmap.h +++ b/v7/src/microcode/psbmap.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/psbmap.h,v 9.31 1989/10/20 04:44:00 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/psbmap.h,v 9.32 1989/11/30 03:04:07 jinx Rel $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -132,7 +132,7 @@ static Boolean nmv_p = false; /* Global data */ -#ifndef Heap_In_Low_Memory +#ifndef HEAP_IN_LOW_MEMORY SCHEME_OBJECT * memory_base; #endif diff --git a/v7/src/microcode/storage.c b/v7/src/microcode/storage.c index e6f3991ed..b44685689 100644 --- a/v7/src/microcode/storage.c +++ b/v7/src/microcode/storage.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/storage.c,v 9.44 1989/09/20 23:11:51 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/storage.c,v 9.45 1989/11/30 03:04:10 jinx Exp $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -95,7 +95,7 @@ jmp_buf *Back_To_Eval; /* Buffer for set/longjmp */ long Heap_Size, Constant_Size, Stack_Size; SCHEME_OBJECT *Highest_Allocated_Address; -#ifndef Heap_In_Low_Memory +#ifndef HEAP_IN_LOW_MEMORY SCHEME_OBJECT * memory_base; diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index 0ceea451a..53eaeba9b 100644 --- a/v7/src/microcode/version.h +++ b/v7/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.11 1989/11/26 17:38:57 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.12 1989/11/30 03:04:15 jinx Exp $ Copyright (c) 1988, 1989 Massachusetts Institute of Technology @@ -46,7 +46,7 @@ MIT in each case. */ #define VERSION 11 #endif #ifndef SUBVERSION -#define SUBVERSION 11 +#define SUBVERSION 12 #endif #ifndef UCODE_TABLES_FILENAME diff --git a/v7/src/microcode/wsize.c b/v7/src/microcode/wsize.c index e852c4ba7..9bdb6352a 100644 --- a/v7/src/microcode/wsize.c +++ b/v7/src/microcode/wsize.c @@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising, 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/Attic/wsize.c,v 9.28 1989/09/20 23:05:21 cph Exp $ */ +/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/wsize.c,v 9.29 1989/11/30 03:03:31 jinx Exp $ */ #include #include @@ -149,7 +149,7 @@ main() count = free(temp); if (((unsigned long) temp) < (1 << ((char_size * sizeof(long)) - TYPE_CODE_LENGTH))) - printf("#define Heap_In_Low_Memory 1\n"); + printf("#define HEAP_IN_LOW_MEMORY 1\n"); else printf("/%c Heap is not in Low Memory. %c/\n", '*', '*'); } diff --git a/v8/src/microcode/object.h b/v8/src/microcode/object.h index a4ab711e0..930d37780 100644 --- a/v8/src/microcode/object.h +++ b/v8/src/microcode/object.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/object.h,v 9.33 1989/09/24 15:13:04 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/object.h,v 9.34 1989/11/30 03:04:01 jinx Exp $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -58,11 +58,8 @@ MIT in each case. */ #define BIGGEST_FIXNUM ((long) 0x007FFFFF) #define HALF_DATUM_LENGTH 12 #define HALF_DATUM_MASK 0x00000FFF - -#ifndef OBJECT_MASKS_DEFINED #define DATUM_MASK 0x00FFFFFF #define TYPE_CODE_MASK 0xFF000000 -#endif /* not OBJECT_MASKS_DEFINED */ #endif /* (TYPE_CODE_LENGTH == 8) */ #if (TYPE_CODE_LENGTH == 6) @@ -76,11 +73,8 @@ MIT in each case. */ #define BIGGEST_FIXNUM ((long) 0x01FFFFFF) #define HALF_DATUM_LENGTH 13 #define HALF_DATUM_MASK 0x00001FFF - -#ifndef OBJECT_MASKS_DEFINED #define DATUM_MASK 0x03FFFFFF #define TYPE_CODE_MASK 0XFC000000 -#endif /* not OBJECT_MASKS_DEFINED */ #endif /* (TYPE_CODE_LENGTH == 6) */ #endif /* b32 */ @@ -96,11 +90,8 @@ MIT in each case. */ #define BIGGEST_FIXNUM ((1 << FIXNUM_LENGTH) - 1) #define HALF_DATUM_LENGTH (DATUM_LENGTH / 2) #define HALF_DATUM_MASK ((1 << HALF_DATUM_LENGTH) - 1) - -#ifndef OBJECT_MASKS_DEFINED #define DATUM_MASK ((1 << DATUM_LENGTH) - 1) #define TYPE_CODE_MASK (~ DATUM_MASK) -#endif /* not OBJECT_MASKS_DEFINED */ #endif /* DATUM_LENGTH */ @@ -136,8 +127,10 @@ MIT in each case. */ #define OBJECT_NEW_ADDRESS(object, address) \ (OBJECT_NEW_DATUM ((object), (ADDRESS_TO_DATUM (address)))) + +/* Machine dependencies */ -#ifdef Heap_In_Low_Memory /* Storing absolute addresses */ +#ifdef HEAP_IN_LOW_MEMORY /* Storing absolute addresses */ typedef long relocation_type; /* Used to relocate pointers on fasload */ @@ -148,13 +141,20 @@ typedef long relocation_type; /* Used to relocate pointers on fasload */ ((SCHEME_OBJECT *) (malloc ((sizeof (SCHEME_OBJECT)) * (space)))), \ ((Heap + (space)) - 1)) +#ifndef DATUM_TO_ADDRESS #define DATUM_TO_ADDRESS(datum) ((SCHEME_OBJECT *) (datum)) +#endif + +#ifndef ADDRESS_TO_DATUM #define ADDRESS_TO_DATUM(address) ((SCHEME_OBJECT) (address)) +#endif -#else /* not Heap_In_Low_Memory (portable version) */ +#else /* not HEAP_IN_LOW_MEMORY (portable version) */ /* Used to relocate pointers on fasload */ + typedef SCHEME_OBJECT * relocation_type; + extern SCHEME_OBJECT * memory_base; /* The "-1" in the value returned is a guarantee that there is one @@ -165,10 +165,15 @@ extern SCHEME_OBJECT * memory_base; Heap = memory_base, \ ((memory_base + (space)) - 1)) +#ifndef DATUM_TO_ADDRESS #define DATUM_TO_ADDRESS(datum) ((SCHEME_OBJECT *) ((datum) + memory_base)) +#endif + +#ifndef ADDRESS_TO_DATUM #define ADDRESS_TO_DATUM(address) ((SCHEME_OBJECT) ((address) - memory_base)) +#endif -#endif /* Heap_In_Low_Memory */ +#endif /* HEAP_IN_LOW_MEMORY */ /* Lots of type predicates */ diff --git a/v8/src/microcode/ppband.c b/v8/src/microcode/ppband.c index 94c0a1721..7608a2fcb 100644 --- a/v8/src/microcode/ppband.c +++ b/v8/src/microcode/ppband.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/ppband.c,v 9.35 1989/09/20 23:04:42 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/ppband.c,v 9.36 1989/11/30 03:03:25 jinx Exp $ Copyright (c) 1987, 1989 Massachusetts Institute of Technology @@ -82,7 +82,7 @@ Close_Dump_File() #define INHIBIT_COMPILED_VERSION_CHECK #include "load.c" -#ifdef Heap_In_Low_Memory +#ifdef HEAP_IN_LOW_MEMORY #ifdef spectrum #define File_To_Pointer(P) \ ((((long) (P)) & DATUM_MASK) / sizeof(SCHEME_OBJECT)) diff --git a/v8/src/microcode/psbmap.h b/v8/src/microcode/psbmap.h index 1d698b575..60ff76870 100644 --- a/v8/src/microcode/psbmap.h +++ b/v8/src/microcode/psbmap.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/psbmap.h,v 9.31 1989/10/20 04:44:00 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/psbmap.h,v 9.32 1989/11/30 03:04:07 jinx Rel $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -132,7 +132,7 @@ static Boolean nmv_p = false; /* Global data */ -#ifndef Heap_In_Low_Memory +#ifndef HEAP_IN_LOW_MEMORY SCHEME_OBJECT * memory_base; #endif diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index ce1e84fe9..15b706023 100644 --- a/v8/src/microcode/version.h +++ b/v8/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.11 1989/11/26 17:38:57 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.12 1989/11/30 03:04:15 jinx Exp $ Copyright (c) 1988, 1989 Massachusetts Institute of Technology @@ -46,7 +46,7 @@ MIT in each case. */ #define VERSION 11 #endif #ifndef SUBVERSION -#define SUBVERSION 11 +#define SUBVERSION 12 #endif #ifndef UCODE_TABLES_FILENAME -- 2.25.1