From 8d98d3ea2b98c70c81d67740cbda4e220f06e8ed Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 8 Sep 2005 19:12:49 +0000 Subject: [PATCH] Standardize guarantees in record package. --- v7/src/runtime/record.scm | 16 ++++------------ v7/src/runtime/runtime.pkg | 5 ++++- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/v7/src/runtime/record.scm b/v7/src/runtime/record.scm index 28db8ece2..608dffdff 100644 --- a/v7/src/runtime/record.scm +++ b/v7/src/runtime/record.scm @@ -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") ;;;; Runtime support for DEFINE-STRUCTURE diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 851161f23..857106f4e 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -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 -- 2.25.1