The optimizer now ignores expressions ignored by the typechecker.

This commit is contained in:
Vincent St-Amour 2010-07-23 17:03:02 -04:00
parent ea580e6ff8
commit 82b064a520

View File

@ -69,7 +69,12 @@
(current-output-port)))) (current-output-port))))
(begin0 (begin0
(parameterize ([current-output-port port] (parameterize ([current-output-port port]
[optimize (syntax-parser [e:opt-expr #'e.opt])]) [optimize (syntax-parser
[e:expr
#:when (not (syntax-property #'e 'typechecker:ignore))
#:with e*:opt-expr #'e
#'e*.opt]
[e:expr #'e])])
((optimize) stx)) ((optimize) stx))
(when (and *log-optimizations?* (when (and *log-optimizations?*
*log-optimizatons-to-log-file?*) *log-optimizatons-to-log-file?*)