1 /* -*-C-*- 2 3 Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 4 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 5 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Massachusetts 6 Institute of Technology 7 8 This file is part of MIT/GNU Scheme. 9 10 MIT/GNU Scheme is free software; you can redistribute it and/or modify 11 it under the terms of the GNU General Public License as published by 12 the Free Software Foundation; either version 2 of the License, or (at 13 your option) any later version. 14 15 MIT/GNU Scheme is distributed in the hope that it will be useful, but 16 WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 General Public License for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with MIT/GNU Scheme; if not, write to the Free Software 22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 23 USA. 24 25 */ 26 27 /* Return codes. These are placed in GET_RET when an 28 interpreter operation needs to operate in several phases. */ 29 30 #define RC_END_OF_COMPUTATION 0x00 31 #define RC_JOIN_STACKLETS 0x01 32 /* unused 0x02 */ 33 #define RC_INTERNAL_APPLY 0x03 34 /* unused 0x04 */ 35 #define RC_RESTORE_HISTORY 0x05 36 /* unused 0x06 */ 37 /* unused 0x07 */ 38 #define RC_EXECUTE_ASSIGNMENT_FINISH 0x08 39 #define RC_EXECUTE_DEFINITION_FINISH 0x09 40 #define RC_EXECUTE_ACCESS_FINISH 0x0A 41 /* unused 0x0B */ 42 #define RC_EXECUTE_SEQUENCE_FINISH 0x0C 43 /* unused 0x0D */ 44 /* unused 0x0E */ 45 #define RC_CONDITIONAL_DECIDE 0x0F 46 #define RC_DISJUNCTION_DECIDE 0x10 47 /* #define RC_COMB_1_PROCEDURE 0x11 */ 48 #define RC_COMB_APPLY_FUNCTION 0x12 49 /* #define RC_COMB_2_FIRST_OPERAND 0x13 */ 50 /*#define RC_COMB_2_PROCEDURE 0x14 */ 51 #define RC_COMB_SAVE_VALUE 0x15 52 /* #define RC_PCOMB1_APPLY 0x16 */ 53 /* #define RC_PCOMB2_DO_1 0x17 */ 54 /* #define RC_PCOMB2_APPLY 0x18 */ 55 /* #define RC_PCOMB3_DO_2 0x19 */ 56 /* #define RC_PCOMB3_DO_1 0x1A */ 57 /* #define RC_PCOMB3_APPLY 0x1B */ 58 #define RC_SNAP_NEED_THUNK 0x1C 59 #define RC_REENTER_COMPILED_CODE 0x1D 60 /* unused 0x1E */ 61 /* unused 0x1F */ 62 #define RC_NORMAL_GC_DONE 0x20 63 /* unused 0x21 through 0x28 */ 64 #define RC_POP_FROM_COMPILED_CODE 0x29 65 /* unused 0x2A */ 66 /* unused 0x2B */ 67 /* unused 0x2C */ 68 /* unused 0x2D */ 69 #define RC_RESTORE_VALUE 0x2E 70 #define RC_RESTORE_DONT_COPY_HISTORY 0x2F 71 /* unused 0x30 through 0x3F */ 72 #define RC_POP_RETURN_ERROR 0x40 73 #define RC_EVAL_ERROR 0x41 74 #define RC_STACK_MARKER 0x42 75 #define RC_COMP_INTERRUPT_RESTART 0x43 76 /* unused 0x44 */ 77 #define RC_RESTORE_INT_MASK 0x45 78 #define RC_HALT 0x46 79 /* unused 0x47 through 0x52 */ 80 #define RC_COMP_LOOKUP_TRAP_RESTART 0x53 81 #define RC_COMP_ASSIGNMENT_TRAP_RESTART 0x54 82 /* unused 0x55 */ 83 #define RC_COMP_OP_REF_TRAP_RESTART 0x56 84 #define RC_COMP_CACHE_REF_APPLY_RESTART 0x57 85 #define RC_COMP_SAFE_REF_TRAP_RESTART 0x58 86 #define RC_COMP_UNASSIGNED_TRAP_RESTART 0x59 87 /* unused 0x5A */ 88 #define RC_COMP_LINK_CACHES_RESTART 0x5B 89 #define RC_HARDWARE_TRAP 0x5C 90 #define RC_INTERNAL_APPLY_VAL 0x5D 91 #define RC_COMP_ERROR_RESTART 0x5E 92 93 /* When adding return codes, add them to the table below as well! */ 94 95 #define MAX_RETURN_CODE 0x5E 96 97 #define RETURN_NAME_TABLE \ 98 { \ 99 /* 0x00 */ "non-existent-continuation", \ 100 /* 0x01 */ "join-stacklets", \ 101 /* 0x02 */ 0, \ 102 /* 0x03 */ "internal-apply", \ 103 /* 0x04 */ 0, \ 104 /* 0x05 */ "restore-history", \ 105 /* 0x06 */ 0, \ 106 /* 0x07 */ 0, \ 107 /* 0x08 */ "assignment-continue", \ 108 /* 0x09 */ "definition-continue", \ 109 /* 0x0a */ "access-continue", \ 110 /* 0x0b */ 0, \ 111 /* 0x0c */ "sequence-continue", \ 112 /* 0x0d */ 0, \ 113 /* 0x0e */ 0, \ 114 /* 0x0f */ "conditional-decide", \ 115 /* 0x10 */ "disjunction-decide", \ 116 /* 0x11 */ 0, \ 117 /* 0x12 */ "combination-apply", \ 118 /* 0x13 */ 0, \ 119 /* 0x14 */ 0, \ 120 /* 0x15 */ "combination-save-value", \ 121 /* 0x16 */ 0, \ 122 /* 0x17 */ 0, \ 123 /* 0x18 */ 0, \ 124 /* 0x19 */ 0, \ 125 /* 0x1a */ 0, \ 126 /* 0x1b */ 0, \ 127 /* 0x1c */ "force-snap-thunk", \ 128 /* 0x1d */ "reenter-compiled-code", \ 129 /* 0x1e */ 0, \ 130 /* 0x1f */ 0, \ 131 /* 0x20 */ "normal-garbage-collect-done", \ 132 /* 0x21 */ 0, \ 133 /* 0x22 */ 0, \ 134 /* 0x23 */ 0, \ 135 /* 0x24 */ 0, \ 136 /* 0x25 */ 0, \ 137 /* 0x26 */ 0, \ 138 /* 0x27 */ 0, \ 139 /* 0x28 */ 0, \ 140 /* 0x29 */ "pop-from-compiled-code", \ 141 /* 0x2a */ 0, \ 142 /* 0x2b */ 0, \ 143 /* 0x2c */ 0, \ 144 /* 0x2d */ 0, \ 145 /* 0x2e */ "restore-value", \ 146 /* 0x2f */ "restore-dont-copy-history", \ 147 /* 0x30 */ 0, \ 148 /* 0x31 */ 0, \ 149 /* 0x32 */ 0, \ 150 /* 0x33 */ 0, \ 151 /* 0x34 */ 0, \ 152 /* 0x35 */ 0, \ 153 /* 0x36 */ 0, \ 154 /* 0x37 */ 0, \ 155 /* 0x38 */ 0, \ 156 /* 0x39 */ 0, \ 157 /* 0x3a */ 0, \ 158 /* 0x3b */ 0, \ 159 /* 0x3c */ 0, \ 160 /* 0x3d */ 0, \ 161 /* 0x3e */ 0, \ 162 /* 0x3f */ 0, \ 163 /* 0x40 */ "pop-return-error", \ 164 /* 0x41 */ "eval-error", \ 165 /* 0x42 */ "stack-marker", \ 166 /* 0x43 */ "compiler-interrupt-restart", \ 167 /* 0x44 */ 0, \ 168 /* 0x45 */ "restore-interrupt-mask", \ 169 /* 0x46 */ "halt", \ 170 /* 0x47 */ 0, \ 171 /* 0x48 */ 0, \ 172 /* 0x49 */ 0, \ 173 /* 0x4a */ 0, \ 174 /* 0x4b */ 0, \ 175 /* 0x4c */ 0, \ 176 /* 0x4d */ 0, \ 177 /* 0x4e */ 0, \ 178 /* 0x4f */ 0, \ 179 /* 0x50 */ 0, \ 180 /* 0x51 */ 0, \ 181 /* 0x52 */ 0, \ 182 /* 0x53 */ "compiler-reference-trap-restart", \ 183 /* 0x54 */ "compiler-assignment-trap-restart", \ 184 /* 0x55 */ 0, \ 185 /* 0x56 */ "compiler-operator-lookup-trap-restart", \ 186 /* 0x57 */ "compiler-lookup-apply-trap-restart", \ 187 /* 0x58 */ "compiler-safe-reference-trap-restart", \ 188 /* 0x59 */ "compiler-unassigned?-trap-restart", \ 189 /* 0x5a */ 0, \ 190 /* 0x5b */ "compiler-link-caches-restart", \ 191 /* 0x5c */ "hardware-trap", \ 192 /* 0x5d */ "internal-apply-val", \ 193 /* 0x5e */ "compiler-error-restart" \ 194 } 195