mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
tree-il: Pass the environment to warning passes.
* module/language/tree-il/analyze.scm (report-unused-variables): Taken a new parameter, ENV. * module/language/tree-il/compile-glil.scm (compile-glil): Pass E to individual warning passes.
This commit is contained in:
parent
b25aa0b937
commit
43eb8acada
2 changed files with 3 additions and 3 deletions
|
@ -502,7 +502,7 @@
|
|||
(refs binding-info-refs) ;; (GENSYM ...)
|
||||
(locs binding-info-locs)) ;; (LOCATION ...)
|
||||
|
||||
(define (report-unused-variables tree)
|
||||
(define (report-unused-variables tree env)
|
||||
"Report about unused variables in TREE. Return TREE."
|
||||
|
||||
(define (dotless-list lst)
|
||||
|
|
|
@ -53,11 +53,11 @@
|
|||
(or (and=> (memq #:warnings opts) cadr)
|
||||
'()))
|
||||
|
||||
;; Go throught the warning passes.
|
||||
;; Go through the warning passes.
|
||||
(for-each (lambda (kind)
|
||||
(let ((warn (assoc-ref %warning-passes kind)))
|
||||
(and (procedure? warn)
|
||||
(warn x))))
|
||||
(warn x e))))
|
||||
warnings)
|
||||
|
||||
(let* ((x (make-lambda (tree-il-src x) '() '() '() x))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue