Split TC_BYTEVECTOR from TC_CHARACTER_STRING to simplify transition.
authorChris Hanson <org/chris-hanson/cph>
Thu, 5 Jan 2017 19:07:34 +0000 (11:07 -0800)
committerChris Hanson <org/chris-hanson/cph>
Thu, 5 Jan 2017 19:07:34 +0000 (11:07 -0800)
src/microcode/const.h
src/microcode/debug.c
src/microcode/gcloop.c
src/microcode/interp.c
src/microcode/object.h
src/microcode/primutl.c
src/microcode/string.c
src/microcode/types.h
src/runtime/utabs.scm

index 50851ce5e52a51e4b6e7c8d9964a6c9c9cde977a..a4aa5a4b99a8988293d356125fcf20b5cadf348e 100644 (file)
@@ -101,7 +101,7 @@ USA.
 #define Are_The_Constants_Incompatible                                 \
 ((TC_FALSE != 0x00) || (TC_CONSTANT != 0x08) ||                                \
  (TC_FIXNUM != 0x1A) || (TC_BROKEN_HEART != 0x22) ||                   \
- (TC_BYTEVECTOR != 0x1E))
+ (TC_CHARACTER_STRING != 0x1E))
 
 /* The values used above are in sdata.h and types.h,
    check for consistency if the check below fails. */
index ea345049514236fc6de7d6d854c8e90443a3a647..00b070ab74cb18757e24fe69fbdbe99bd0b969a6 100644 (file)
@@ -379,7 +379,7 @@ do_printing (outf_channel stream, SCHEME_OBJECT Expr, bool Detailed)
       Expr = (MEMORY_REF ((MEMORY_REF (Expr, ASSIGN_NAME)), VARIABLE_SYMBOL));
       goto SPrint;
 
-    case TC_BYTEVECTOR:
+    case TC_CHARACTER_STRING:
       print_string (stream, Expr);
       return;
 
index 49b91b7a82dc4efcb6020d951adbd6878d5739ed..42a859ed95d591575cfc3887472db67435a770c5 100644 (file)
@@ -1281,7 +1281,7 @@ gc_type_t gc_type_map [N_TYPE_CODES] =
   GC_UNDEFINED,                        /* was TC_PCOMB1 */
   GC_VECTOR,                   /* TC_CONTROL_POINT */
   GC_PAIR,                     /* TC_INTERNED_SYMBOL */
-  GC_VECTOR,                   /* TC_BYTEVECTOR */
+  GC_VECTOR,                   /* TC_CHARACTER_STRING */
   GC_PAIR,                     /* TC_ACCESS */
   GC_TRIPLE,                   /* TC_HUNK3_A */
   GC_PAIR,                     /* TC_DEFINITION */
@@ -1302,7 +1302,7 @@ gc_type_t gc_type_map [N_TYPE_CODES] =
   GC_UNDEFINED,                        /* was TC_PCOMB0 */
   GC_VECTOR,                   /* TC_VECTOR_16B */
   GC_SPECIAL,                  /* TC_REFERENCE_TRAP */
-  GC_UNDEFINED,                        /* 0x33 */
+  GC_VECTOR,                   /* TC_BYTEVECTOR */
   GC_TRIPLE,                   /* TC_CONDITIONAL */
   GC_PAIR,                     /* TC_DISJUNCTION */
   GC_CELL,                     /* TC_CELL */
index 97ab49037887743ea53a12eb19b69dfe082ca3d8..33f09dd50295366ef91de33b9bcd0f9c6605c1a6 100644 (file)
@@ -408,6 +408,7 @@ Interpret (int pop_return_p)
     case TC_BIG_FIXNUM:         /* The self evaluating items */
     case TC_BIG_FLONUM:
     case TC_BYTEVECTOR:
+    case TC_CHARACTER_STRING:
     case TC_CHARACTER:
     case TC_COMPILED_CODE_BLOCK:
     case TC_COMPLEX:
index 368d2c263b9011e940eea59a24821e27dc95e2bb..5c0c22a10b4364ef70d2e6ef08e9dadd8e837a61 100644 (file)
@@ -176,6 +176,7 @@ extern SCHEME_OBJECT * memory_base;
 #define COMPLEX_P(object) ((OBJECT_TYPE (object)) == TC_COMPLEX)
 #define CHARACTER_P(object) ((OBJECT_TYPE (object)) == TC_CHARACTER)
 #define BYTEVECTOR_P(object) ((OBJECT_TYPE (object)) == TC_BYTEVECTOR)
+#define STRING_P(object) ((OBJECT_TYPE (object)) == TC_CHARACTER_STRING)
 #define BIT_STRING_P(object) ((OBJECT_TYPE (object)) == TC_BIT_STRING)
 #define CELL_P(object) ((OBJECT_TYPE (object)) == TC_CELL)
 #define PAIR_P(object) ((OBJECT_TYPE (object)) == TC_LIST)
