The optimizer now ignores expressions ignored by the typechecker.

original commit: 82b064a520405575ea69e453dfd768ac2df2b17c
This commit is contained in:
Vincent St-Amour 2010-07-23 17:03:02 -04:00
parent e9d9c2aca9
commit a479e9d5e3

View File

@ -69,7 +69,12 @@
(current-output-port))))
(begin0
(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))
(when (and *log-optimizations?*
*log-optimizatons-to-log-file?*)