From: Chris Hanson Date: Fri, 21 Apr 2017 07:21:41 +0000 (-0700) Subject: Add tagging support for unicode-string. X-Git-Tag: mit-scheme-pucked-9.2.12~158^2~27 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=fd09dd5c50b95d8a1903ce5d328a1133c006017b;p=mit-scheme.git Add tagging support for unicode-string. Also generate better error for unknown type codes. --- diff --git a/src/runtime/predicate-tagging.scm b/src/runtime/predicate-tagging.scm index b64d26235..bd63a7c3b 100644 --- a/src/runtime/predicate-tagging.scm +++ b/src/runtime/predicate-tagging.scm @@ -147,7 +147,8 @@ USA. (define (object->tag object) (let ((code (object-type object))) (or (vector-ref primitive-tags code) - ((vector-ref primitive-tag-methods code) object)))) + ((vector-ref primitive-tag-methods code) object) + (error "Unknown type code:" code)))) (define (object->datum object) (cond ((tagged-object? object) (system-pair-cdr object)) @@ -190,6 +191,7 @@ USA. (define-primitive-predicate 'recnum number?) (define-primitive-predicate 'stack-environment stack-address?) (define-primitive-predicate 'string string?) + (define-primitive-predicate 'unicode-string string?) (define-primitive-predicate 'uninterned-symbol uninterned-symbol?) (define-primitive-predicate 'vector vector?) (define-primitive-predicate 'vector-1b bit-string?)