home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / microcode / storage.c < prev    next >
C/C++ Source or Header  |  2000-12-05  |  5KB  |  145 lines

  1. /* -*-C-*-
  2.  
  3. $Id: storage.c,v 9.57 2000/12/05 21:23:48 cph Exp $
  4.  
  5. Copyright (c) 1987-2000 Massachusetts Institute of Technology
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or (at
  10. your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful, but
  13. WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21.  
  22. /* This file defines the storage for the interpreter's global variables. */
  23.  
  24. #include "scheme.h"
  25. #include "gctype.c"
  26.  
  27.                          /*************/
  28.                          /* REGISTERS */
  29.                          /*************/
  30.  
  31. SCHEME_OBJECT
  32.   * MemTop,        /* Top of free space available */
  33.   * Free,        /* Next free word in heap */
  34.   * Heap_Top,        /* Top of current heap */
  35.   * Heap_Bottom,    /* Bottom of current heap */
  36.   * Unused_Heap_Top,    /* Top of unused heap */
  37.   * Unused_Heap_Bottom,    /* Bottom of unused heap */
  38.   * Stack_Guard,    /* Guard area at end of stack */
  39.   * Ext_Stack_Pointer,    /* Next available slot in control stack */
  40.   * Stack_Bottom,    /* Bottom of control stack */
  41.   * Stack_Top,        /* Top of control stack */
  42.   * Free_Constant,    /* Next free word in constant space */
  43.   * Constant_Space,    /* Bottom of constant+pure space */
  44.   * Constant_Top,    /* Top of constant+pure space */
  45.   * Local_Heap_Base,    /* Per-processor CONSing area */
  46.   * Free_Stacklets,    /* Free list of stacklets */
  47.   * Ext_History,    /* History register */
  48.   Current_State_Point,    /* Dynamic state point */
  49.   Fluid_Bindings,    /* Fluid bindings AList */
  50.   * last_return_code;    /* Address of the most recent return code in the stack.
  51.                This is only meaningful while in compiled code.
  52.                *** This must be changed when stacklets are used. */
  53.  
  54. long
  55.   temp_long,        /* temporary for sign extension */
  56.   GC_Reserve,        /* Scheme pointer overflow space in heap */
  57.   GC_Space_Needed;    /* Amount of space needed when GC triggered */
  58.  
  59. Declare_Fixed_Objects ();
  60.  
  61. Boolean Trapping;
  62.  
  63. SCHEME_OBJECT Old_Return_Code;
  64. SCHEME_OBJECT * Return_Hook_Address;
  65.  
  66. SCHEME_OBJECT * Prev_Restore_History_Stacklet;
  67. long Prev_Restore_History_Offset;
  68.  
  69. long Heap_Size;
  70. long Constant_Size;
  71. long Stack_Size;
  72. SCHEME_OBJECT * Lowest_Allocated_Address, * Highest_Allocated_Address;
  73. #ifndef HEAP_IN_LOW_MEMORY
  74. SCHEME_OBJECT * memory_base;
  75. #endif
  76.  
  77.                     /**********************/
  78.                     /* DEBUGGING SWITCHES */
  79.                     /**********************/
  80.  
  81. #ifdef ENABLE_DEBUGGING_FLAGS
  82.  
  83. Boolean Eval_Debug    = false;
  84. Boolean Hex_Input_Debug    = false;
  85. Boolean File_Load_Debug    = false;
  86. Boolean Reloc_Debug    = false;
  87. Boolean Intern_Debug    = false;
  88. Boolean Cont_Debug    = false;
  89. Boolean Primitive_Debug    = false;
  90. Boolean Lookup_Debug    = false;
  91. Boolean Define_Debug    = false;
  92. Boolean GC_Debug    = false;
  93. Boolean Upgrade_Debug    = false;
  94. Boolean Dump_Debug    = false;
  95. Boolean Trace_On_Error    = false;
  96. Boolean Bignum_Debug    = false;
  97. Boolean Per_File    = false;
  98. Boolean Fluids_Debug    = false;
  99. More_Debug_Flag_Allocs();
  100.  
  101. int debug_slotno = 0;
  102. int debug_nslots = 0;
  103. int local_slotno = 0;
  104. int local_nslots = 0;
  105.  
  106. #if FALSE /* MHWU */
  107. int debug_circle[debug_maxslots];
  108. int local_circle[debug_maxslots];
  109. #endif /* false */
  110.  
  111. int debug_circle[100];
  112. int local_circle[100];
  113. #endif /* ENABLE_DEBUGGING_FLAGS */
  114.  
  115.         /****************************/
  116.         /* Debugging Macro Messages */
  117.         /****************************/
  118.  
  119. char *CONT_PRINT_RETURN_MESSAGE =   "Save_Cont, return code";
  120. char *CONT_PRINT_EXPR_MESSAGE   =   "Save_Cont, expression";
  121. char *RESTORE_CONT_RETURN_MESSAGE = "Restore_Cont, return code";
  122. char *RESTORE_CONT_EXPR_MESSAGE =   "Restore_Cont, expression";
  123.  
  124. /* Interpreter code name and message tables */
  125.  
  126. long MAX_RETURN = MAX_RETURN_CODE;
  127.  
  128. extern char *Return_Names[];
  129. char *Return_Names[] = RETURN_NAME_TABLE;    /* in returns.h */
  130.  
  131. extern char *Type_Names[];
  132. char *Type_Names[] = TYPE_NAME_TABLE;        /* in types.h */
  133.  
  134. extern char *Abort_Names[];
  135. char *Abort_Names[] = ABORT_NAME_TABLE;        /* in const.h */
  136.  
  137. extern char *Error_Names[];
  138. char *Error_Names[] = ERROR_NAME_TABLE;        /* in errors.h */
  139.  
  140. extern char *Term_Names[];
  141. char *Term_Names[] = TERM_NAME_TABLE;        /* in errors.h */
  142.  
  143. extern char *Term_Messages[];
  144. char *Term_Messages[] = TERM_MESSAGE_TABLE;    /* in errors.h */
  145.