From 5cfa9c7450bb599c7f0fabed4a7f0d17e9a38142 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 27 Jul 2006 00:03:57 +0000 Subject: [PATCH] Add missing guarantors for symbols and strings. --- v7/src/runtime/runtime.pkg | 8 +++++++- v7/src/runtime/string.scm | 7 +++---- v7/src/runtime/symbol.scm | 16 ++++------------ 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index bcf86f1d8..e02e3d0f2 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -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 diff --git a/v7/src/runtime/string.scm b/v7/src/runtime/string.scm index de3ceef37..c15c09609 100644 --- a/v7/src/runtime/string.scm +++ b/v7/src/runtime/string.scm @@ -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))) diff --git a/v7/src/runtime/symbol.scm b/v7/src/runtime/symbol.scm index d7e73700f..4c5f18be1 100644 --- a/v7/src/runtime/symbol.scm +++ b/v7/src/runtime/symbol.scm @@ -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) -- 2.25.1