Dynamic-require the optimizer.
This commit is contained in:
parent
e4039661d4
commit
c414b09ecf
|
@ -4,7 +4,6 @@
|
||||||
(except-in syntax/parse id)
|
(except-in syntax/parse id)
|
||||||
unstable/mutated-vars
|
unstable/mutated-vars
|
||||||
racket/pretty
|
racket/pretty
|
||||||
(optimizer optimizer)
|
|
||||||
(private type-contract)
|
(private type-contract)
|
||||||
(types utils convenience)
|
(types utils convenience)
|
||||||
(typecheck typechecker provide-handling tc-toplevel)
|
(typecheck typechecker provide-handling tc-toplevel)
|
||||||
|
@ -27,8 +26,12 @@
|
||||||
(define (maybe-optimize body)
|
(define (maybe-optimize body)
|
||||||
;; do we optimize?
|
;; do we optimize?
|
||||||
(if (optimize?)
|
(if (optimize?)
|
||||||
(begin0 (map optimize-top (syntax->list body))
|
(let ([optimize-top
|
||||||
(do-time "Optimized"))
|
(begin0 (dynamic-require 'typed-scheme/optimizer/optimizer
|
||||||
|
'optimize-top)
|
||||||
|
(do-time "Loading optimizer"))])
|
||||||
|
(begin0 (map optimize-top (syntax->list body))
|
||||||
|
(do-time "Optimized")))
|
||||||
body))
|
body))
|
||||||
|
|
||||||
(define-syntax-rule (tc-setup orig-stx stx expand-ctxt fully-expanded-stx checker result . body)
|
(define-syntax-rule (tc-setup orig-stx stx expand-ctxt fully-expanded-stx checker result . body)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user