File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 264
264
(define (reset-gensyms )
265
265
(set! *current-gensyms* *gensyms*))
266
266
267
- (define (some-gensym? x )
268
- (or (gensym? x) (memq x *gensyms*)))
269
-
270
267
(define make-ssavalue
271
268
(let ((ssavalue-counter 0 ))
272
269
(lambda ()
Original file line number Diff line number Diff line change 1450
1450
(loop (cdr lhss)
1451
1451
(cons L assigned)
1452
1452
(cdr rhss)
1453
- (cons (make-assignment temp R) stmts)
1453
+ (if (symbol? temp)
1454
+ (list* (make-assignment temp R) `(local-def ,temp) stmts)
1455
+ (cons (make-assignment temp R) stmts))
1454
1456
(cons (make-assignment L temp) after)
1455
1457
(cons temp elts)))))))))
1456
1458
1468
1470
; ; issue #22032
1469
1471
(let ((temp (gensy)))
1470
1472
`(block
1473
+ (local-def ,temp)
1471
1474
(= ,temp (call (core getfield) ,t ,i))
1472
1475
(= ,(car lhs) ,temp)))
1473
1476
`(= ,(car lhs)
1664
1667
,body))
1665
1668
`(scope-block ,body))))
1666
1669
`(block (= ,coll ,(car itrs))
1670
+ (local ,next)
1667
1671
(= ,next (call (top iterate) ,coll))
1668
1672
; ; TODO avoid `local declared twice` error from this
1669
1673
; ;,@(if outer `((local ,lhs)) '())
2694
2698
(implicit-globals (if toplevel? nonloc-assigned '() ))
2695
2699
(implicit-locals
2696
2700
(filter (if toplevel?
2697
- ; ; make only assigned gensyms implicitly local at top level
2698
- some-gensym?
2701
+ (lambda (v ) #f) ; ; no implicit locals at top level
2699
2702
(lambda (v ) (and (memq (var-kind v scope #t ) ' (none static-parameter))
2700
2703
(not (and soft?
2701
2704
(or (memq v (scope:implicit-globals scope))
You can’t perform that action at this time.
0 commit comments