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 / fixobj.h < prev    next >
Text File  |  1999-01-02  |  6KB  |  131 lines

  1. /* -*-C-*-
  2.  
  3. $Id: fixobj.h,v 9.38 1999/01/02 06:06:43 cph Exp $
  4.  
  5. Copyright (c) 1987-1999 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. /* Declarations of user offsets into the Fixed Objects Vector.
  23.    This should correspond to the file "utabmd.scm". */
  24.  
  25. #define Non_Object        0x00    /* Used for unassigned variables. */
  26. #define System_Interrupt_Vector    0x01    /* Handlers for interrupts. */
  27. #define System_Error_Vector    0x02    /* Handlers for errors. */
  28. #define OBArray            0x03    /* Array for interning symbols. */
  29. #define Types_Vector        0x04    /* Type number -> Name map. */
  30. #define Returns_Vector        0x05    /* Return code -> Name map. */
  31.  
  32. /* For each interrupt, an interrupt mask to be set when invoking the
  33.    handler for that interrupt.  */
  34. #define FIXOBJ_INTERRUPT_MASK_VECTOR    0x06
  35.  
  36. #define Errors_Vector        0x07    /* Error code -> Name map. */
  37. #define Identification_Vector    0x08    /* ID Vector index -> name map. */
  38. #define FIXOBJ_SYSTEM_CALL_NAMES    0x09    /* System call index -> name */
  39. #define FIXOBJ_SYSTEM_CALL_ERRORS    0x0A    /* System call error -> name */
  40. #define GC_Daemon        0x0B    /* Procedure to run after GC. */
  41. #define Trap_Handler        0x0C    /* Abort after disaster. */
  42. #define FIXOBJ_EDWIN_AUTO_SAVE    0x0D    /* Files to save if fatal error. */
  43. #define Stepper_State        0x0E    /* UNUSED in CScheme. */
  44. #define Fixed_Objects_Slots    0x0F    /* Names of these slots. */
  45. #define FIXOBJ_FILES_TO_DELETE    0x10    /* Temporary files to delete. */
  46. #define State_Space_Tag        0x11    /* Tag for state spaces. */
  47. #define State_Point_Tag        0x12    /* Tag for state points. */
  48. #define Dummy_History        0x13    /* Empty history structure. */
  49. #define Bignum_One              0x14    /* Cache for bignum one. */
  50. #define System_Scheduler    0x15    /* MultiScheme:
  51.                        Scheduler for touched futures. */
  52. #define Termination_Vector    0x16    /* Names for terminations. */
  53. #define Termination_Proc_Vector    0x17    /* Handlers for terminations. */
  54. #define Me_Myself        0x18    /* MultiScheme:
  55.                        The shared fixed objects vector. */
  56. #define The_Work_Queue        0x19    /* MultiScheme:
  57.                        Where work is stored. */
  58. #define Future_Logger           0x1A    /* MultiScheme: When logging futures,
  59.                        routine to log touched futures. */
  60. #define Touched_Futures         0x1B    /* MultiScheme: When logging futures,
  61.                        vector of touched futures. */
  62. #define Precious_Objects    0x1C    /* Objects that should not be lost! */
  63. #define Error_Procedure        0x1D    /* User invoked error handler. */
  64. #define Unsnapped_Link        0x1E    /* UNUSED in CScheme. */
  65. #define Utilities_Vector    0x1F    /* UNUSED in CScheme. */
  66. #define Compiler_Err_Procedure  0x20    /* User invoked error handler
  67.                        from compiled code. */
  68. #define Lost_Objects_Base     0x21    /* Free at the end of the "real" gc. */
  69. #define State_Space_Root    0x22     /* Root of state space. */
  70. #define Primitive_Profiling_Table 0x23    /* Table of profile counts for
  71.                        primitives. */
  72.  
  73. /* Trampolines for various generic arithmetic operations.
  74.    These facilitate upwards compatibility and simplify compilation. 
  75.  */
  76.  
  77. #define GENERIC_TRAMPOLINE_ZERO_P    0x24
  78. #define GENERIC_TRAMPOLINE_POSITIVE_P    0x25
  79. #define GENERIC_TRAMPOLINE_NEGATIVE_P    0x26
  80. #define GENERIC_TRAMPOLINE_SUCCESSOR    0x27
  81. #define GENERIC_TRAMPOLINE_PREDECESSOR    0x28
  82. #define GENERIC_TRAMPOLINE_EQUAL_P    0x29
  83. #define GENERIC_TRAMPOLINE_LESS_P    0x2A
  84. #define GENERIC_TRAMPOLINE_GREATER_P    0x2B
  85. #define GENERIC_TRAMPOLINE_ADD        0x2C
  86. #define GENERIC_TRAMPOLINE_SUBTRACT    0x2D
  87. #define GENERIC_TRAMPOLINE_MULTIPLY    0x2E
  88. #define GENERIC_TRAMPOLINE_DIVIDE    0x2F
  89. #define GENERIC_TRAMPOLINE_QUOTIENT    0x30
  90. #define GENERIC_TRAMPOLINE_REMAINDER    0x31
  91. #define GENERIC_TRAMPOLINE_MODULO    0x32
  92.  
  93. #define ARITY_DISPATCHER_TAG        0x33
  94.  
  95. /* Descartes profiling tables */
  96.  
  97. #define PC_Sample_Builtin_Table        0x34 /* ``built in'' assembly code */
  98. #define PC_Sample_Utility_Table        0x35 /* Foreign func'n utilities */
  99. #define PC_Sample_Primitive_Table    0x36 /* Primitive proc samples */
  100.  
  101. #define PC_Sample_Code_Block_Table    0x37 /* Compiled  proc samples */
  102.  
  103. #define PC_Sample_PCB_Block_Buffer    0x38 /* Double buffer pure compiled */
  104. #define PC_Sample_PCB_Offset_Buffer    0x39 /* Double buffer pure comp offs */
  105. #define PC_Sample_HCB_Block_Buffer    0x3A /* Double buffer heathen comps */
  106. #define PC_Sample_HCB_Offset_Buffer    0x3B /* Double buffer heathen comps */
  107.  
  108. #define PC_Sample_Interp_Proc_Buffer    0x3C /* Double buffer interp procs */
  109.  
  110. #define PC_Sample_Prob_Comp_Table    0x3D /* Sure looked compiled ?! */
  111. #define PC_Sample_UFO_Table        0x3E /* Invalid ENV at sample time  */
  112.  
  113. #define COMPILED_CODE_BKPT_HANDLER    0x3F /* Procedure to invoke when
  114.                         compiled code hits a
  115.                         breakpoint.
  116.                           */
  117.  
  118. #define GC_WABBIT_DESCRIPTOR        0x40 /* #F or a vector of 4 elements:
  119.                         - A boolean flag
  120.                         - A vector of objects to find
  121.                         - A vector to fill with
  122.                           references.
  123.                         - A boolean flag = do you want
  124.                           a vector of all obj heads
  125.                           returned in this slot. If so,
  126.                           slot 0 will be a boolean flag
  127.                           indicating if there may be more.
  128.                           */
  129.  
  130. #define NFixed_Objects            0x41
  131.