Skip to content

Commit 606c454

Browse files
committed
Mark '(begin), '(end) effect-free
1 parent f5c4d3f commit 606c454

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ast.scm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@
405405

406406
;; identify some expressions that are safe to repeat
407407
(define (effect-free? e)
408-
(or (not (pair? e)) (ssavalue? e) (sym-dot? e) (quoted? e) (memq (car e) '(null true false))))
408+
(or (not (pair? e)) (ssavalue? e) (sym-dot? e) (quoted? e)
409+
(memq (car e) '(null true false begin end))))
409410

410411
;; get the variable name part of a declaration, x::int => x
411412
(define (decl-var v)

0 commit comments

Comments
 (0)