File tree 1 file changed +8
-6
lines changed 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -2732,25 +2732,27 @@ f(x) = yt(x)
2732
2732
(any vinfo:sa vi))
2733
2733
(let* ((leading
2734
2734
(filter (lambda (x ) (and (pair? x)
2735
- (or (and (eq? (car x) 'method )
2736
- (length> x 2 ))
2737
- (eq? (car x) '= ))))
2735
+ (let ((cx (car x)))
2736
+ (or (and (eq? cx 'method ) (length> x 2 ))
2737
+ (eq? cx '= )
2738
+ (eq? cx 'call )))))
2738
2739
(take-statements-while
2739
2740
(lambda (e )
2740
2741
(or (atom? e)
2741
2742
(memq (car e) ' (quote top core line inert local unnecessary
2742
2743
meta inbounds boundscheck simdloop
2743
2744
implicit-global global globalref
2744
- const newvar = null method))))
2745
+ const newvar = null method call ))))
2745
2746
(lam:body lam))))
2746
- (unused (map cadr leading))
2747
+ (unused (map cadr (filter (lambda (x ) (memq (car x) ' (method =)))
2748
+ leading)))
2747
2749
(def (table)))
2748
2750
; ; TODO: reorder leading statements to put assignments where the RHS is
2749
2751
; ; `simple-atom?` at the top.
2750
2752
(for-each (lambda (e )
2751
2753
(set! unused (filter (lambda (v ) (not (expr-uses-var e v)))
2752
2754
unused))
2753
- (if (memq (cadr e) unused)
2755
+ (if (and ( memq (car e) ' (method =)) ( memq ( cadr e) unused) )
2754
2756
(put! def (cadr e) #t )))
2755
2757
leading)
2756
2758
(for-each (lambda (v )
You can’t perform that action at this time.
0 commit comments