decompile: avoid single-subexpression begin0
At the bytecode level, `(begin0 E)` does not make E in tail position with respect to the `begin0` form. It does at the source level, so generate suitable source.
This commit is contained in:
parent
2a1dd00320
commit
209a4ff631
|
@ -505,8 +505,11 @@
|
|||
`(begin ,@(for/list ([expr (in-list exprs)])
|
||||
(decompile-expr expr globs stack closed)))]
|
||||
[(struct beg0 (exprs))
|
||||
`(begin0 ,@(for/list ([expr (in-list exprs)])
|
||||
(decompile-expr expr globs stack closed)))]
|
||||
`(begin0
|
||||
,@(for/list ([expr (in-list exprs)])
|
||||
(decompile-expr expr globs stack closed))
|
||||
;; Make sure a single expression doesn't look like tail position:
|
||||
,@(if (null? (cdr exprs)) (list #f) null))]
|
||||
[(struct with-cont-mark (key val body))
|
||||
`(with-continuation-mark
|
||||
,(decompile-expr key globs stack closed)
|
||||
|
|
Loading…
Reference in New Issue
Block a user