minor optimization: don't wrap a 'begin' that contains a single expression

svn: r2877
This commit is contained in:
Matthew Flatt 2006-05-09 15:52:06 +00:00
parent d1b9071732
commit 3f7a7d28c0
2 changed files with 6 additions and 1 deletions

View File

@ -305,7 +305,7 @@
e
(namespace-syntax-introduce
(datum->syntax-object #f e))))])
e2)
e2)
e)
immediate-eval?))))

View File

@ -473,6 +473,11 @@
(rebuild expr (list (cons #'rhs new-rhs))))))]
;; Wrap subexpressions only
[(begin e)
;; Single expression: no mark
(certify
expr
#`(begin #,(annotate (syntax e) trans?)))]
[(begin . body)
(with-mark expr
(certify