Allocate new type unicode-string.
authorChris Hanson <org/chris-hanson/cph>
Wed, 12 Apr 2017 04:21:07 +0000 (21:21 -0700)
committerChris Hanson <org/chris-hanson/cph>
Wed, 12 Apr 2017 04:21:07 +0000 (21:21 -0700)
src/microcode/gcloop.c
src/microcode/types.h
src/runtime/host-adapter.scm

index 4d50a606e0d89216f494faf89381583936b7c2a9..d28552a4f48d0b34113ae44aeddf16d0d415a2f4 100644 (file)
@@ -1280,7 +1280,7 @@ gc_type_t gc_type_map [N_TYPE_CODES] =
   GC_NON_POINTER,              /* TC_PRIMITIVE */
   GC_PAIR,                     /* TC_SEQUENCE */
   GC_NON_POINTER,              /* TC_FIXNUM */
-  GC_UNDEFINED,                        /* was TC_PCOMB1 */
+  GC_VECTOR,                   /* TC_UNICODE_STRING */
   GC_VECTOR,                   /* TC_CONTROL_POINT */
   GC_PAIR,                     /* TC_INTERNED_SYMBOL */
   GC_VECTOR,                   /* TC_CHARACTER_STRING */
index 451157be0a47f8937f5e2ce9a6a2314243865fe4..13d2edca8166b4d380bb0ac05805a0d108dd768a 100644 (file)
@@ -26,7 +26,7 @@ USA.
 
 /* Type code definitions */
 \f
-#define TC_FALSE                               0x00
+#define TC_FALSE                       0x00
 #define TC_LIST                                0x01
 #define TC_CHARACTER                   0x02
 #define        TC_SCODE_QUOTE                  0x03
@@ -53,7 +53,7 @@ USA.
 #define TC_PRIMITIVE                   0x18
 #define TC_SEQUENCE                    0x19
 #define TC_FIXNUM                      0x1A
-/* #define TC_PCOMB1                   0x1B */
+#define TC_UNICODE_STRING              0x1B
 #define TC_CONTROL_POINT               0x1C
 #define TC_INTERNED_SYMBOL             0x1D
 #define TC_CHARACTER_STRING            0x1E
@@ -131,7 +131,7 @@ USA.
   /* 0x18 */                   "primitive",                            \
   /* 0x19 */                   "sequence",                             \
   /* 0x1A */                   "fixnum",                               \
-  /* 0x1B */                   0,                                      \
+  /* 0x1B */                   "unicode-string",                       \
   /* 0x1C */                   "control-point",                        \
   /* 0x1D */                   "interned-symbol",                      \
   /* 0x1e */                   "string",                               \
index a77e5d93d89b0fb0c8c4196f39a693eb544e2e55..61b17578426cfed09b12a1fb35f715a5b7e7c775 100644 (file)
@@ -51,6 +51,7 @@ USA.
            (or (microcode-type/name->code name)
                (cond ((eq? name 'bytevector) #x33)
                      ((eq? name 'tagged-object) #x25)
+                     ((eq? name 'unicode-string) #x1B)
                      (else #t))
                (error "MICROCODE-TYPE: Unknown name" name))))
        (->environment '()))
@@ -75,13 +76,15 @@ USA.
                       (else #f))))
          (define (create-links-from-description description)
            (let ((environment
-                  (find-package-environment (package-description/name description))))
+                  (find-package-environment
+                   (package-description/name description))))
              (let ((bindings (package-description/exports description)))
                (let ((n (vector-length bindings)))
                  (do ((i 0 (fix:+ i 1)))
                      ((fix:= i n))
                    (let ((binding (vector-ref bindings i)))
-                     (link-variables (find-package-environment (vector-ref binding 1))
+                     (link-variables (find-package-environment
+                                      (vector-ref binding 1))
                                      (if (fix:= (vector-length binding) 3)
                                          (vector-ref binding 2)
                                          (vector-ref binding 0))