Add missing guarantors for symbols and strings.
authorChris Hanson <org/chris-hanson/cph>
Thu, 27 Jul 2006 00:03:57 +0000 (00:03 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 27 Jul 2006 00:03:57 +0000 (00:03 +0000)
v7/src/runtime/runtime.pkg
v7/src/runtime/string.scm
v7/src/runtime/symbol.scm

index bcf86f1d866fbf7cde047fc8c19f1e9b88fddce6..e02e3d0f2040a512748f15eb5f5c474efb70eb25 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: runtime.pkg,v 14.588 2006/07/27 00:00:06 cph Exp $
+$Id: runtime.pkg,v 14.589 2006/07/27 00:03:46 cph Exp $
 
 Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
 Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology
@@ -493,6 +493,9 @@ USA.
   (files "symbol")
   (parent (runtime))
   (export ()
+         error:not-interned-symbol
+         error:not-symbol
+         error:not-uninterned-symbol
          guarantee-interned-symbol
          guarantee-symbol
          guarantee-uninterned-symbol
@@ -763,6 +766,8 @@ USA.
          burst-string
          char->string
          decorated-string-append
+         error:not-string
+         error:not-xstring
          external-string-length
          external-string?
          guarantee-string
@@ -770,6 +775,7 @@ USA.
          guarantee-substring
          guarantee-substring-end-index
          guarantee-substring-start-index
+         guarantee-xstring
          hexadecimal->vector-8b
          list->string
          make-string
index de3ceef37a6d14bae9c3ee1abc417db8ef4ee59f..c15c09609010ebf15b1db297364eda497442f084 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: string.scm,v 14.59 2006/02/26 03:00:55 cph Exp $
+$Id: string.scm,v 14.60 2006/07/27 00:03:52 cph Exp $
 
 Copyright 1986,1987,1988,1992,1993,1994 Massachusetts Institute of Technology
 Copyright 1995,1997,1999,2000,2001,2002 Massachusetts Institute of Technology
@@ -1441,9 +1441,8 @@ USA.
 ;; menaingful message. Structuring the code this way significantly
 ;; reduces code bloat from large integrated procedures.
 
-(define-integrable (guarantee-string object procedure)
-  (if (not (string? object))
-      (error:wrong-type-argument object "string" procedure)))
+(define-guarantee string "string")
+(define-guarantee xstring "xstring")
 
 (define-integrable (guarantee-2-strings object1 object2 procedure)
   (if (not (and (string? object1) (string? object2)))
index d7e73700f15ca81c7bf29982949b2b86a89eb36a..4c5f18be14c89cd3e49ccf98e54c081356b884a9 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: symbol.scm,v 1.20 2006/06/22 15:17:50 cph Exp $
+$Id: symbol.scm,v 1.21 2006/07/27 00:03:57 cph Exp $
 
 Copyright 1992,1993,2001,2003,2004,2005 Massachusetts Institute of Technology
 Copyright 2006 Massachusetts Institute of Technology
@@ -39,17 +39,9 @@ USA.
 (define-integrable (uninterned-symbol? object)
   (object-type? (ucode-type uninterned-symbol) object))
 
-(define-integrable (guarantee-symbol object caller)
-  (if (not (symbol? object))
-      (error:wrong-type-argument object "symbol" caller)))
-
-(define-integrable (guarantee-interned-symbol object caller)
-  (if (not (interned-symbol? object))
-      (error:wrong-type-argument object "interned symbol" caller)))
-
-(define-integrable (guarantee-uninterned-symbol object caller)
-  (if (not (uninterned-symbol? object))
-      (error:wrong-type-argument object "uninterned symbol" caller)))
+(define-guarantee symbol "symbol")
+(define-guarantee interned-symbol "interned symbol")
+(define-guarantee uninterned-symbol "uninterned symbol")
 
 (define (string->uninterned-symbol string)
   (make-uninterned-symbol (if (string? string)