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 /* Type code definitions */ 28 29 #define TC_NULL 0x00 30 #define TC_LIST 0x01 31 #define TC_CHARACTER 0x02 32 #define TC_SCODE_QUOTE 0x03 33 /* #define TC_PCOMB2 0x04 */ 34 #define TC_UNINTERNED_SYMBOL 0x05 35 #define TC_BIG_FLONUM 0x06 36 /* #define TC_COMBINATION_1 0x07 */ 37 #define TC_CONSTANT 0x08 38 #define TC_EXTENDED_PROCEDURE 0x09 39 #define TC_VECTOR 0x0A 40 #define TC_RETURN_CODE 0x0B 41 /* #define TC_COMBINATION_2 0x0C */ 42 #define TC_MANIFEST_CLOSURE 0x0D 43 #define TC_BIG_FIXNUM 0x0E 44 #define TC_PROCEDURE 0x0F 45 #define TC_ENTITY 0x10 46 #define TC_DELAY 0x11 47 #define TC_ENVIRONMENT 0x12 48 #define TC_DELAYED 0x13 49 #define TC_EXTENDED_LAMBDA 0x14 50 #define TC_COMMENT 0x15 51 #define TC_NON_MARKED_VECTOR 0x16 52 #define TC_LAMBDA 0x17 53 #define TC_PRIMITIVE 0x18 54 #define TC_SEQUENCE 0x19 55 #define TC_FIXNUM 0x1A 56 /* #define TC_PCOMB1 0x1B */ 57 #define TC_CONTROL_POINT 0x1C 58 #define TC_INTERNED_SYMBOL 0x1D 59 #define TC_CHARACTER_STRING 0x1E 60 #define TC_ACCESS 0x1F 61 #define TC_HUNK3_A 0x20 62 #define TC_DEFINITION 0x21 63 #define TC_BROKEN_HEART 0x22 64 #define TC_ASSIGNMENT 0x23 65 #define TC_HUNK3_B 0x24 66 /* #define TC_UNUSED_25 0x25 */ 67 #define TC_COMBINATION 0x26 68 #define TC_MANIFEST_NM_VECTOR 0x27 69 #define TC_COMPILED_ENTRY 0x28 70 #define TC_LEXPR 0x29 71 /* #define TC_PCOMB3 0x2A */ 72 #define TC_EPHEMERON 0x2B 73 #define TC_VARIABLE 0x2C 74 #define TC_THE_ENVIRONMENT 0x2D 75 #define TC_SYNTAX_ERROR 0x2E 76 #define TC_VECTOR_1B 0x2F 77 /* #define TC_PCOMB0 0x30 */ 78 #define TC_VECTOR_16B 0x31 79 #define TC_REFERENCE_TRAP 0x32 80 /* #define TC_UNUSED_33 0x33 */ 81 #define TC_CONDITIONAL 0x34 82 #define TC_DISJUNCTION 0x35 83 #define TC_CELL 0x36 84 #define TC_WEAK_CONS 0x37 85 #define TC_QUAD 0x38 86 #define TC_LINKAGE_SECTION 0x39 87 #define TC_RATNUM 0x3A 88 #define TC_STACK_ENVIRONMENT 0x3B 89 #define TC_COMPLEX 0x3C 90 #define TC_COMPILED_CODE_BLOCK 0x3D 91 #define TC_RECORD 0x3E 92 /* #define TC_UNUSED 0x3F */ 93 94 /* If you add a new type, don't forget to update "gcloop.c" 95 and TYPE_NAME_TABLE below. */ 96 97 #define MIN_TYPE_CODE_LENGTH 6 98 #define TYPE_CODE_LIMIT (1 << MIN_TYPE_CODE_LENGTH) 99 #define LAST_TYPE_CODE (TYPE_CODE_LIMIT - 1) 100 101 #if defined (TYPE_CODE_LENGTH) && (TYPE_CODE_LENGTH < MIN_TYPE_CODE_LENGTH) 102 # include ";; inconsistency: TYPE_CODE_LENGTH < MIN_TYPE_CODE_LENGTH" 103 #endif 104 105 #define TYPE_NAME_TABLE \ 106 { \ 107 /* 0x00 */ "false", \ 108 /* 0x01 */ "pair", \ 109 /* 0x02 */ "character", \ 110 /* 0x03 */ "quotation", \ 111 /* 0x04 */ 0, \ 112 /* 0x05 */ "uninterned-symbol", \ 113 /* 0x06 */ "flonum", \ 114 /* 0x07 */ 0, \ 115 /* 0x08 */ "constant", \ 116 /* 0x09 */ "extended-procedure", \ 117 /* 0x0A */ "vector", \ 118 /* 0x0B */ "return-code", \ 119 /* 0x0C */ 0, \ 120 /* 0x0D */ "manifest-closure", \ 121 /* 0x0E */ "bignum", \ 122 /* 0x0F */ "procedure", \ 123 /* 0x10 */ "entity", \ 124 /* 0x11 */ "delay", \ 125 /* 0x12 */ "environment", \ 126 /* 0x13 */ "promise", \ 127 /* 0x14 */ "extended-lambda", \ 128 /* 0x15 */ "comment", \ 129 /* 0x16 */ "non-marked-vector", \ 130 /* 0x17 */ "lambda", \ 131 /* 0x18 */ "primitive", \ 132 /* 0x19 */ "sequence", \ 133 /* 0x1A */ "fixnum", \ 134 /* 0x1B */ 0, \ 135 /* 0x1C */ "control-point", \ 136 /* 0x1D */ "interned-symbol", \ 137 /* 0x1e */ "string", \ 138 /* 0x1f */ "access", \ 139 /* 0x20 */ "hunk3-a", \ 140 /* 0x21 */ "definition", \ 141 /* 0x22 */ "broken-heart", \ 142 /* 0x23 */ "assignment", \ 143 /* 0x24 */ "triple", \ 144 /* 0x25 */ 0, \ 145 /* 0x26 */ "combination", \ 146 /* 0x27 */ "manifest-nm-vector", \ 147 /* 0x28 */ "compiled-entry", \ 148 /* 0x29 */ "lexpr", \ 149 /* 0x2a */ 0, \ 150 /* 0x2b */ "ephemeron", \ 151 /* 0x2c */ "variable", \ 152 /* 0x2d */ "the-environment", \ 153 /* 0x2e */ "syntax-error", \ 154 /* 0x2f */ "vector-1b", \ 155 /* 0x30 */ 0, \ 156 /* 0x31 */ "vector-16b", \ 157 /* 0x32 */ "reference-trap", \ 158 /* 0x33 */ 0, \ 159 /* 0x34 */ "conditional", \ 160 /* 0x35 */ "disjunction", \ 161 /* 0x36 */ "cell", \ 162 /* 0x37 */ "weak-cons", \ 163 /* 0x38 */ "quad", \ 164 /* 0x39 */ "linkage-section", \ 165 /* 0x3a */ "ratnum", \ 166 /* 0x3b */ "stack-environment", \ 167 /* 0x3c */ "recnum", \ 168 /* 0x3d */ "compiled-code-block", \ 169 /* 0x3e */ "record", \ 170 /* 0x3f */ 0 \ 171 } 172 173 /* Aliases */ 174 175 #define TC_FALSE TC_NULL 176 #define TC_MANIFEST_VECTOR TC_NULL 177 #define TC_BIT_STRING TC_VECTOR_1B 178 #define TC_VECTOR_8B TC_CHARACTER_STRING 179 #define TC_HUNK3 TC_HUNK3_B 180 181 #define UNMARKED_HISTORY_TYPE TC_HUNK3_A 182 #define MARKED_HISTORY_TYPE TC_HUNK3_B 183