Turned the optimizer on by default.

original commit: 8baa1682af76965400ab1071a46f8ba50f7c7165
This commit is contained in:
Vincent St-Amour 2010-10-05 15:56:25 -04:00
parent 105b82fb70
commit 057043c493
2 changed files with 6 additions and 3 deletions

View File

@ -20,9 +20,12 @@
(define (mb-core stx)
(syntax-parse stx
[(mb (~optional (~and #:optimize (~bind [opt? #'#t]))) forms ...)
[(mb (~optional (~or (~and #:optimize (~bind [opt? #'#t])) ; kept for backward compatibility
(~and #:no-optimize (~bind [opt? #'#f]))))
forms ...)
(let ([pmb-form (syntax/loc stx (#%plain-module-begin forms ...))])
(parameterize ([optimize? (or (optimize?) (attribute opt?))])
(parameterize ([optimize? (or (and (not (attribute opt?)) (optimize?))
(and (attribute opt?) (syntax-e (attribute opt?))))])
(tc-setup
stx pmb-form 'module-begin new-mod tc-module after-code
(with-syntax*

View File

@ -25,7 +25,7 @@ at least theoretically.
;; provide macros
rep utils typecheck infer env private types)
(define optimize? (make-parameter #f))
(define optimize? (make-parameter #t))
(define-for-syntax enable-contracts? #f)
(define show-input? (make-parameter #f))