Put guarantee and friends into "boot" for cold-load access.
authorChris Hanson <org/chris-hanson/cph>
Tue, 16 Jan 2018 04:05:18 +0000 (20:05 -0800)
committerChris Hanson <org/chris-hanson/cph>
Tue, 16 Jan 2018 04:31:17 +0000 (20:31 -0800)
src/runtime/boot.scm
src/runtime/predicate-metadata.scm
src/runtime/runtime.pkg

index 88cffd2d9b809aa2d34a58b8c645757d6951a0d9..84e1cfa373a47236c3f35e0da7193e5e3987fa5a 100644 (file)
@@ -377,6 +377,25 @@ USA.
          unspecific))
   unspecific)
 
+(define (guarantee predicate object #!optional caller)
+  (if (predicate object)
+      object
+      (error:not-a predicate object caller)))
+
+(define (error:not-a predicate object #!optional caller)
+  (error:wrong-type-argument object (predicate-description predicate) caller))
+
+(define (guarantee-list-of predicate object #!optional caller)
+  (if (not (list-of-type? object predicate))
+      (error:not-a-list-of predicate object caller))
+  object)
+
+(define (error:not-a-list-of predicate object #!optional caller)
+  (error:wrong-type-argument object
+                             (string-append "list of "
+                                            (predicate-description predicate))
+                             caller))
+
 ;;;; Miscellany
 
 (define (object-constant? object)
index d572b7586b57c3c95dc3804c9056270c34754faa..b488517657d7f8def1ad434d77d1436ba7add96e 100644 (file)
@@ -70,25 +70,6 @@ USA.
     (if (not tag)
         (error:not-a predicate? predicate caller))
     tag))
-
-(define (guarantee predicate object #!optional caller)
-  (if (predicate object)
-      object
-      (error:not-a predicate object caller)))
-
-(define (error:not-a predicate object #!optional caller)
-  (error:wrong-type-argument object (predicate-description predicate) caller))
-
-(define (guarantee-list-of predicate object #!optional caller)
-  (if (not (list-of-type? object predicate))
-      (error:not-a-list-of predicate object caller))
-  object)
-
-(define (error:not-a-list-of predicate object #!optional caller)
-  (error:wrong-type-argument object
-                             (string-append "list of "
-                                            (predicate-description predicate))
-                             caller))
 \f
 (define (make-tag name predicate caller #!optional extra description)
   (guarantee tag-name? name caller)
index a1a646d53c9641c7c9b5b0a348bd00f631cd4e68..57b52c920d18250e89756d97141537cd6ac83b7f 100644 (file)
@@ -157,8 +157,12 @@ USA.
          default-object?
          define-pp-describer
          define-unparser-method
+         error:not-a
+         error:not-a-list-of
          gc-space-status
          general-unparser-method
+         guarantee
+         guarantee-list-of
          interrupt-bit/after-gc
          interrupt-bit/gc
          interrupt-bit/global-1
@@ -1838,10 +1842,6 @@ USA.
   (files "predicate-metadata")
   (parent (runtime))
   (export ()
-         error:not-a
-         error:not-a-list-of
-         guarantee
-         guarantee-list-of
          predicate-description
          predicate-name
          set-predicate<=!)