~ chicken-core (chicken-5) 806b378fd834154e042254d5cd2e4d29d005cc6a
commit 806b378fd834154e042254d5cd2e4d29d005cc6a
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Sat Jan 29 13:03:22 2011 +0100
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Sat Jan 29 13:03:22 2011 +0100
handle #(N ...) in specialization templates
diff --git a/scrutinizer.scm b/scrutinizer.scm
index 71613ad4..1303f126 100755
--- a/scrutinizer.scm
+++ b/scrutinizer.scm
@@ -67,7 +67,7 @@
;
; SPECIALIZATION = ((MVAL ... [#!rest MVAL]) TEMPLATE)
; MVAL = VAL | (not VAL) | (or VAL ...)
-; TEMPLATE = #(INDEX)
+; TEMPLATE = #(INDEX [...])
; | INTEGER | SYMBOL | STRING
; | (quote CONSTANT)
; | (TEMPLATE . TEMPLATE)
@@ -721,6 +721,11 @@
(= 1 (vector-length x))
(integer? (vector-ref x 0)))
(list-ref args (sub1 (vector-ref x 0))))
+ ((and (vector? x)
+ (= 2 (vector-length x))
+ (integer? (vector-ref x 0))
+ (eq? '... (vector-ref x 1)))
+ (list-tail args (sub1 (vector-ref x 0))))
((not (pair? x)) x)
((eq? 'quote (car x)) x) ; to handle numeric constants
(else (cons (subst (car x)) (subst (cdr x))))))
Trap