fix meta/check-dists
(Also, use a hash table instead of an association list for a query cache.)
This commit is contained in:
parent
59e41ce05f
commit
1c6354e235
|
@ -25,8 +25,11 @@
|
||||||
(set-racket-tree! racket/ racket-base/ racket/-name null)
|
(set-racket-tree! racket/ racket-base/ racket/-name null)
|
||||||
|
|
||||||
(set-bin-files-delayed-lists!
|
(set-bin-files-delayed-lists!
|
||||||
;; FIXME: hard-wired list of binary-specific files
|
;; FIXME: hard-wired list of binary-specific files;
|
||||||
'())
|
;; we assume there are none. This value is a list of
|
||||||
|
;; lists, where a given file must appear in every list
|
||||||
|
;; to be ok for the distribution.
|
||||||
|
'(()))
|
||||||
|
|
||||||
(expand-spec 'distributions)
|
(expand-spec 'distributions)
|
||||||
|
|
||||||
|
|
|
@ -398,11 +398,15 @@
|
||||||
;; contents is still marked.
|
;; contents is still marked.
|
||||||
(define (primitive-spec->filter spec)
|
(define (primitive-spec->filter spec)
|
||||||
(define (add-query-cache! t r)
|
(define (add-query-cache! t r)
|
||||||
(prop-set! (tree-path t) 'queries
|
(hash-set! (prop-get (tree-path t) 'queries
|
||||||
(cons (cons spec r) (prop-get (tree-path t) 'queries '()))))
|
(lambda () (let ([ht (make-hash)])
|
||||||
|
(prop-set! (tree-path t) 'queries ht)
|
||||||
|
ht)))
|
||||||
|
spec
|
||||||
|
r))
|
||||||
(define (make-cached filter)
|
(define (make-cached filter)
|
||||||
(lambda (t)
|
(lambda (t)
|
||||||
(cond [(assoc spec (prop-get (tree-path t) 'queries '())) => cdr]
|
(cond [(hash-ref (prop-get (tree-path t) 'queries #hash()) spec #f)]
|
||||||
[else (let ([r (filter t)])
|
[else (let ([r (filter t)])
|
||||||
(case r
|
(case r
|
||||||
[(+ -) (let loop ([t t])
|
[(+ -) (let loop ([t t])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user