diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-10-06 23:36:53 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-10-06 23:41:39 +0200 |
commit | 43eb8acadae88d4b56d0e54fd0870a025bd5259c (patch) | |
tree | c58b27bf3036fcccee16bd92b27950e972be79e7 | |
parent | b25aa0b9373d2798469e0fe999cd915e8beedc4f (diff) | |
download | guile-43eb8acadae88d4b56d0e54fd0870a025bd5259c.tar.gz |
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.
-rw-r--r-- | module/language/tree-il/analyze.scm | 2 | ||||
-rw-r--r-- | module/language/tree-il/compile-glil.scm | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/module/language/tree-il/analyze.scm b/module/language/tree-il/analyze.scm index 10c1d0bd6..50a0fb80b 100644 --- a/module/language/tree-il/analyze.scm +++ b/module/language/tree-il/analyze.scm @@ -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) diff --git a/module/language/tree-il/compile-glil.scm b/module/language/tree-il/compile-glil.scm index d13cf7ca5..a78eaa6ce 100644 --- a/module/language/tree-il/compile-glil.scm +++ b/module/language/tree-il/compile-glil.scm @@ -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)) |