Changed the optimizer's test harness to ignore type tables.
This commit is contained in:
parent
cb0e058cff
commit
e8a0a26c2f
|
@ -5,17 +5,22 @@
|
|||
;; we compare the expansion of automatically optimized and hand optimized
|
||||
;; modules
|
||||
(define (read-and-expand file)
|
||||
;; drop the "module", its name and its language, so that we can write the
|
||||
;; 2 versions of each test in different languages (typed and untyped) if
|
||||
;; need be
|
||||
(cdddr
|
||||
(syntax->datum
|
||||
(parameterize ([current-namespace (make-base-namespace)])
|
||||
(with-handlers
|
||||
([exn:fail? (lambda (exn)
|
||||
(printf "~a\n" (exn-message exn))
|
||||
#'(#f #f #f #f))]) ; for cdddr
|
||||
(expand (with-input-from-file file read-syntax)))))))
|
||||
;; drop the type tables added by typed scheme, since they can be in a
|
||||
;; different order each time, and that would make tests fail when they
|
||||
;; shouldn't
|
||||
(filter
|
||||
;; drop the "module", its name and its language, so that we can write
|
||||
;; the 2 versions of each test in different languages (typed and
|
||||
;; untyped) if need be
|
||||
(match-lambda [(list 'define-values-for-syntax '() _ ...) #f] [_ #t])
|
||||
(cadddr
|
||||
(syntax->datum
|
||||
(parameterize ([current-namespace (make-base-namespace)])
|
||||
(with-handlers
|
||||
([exn:fail? (lambda (exn)
|
||||
(printf "~a\n" (exn-message exn))
|
||||
#'(#f #f #f (#f)))]) ; for cadddr
|
||||
(expand (with-input-from-file file read-syntax))))))))
|
||||
|
||||
(define (test gen)
|
||||
(let-values (((base name _) (split-path gen)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user