@@ -252,8 +253,6 @@ extern SCHEME_OBJECT * memory_base;
 \f
 /* String Operations */
 
-#define STRING_P BYTEVECTOR_P
-
 /* Add 1 byte to length to account for '\0' at end of string.
    Add 1 word to length to account for string header word. */
 #define STRING_LENGTH_TO_GC_LENGTH(n_chars)                            \
index c83fe1de4a64b043177befd828c3cac1d0a206c2..511ce591bbf2f9a49afc58ac48598b719cb793dd 100644 (file)
@@ -515,7 +515,7 @@ import_primitive_table (SCHEME_OBJECT * entries,
       long arity = (FIXNUM_TO_LONG (*entries++));
       SCHEME_OBJECT prim
        = (find_primitive
-          ((MAKE_POINTER_OBJECT (TC_BYTEVECTOR, entries)),
+          ((MAKE_POINTER_OBJECT (TC_CHARACTER_STRING, entries)),
            true, true, arity));
 
       if (!PRIMITIVE_P (prim))
index 309667013082ee66980ee53e06deb5f7cd5d2e37..ebbb4627411891e913fe5320d74c413f1b4831ee 100644 (file)
@@ -33,7 +33,7 @@ SCHEME_OBJECT
 allocate_string (unsigned long nbytes)
 {
   SCHEME_OBJECT result
-    = (allocate_non_marked_vector (TC_BYTEVECTOR,
+    = (allocate_non_marked_vector (TC_CHARACTER_STRING,
                                   (STRING_LENGTH_TO_GC_LENGTH (nbytes)),
                                   true));
   SET_STRING_LENGTH (result, nbytes);
@@ -44,7 +44,7 @@ SCHEME_OBJECT
 allocate_string_no_gc (unsigned long nbytes)
 {
   SCHEME_OBJECT result
-    = (allocate_non_marked_vector (TC_BYTEVECTOR,
+    = (allocate_non_marked_vector (TC_CHARACTER_STRING,
                                   (STRING_LENGTH_TO_GC_LENGTH (nbytes)),
                                   false));
   SET_STRING_LENGTH (result, nbytes);
index 31f749899a1b1e22defa643dfe8afcd10bc405ad..451157be0a47f8937f5e2ce9a6a2314243865fe4 100644 (file)
@@ -56,7 +56,7 @@ USA.
 /* #define TC_PCOMB1                   0x1B */
 #define TC_CONTROL_POINT               0x1C
 #define TC_INTERNED_SYMBOL             0x1D
-#define TC_BYTEVECTOR                  0x1E
+#define TC_CHARACTER_STRING            0x1E
 #define TC_ACCESS                      0x1F
 #define TC_HUNK3_A                     0x20
 #define TC_DEFINITION                  0x21
@@ -77,7 +77,7 @@ USA.
 /* #define TC_PCOMB0                   0x30 */
 #define TC_VECTOR_16B                  0x31
 #define TC_REFERENCE_TRAP              0x32
-/* #define TC_UNUSED_33                        0x33 */
+#define TC_BYTEVECTOR                  0x33
 #define TC_CONDITIONAL                 0x34
 #define TC_DISJUNCTION                 0x35
 #define TC_CELL                                0x36
@@ -134,7 +134,7 @@ USA.
   /* 0x1B */                   0,                                      \
   /* 0x1C */                   "control-point",                        \
   /* 0x1D */                   "interned-symbol",                      \
-  /* 0x1e */                   "bytevector",                           \
+  /* 0x1e */                   "string",                               \
   /* 0x1f */                   "access",                               \
   /* 0x20 */                   "hunk3-a",                              \
   /* 0x21 */                   "definition",                           \
@@ -155,7 +155,7 @@ USA.
   /* 0x30 */                   0,                                      \
   /* 0x31 */                   "vector-16b",                           \
   /* 0x32 */                   "reference-trap",                       \
-  /* 0x33 */                   0,                                      \
+  /* 0x33 */                   "bytevector",                           \
   /* 0x34 */                   "conditional",                          \
   /* 0x35 */                   "disjunction",                          \
   /* 0x36 */                   "cell",                                 \
index add288e0d872431d7ee1bfd361adf65e9efd6b2d..93837acd93dee0d8a2a6285d00af3506dbfeba88 100644 (file)
@@ -265,7 +265,7 @@ USA.
     (BIGNUM BIG-FIXNUM)
     (PROMISE DELAYED)
     (FIXNUM ADDRESS POSITIVE-FIXNUM NEGATIVE-FIXNUM)
-    (BYTEVECTOR STRING CHARACTER-STRING VECTOR-8B)
+    (STRING CHARACTER-STRING VECTOR-8B)
     (HUNK3-A UNMARKED-HISTORY)
     (TRIPLE HUNK3 HUNK3-B MARKED-HISTORY)
     (REFERENCE-TRAP UNASSIGNED)