From f1bcec74f86bbf66318d9a800a6c0c6873bd13c5 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Fri, 18 Sep 2009 16:56:14 -0400 Subject: [PATCH] Fix DBG-INFO-VECTOR? so that it accepts both new and old formats. --- src/runtime/infstr.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/runtime/infstr.scm b/src/runtime/infstr.scm index b5eaa5981..f16ebc168 100644 --- a/src/runtime/infstr.scm +++ b/src/runtime/infstr.scm @@ -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))) -- 2.25.1