Standardize guarantees in record package.
authorChris Hanson <org/chris-hanson/cph>
Thu, 8 Sep 2005 19:12:49 +0000 (19:12 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 8 Sep 2005 19:12:49 +0000 (19:12 +0000)
v7/src/runtime/record.scm
v7/src/runtime/runtime.pkg

index 28db8ece2d87252809f88001216480332c7d2280..608dffdff71ee6bbc9bb3a825da92fac77d9cedc 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: record.scm,v 1.53 2005/03/19 05:21:21 cph Exp $
+$Id: record.scm,v 1.54 2005/09/08 19:12:37 cph Exp $
 
 Copyright 1989,1990,1991,1993,1994,1996 Massachusetts Institute of Technology
 Copyright 1997,2002,2003,2004,2005 Massachusetts Institute of Technology
@@ -464,10 +464,6 @@ USA.
        (substring string 1 (fix:- n 1))
        string)))
 
-(define-integrable (guarantee-list-of-unique-symbols object procedure)
-  (if (not (list-of-unique-symbols? object))
-      (error:wrong-type-argument object "list of unique symbols" procedure)))
-
 (define (list-of-unique-symbols? object)
   (and (list-of-type? object symbol?)
        (let loop ((elements object))
@@ -477,13 +473,9 @@ USA.
                 (loop (cdr elements)))
             #t))))
 
-(define-integrable (guarantee-record-type record-type procedure)
-  (if (not (record-type? record-type))
-      (error:wrong-type-argument record-type "record type" procedure)))
-
-(define-integrable (guarantee-record record caller)
-  (if (not (record? record))
-      (error:wrong-type-argument record "record" caller)))
+(define-guarantee list-of-unique-symbols "list of unique symbols")
+(define-guarantee record-type "record type")
+(define-guarantee record "record")
 \f
 ;;;; Runtime support for DEFINE-STRUCTURE
 
index 851161f232fe224ba61071d0f19180f1ab4f534a..857106f4e486e5257757fba0f3ba0062d9cafc3a 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: runtime.pkg,v 14.562 2005/09/07 19:20:09 cph Exp $
+$Id: runtime.pkg,v 14.563 2005/09/08 19:12:49 cph Exp $
 
 Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
 Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology
@@ -2773,6 +2773,9 @@ USA.
          define-structure/list-modifier
          define-structure/vector-accessor
          define-structure/vector-modifier
+         error:not-list-of-unique-symbols
+         error:not-record
+         error:not-record-type
          guarantee-list-of-unique-symbols
          guarantee-record
          guarantee-record-type