Fix DBG-INFO-VECTOR? so that it accepts both new and old formats.
authorTaylor R Campbell <campbell@mumble.net>
Fri, 18 Sep 2009 20:56:14 +0000 (16:56 -0400)
committerTaylor R Campbell <campbell@mumble.net>
Fri, 18 Sep 2009 20:56:14 +0000 (16:56 -0400)
src/runtime/infstr.scm

index b5eaa598112b8ae14faf4771b9d1a8550be3a8f8..f16ebc168efcb6a7ce10d6274d4863158a26e408 100644 (file)
@@ -33,6 +33,7 @@ USA.
                   (named
                    ((ucode-primitive string->symbol)
                     "#[(runtime compiler-info)dbg-info-vector]"))
+                  (predicate new-dbg-info-vector?)
                   (conc-name dbg-info-vector/))
   (compilation-type #f read-only #t)
   (root-block #f read-only #t)
@@ -40,6 +41,10 @@ USA.
   (tl-bound #f read-only #t)
   (tl-free #f read-only #t))
 
+(define (dbg-info-vector? object)
+  (or (new-dbg-info-vector? object)
+      (old-dbg-info-vector? object)))
+
 (define (old-dbg-info-vector? object)
   (and (pair? object)
        (eq? (car object)
@@ -50,7 +55,7 @@ USA.
         (lambda ()
           (error:wrong-type-argument info "dbg-info-vector"
                                      'DBG-INFO-VECTOR/BLOCKS-VECTOR))))
-    (cond ((dbg-info-vector? info)
+    (cond ((new-dbg-info-vector? info)
           (vector-append (vector (dbg-info-vector/root-block info))
                          (dbg-info-vector/other-blocks info)))
          ((old-dbg-info-vector? info)
@@ -65,7 +70,7 @@ USA.
         (lambda ()
           (error:wrong-type-argument info "dbg-info-vector"
                                      'DBG-INFO-VECTOR/PURIFICATION-ROOT))))
-    (cond ((dbg-info-vector? info)
+    (cond ((new-dbg-info-vector? info)
           (dbg-info-vector/other-blocks info))
          ((old-dbg-info-vector? info)
           (let ((items (cdr info)))