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 / returns.h < prev    next >
Text File  |  1999-01-02  |  8KB  |  212 lines

  1. /* -*-C-*-
  2.  
  3. $Id: returns.h,v 9.42 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. /* Return codes.  These are placed in Return when an
  23.    interpreter operation needs to operate in several phases. */
  24.  
  25. #define RC_END_OF_COMPUTATION        0x00
  26. /* formerly RC_RESTORE_CONTROL_POINT    0x01 */
  27. #define RC_JOIN_STACKLETS        0x01
  28. #define RC_RESTORE_CONTINUATION        0x02 /* Used for 68000 */
  29. #define RC_INTERNAL_APPLY        0x03
  30. #define RC_BAD_INTERRUPT_CONTINUE     0x04 /* Used for 68000 */
  31. #define RC_RESTORE_HISTORY         0x05
  32. #define RC_INVOKE_STACK_THREAD         0x06
  33. #define RC_RESTART_EXECUTION         0x07 /* Used for 68000 */
  34. #define RC_EXECUTE_ASSIGNMENT_FINISH    0x08
  35. #define RC_EXECUTE_DEFINITION_FINISH    0x09
  36. #define RC_EXECUTE_ACCESS_FINISH    0x0A
  37. #define RC_EXECUTE_IN_PACKAGE_CONTINUE  0x0B
  38. #define RC_SEQ_2_DO_2            0x0C
  39. #define RC_SEQ_3_DO_2            0x0D
  40. #define RC_SEQ_3_DO_3            0x0E
  41. #define RC_CONDITIONAL_DECIDE        0x0F
  42. #define RC_DISJUNCTION_DECIDE        0x10
  43. #define RC_COMB_1_PROCEDURE        0x11
  44. #define RC_COMB_APPLY_FUNCTION        0x12
  45. #define RC_COMB_2_FIRST_OPERAND        0x13
  46. #define RC_COMB_2_PROCEDURE        0x14
  47. #define RC_COMB_SAVE_VALUE        0x15
  48. #define RC_PCOMB1_APPLY            0x16
  49. #define RC_PCOMB2_DO_1            0x17
  50. #define RC_PCOMB2_APPLY            0x18
  51. #define RC_PCOMB3_DO_2            0x19
  52. #define RC_PCOMB3_DO_1            0x1A
  53. #define RC_PCOMB3_APPLY            0x1B
  54. #define RC_SNAP_NEED_THUNK        0x1C
  55. #define RC_REENTER_COMPILED_CODE     0x1D
  56. /* formerly RC_GET_CHAR_REPEAT        0x1E */
  57. #define RC_COMP_REFERENCE_RESTART     0x1F
  58. #define RC_NORMAL_GC_DONE         0x20
  59. #define RC_COMPLETE_GC_DONE         0x21 /* Used for 68000 */
  60. #define RC_PURIFY_GC_1            0x22
  61. #define RC_PURIFY_GC_2            0x23
  62. #define RC_AFTER_MEMORY_UPDATE         0x24 /* Used for 68000 */
  63. #define RC_RESTARTABLE_EXIT         0x25 /* Used for 68000 */
  64. /* formerly RC_GET_CHAR         0x26 */
  65. /* formerly RC_GET_CHAR_IMMEDIATE    0x27 */
  66. #define RC_COMP_ASSIGNMENT_RESTART     0x28
  67. #define RC_POP_FROM_COMPILED_CODE     0x29
  68. #define RC_RETURN_TRAP_POINT        0x2A
  69. #define RC_RESTORE_STEPPER        0x2B /* Used for 68000 */
  70. #define RC_RESTORE_TO_STATE_POINT    0x2C
  71. #define RC_MOVE_TO_ADJACENT_POINT    0x2D
  72. #define RC_RESTORE_VALUE        0x2E
  73. #define RC_RESTORE_DONT_COPY_HISTORY    0x2F
  74.  
  75. /* The following are not used in the 68000 implementation */
  76. #define RC_POP_RETURN_ERROR        0x40
  77. #define RC_EVAL_ERROR            0x41
  78. #define RC_STACK_MARKER            0x42
  79. #define RC_COMP_INTERRUPT_RESTART    0x43
  80. /* formerly RC_COMP_RECURSION_GC    0x44 */
  81. #define RC_RESTORE_INT_MASK        0x45
  82. #define RC_HALT                0x46
  83. #define RC_FINISH_GLOBAL_INT        0x47    /* Multiprocessor */
  84. #define RC_REPEAT_DISPATCH        0x48
  85. #define RC_GC_CHECK            0x49
  86. #define RC_RESTORE_FLUIDS        0x4A
  87. #define RC_COMP_LOOKUP_APPLY_RESTART    0x4B
  88. #define RC_COMP_ACCESS_RESTART        0x4C
  89. #define RC_COMP_UNASSIGNED_P_RESTART    0x4D
  90. #define RC_COMP_UNBOUND_P_RESTART    0x4E
  91. #define RC_COMP_DEFINITION_RESTART    0x4F
  92. /* formerly RC_COMP_LEXPR_INTERRUPT_RESTART 0x50 */
  93. #define RC_COMP_SAFE_REFERENCE_RESTART  0x51
  94. /* formerly RC_COMP_CACHE_LOOKUP_RESTART      0x52 */
  95. #define RC_COMP_LOOKUP_TRAP_RESTART      0x53
  96. #define RC_COMP_ASSIGNMENT_TRAP_RESTART 0x54
  97. /* formerly RC_COMP_CACHE_OPERATOR_RESTART    0x55 */
  98. #define RC_COMP_OP_REF_TRAP_RESTART    0x56
  99. #define RC_COMP_CACHE_REF_APPLY_RESTART 0x57
  100. #define RC_COMP_SAFE_REF_TRAP_RESTART   0x58
  101. #define RC_COMP_UNASSIGNED_TRAP_RESTART 0x59
  102. /* formerly RC_COMP_CACHE_ASSIGN_RESTART    0x5A */
  103. #define RC_COMP_LINK_CACHES_RESTART    0x5B
  104. #define RC_HARDWARE_TRAP        0x5C
  105. #define RC_INTERNAL_APPLY_VAL        0x5D
  106. #define RC_COMP_ERROR_RESTART        0x5E
  107. #define RC_PRIMITIVE_CONTINUE        0x5F
  108.  
  109. /* When adding return codes, add them to the table below as well! */
  110.  
  111. #define MAX_RETURN_CODE            0x5F
  112.  
  113. #define RETURN_NAME_TABLE                        \
  114. {                                    \
  115. /* 0x00 */        "END_OF_COMPUTATION",                \
  116. /* 0x01 */        "JOIN_STACKLETS",                \
  117. /* 0x02 */        "RESTORE_CONTINUATION",                \
  118. /* 0x03 */        "INTERNAL_APPLY",                \
  119. /* 0x04 */        "BAD_INTERRUPT_CONTINUE",            \
  120. /* 0x05 */        "RESTORE_HISTORY",                \
  121. /* 0x06 */        "INVOKE_STACK_THREAD",                \
  122. /* 0x07 */        "RESTART_EXECUTION",                \
  123. /* 0x08 */        "EXECUTE_ASSIGNMENT_FINISH",            \
  124. /* 0x09 */        "EXECUTE_DEFINITION_FINISH",            \
  125. /* 0x0A */        "EXECUTE_ACCESS_FINISH",            \
  126. /* 0x0b */        "EXECUTE_IN_PACKAGE_CONTINUE",            \
  127. /* 0x0C */        "SEQ_2_DO_2",                    \
  128. /* 0x0d */        "SEQ_3_DO_2",                    \
  129. /* 0x0E */        "SEQ_3_DO_3",                    \
  130. /* 0x0f */        "CONDITIONAL_DECIDE",                \
  131. /* 0x10 */        "DISJUNCTION_DECIDE",                \
  132. /* 0x11 */        "COMB_1_PROCEDURE",                \
  133. /* 0x12 */        "COMB_APPLY_FUNCTION",                \
  134. /* 0x13 */        "COMB_2_FIRST_OPERAND",                \
  135. /* 0x14 */        "COMB_2_PROCEDURE",                \
  136. /* 0x15 */        "COMB_SAVE_VALUE",                \
  137. /* 0x16 */        "PCOMB1_APPLY",                    \
  138. /* 0x17 */        "PCOMB2_DO_1",                    \
  139. /* 0x18 */        "PCOMB2_APPLY",                    \
  140. /* 0x19 */        "PCOMB3_DO_2",                    \
  141. /* 0x1A */        "PCOMB3_DO_1",                    \
  142. /* 0x1B */        "PCOMB3_APPLY",                    \
  143. /* 0x1C */        "SNAP_NEED_THUNK",                \
  144. /* 0x1D */        "REENTER_COMPILED_CODE",            \
  145. /* 0x1E */        "",                        \
  146. /* 0x1F */        "COMP_REFERENCE_RESTART",            \
  147. /* 0x20 */        "NORMAL_GC_DONE",                \
  148. /* 0x21 */        "COMPLETE_GC_DONE",                \
  149. /* 0x22 */        "PURIFY_GC_1",                    \
  150. /* 0x23 */        "PURIFY_GC_2",                    \
  151. /* 0x24 */        "AFTER_MEMORY_UPDATE",                \
  152. /* 0x25 */        "RESTARTABLE_EXIT",                \
  153. /* 0x26 */        "",                        \
  154. /* 0x27 */        "",                        \
  155. /* 0x28 */        "COMP_ASSIGNMENT_RESTART",            \
  156. /* 0x29 */        "POP_FROM_COMPILED_CODE",            \
  157. /* 0x2A */        "RETURN_TRAP_POINT",                \
  158. /* 0x2B */        "RESTORE_STEPPER",                \
  159. /* 0x2C */        "RESTORE_TO_STATE_POINT",            \
  160. /* 0x2D */        "MOVE_TO_ADJACENT_POINT",            \
  161. /* 0x2E */        "RESTORE_VALUE",                \
  162. /* 0x2F */        "RESTORE_DONT_COPY_HISTORY",            \
  163. /* 0x30 */        "",                        \
  164. /* 0x31 */        "",                        \
  165. /* 0x32 */        "",                        \
  166. /* 0x33 */        "",                        \
  167. /* 0x34 */        "",                        \
  168. /* 0x35 */        "",                        \
  169. /* 0x36 */        "",                        \
  170. /* 0x37 */        "",                        \
  171. /* 0x38 */        "",                        \
  172. /* 0x39 */        "",                        \
  173. /* 0x3A */        "",                        \
  174. /* 0x3B */        "",                        \
  175. /* 0x3C */        "",                        \
  176. /* 0x3D */        "",                        \
  177. /* 0x3E */        "",                        \
  178. /* 0x3F */        "",                        \
  179. /* 0x40 */        "POP_RETURN_ERROR",                \
  180. /* 0x41 */        "EVAL_ERROR",                    \
  181. /* 0x42 */        "STACK_MARKER",                    \
  182. /* 0x43 */        "COMPILER_INTERRUPT_RESTART",            \
  183. /* 0x44 */        "",                        \
  184. /* 0x45 */        "RESTORE_INT_MASK",                \
  185. /* 0x46 */        "HALT",                        \
  186. /* 0x47 */        "FINISH_GLOBAL_INT",                \
  187. /* 0x48 */        "REPEAT_DISPATCH",                \
  188. /* 0x49 */        "GC_CHECK",                    \
  189. /* 0x4A */        "RESTORE_FLUIDS",                \
  190. /* 0x4B */        "COMPILER_LOOKUP_APPLY_RESTART",        \
  191. /* 0x4C */        "COMPILER_ACCESS_RESTART",            \
  192. /* 0x4D */        "COMPILER_UNASSIGNED_P_RESTART",        \
  193. /* 0x4E */        "COMPILER_UNBOUND_P_RESTART",            \
  194. /* 0x4F */        "COMPILER_DEFINITION_RESTART",            \
  195. /* 0x50 */        "",                        \
  196. /* 0x51 */        "COMPILER_SAFE_REFERENCE_RESTART",        \
  197. /* 0x52 */        "",                        \
  198. /* 0x53 */        "COMPILER_LOOKUP_TRAP_RESTART",            \
  199. /* 0x54 */        "COMPILER_ASSIGNMENT_TRAP_RESTART",        \
  200. /* 0X55 */        "",                        \
  201. /* 0x56 */        "COMPILER_OPERATOR_REFERENCE_TRAP_RESTART",    \
  202. /* 0x57 */        "COMPILER_CACHE_REFERENCE_APPLY_RESTART",    \
  203. /* 0x58 */        "COMPILER_SAFE_REFERENCE_TRAP_RESTART",        \
  204. /* 0x59 */        "COMPILER_UNASSIGNED_P_TRAP_RESTART",        \
  205. /* 0x5A */        "",                        \
  206. /* 0x5B */        "COMPILER_LINK_CACHES_RESTART",            \
  207. /* 0x5C */        "HARDWARE_TRAP",                \
  208. /* 0x5D */        "INTERNAL_APPLY_VAL",                \
  209. /* 0x5E */        "COMPILER_ERROR_RESTARRT",            \
  210. /* 0x5F */        "PRIMITIVE_CONTINUE"                \
  211. }
  212.