move clearing of *FREE-FUNS* &co to WITH-IR1-NAMESPACE where they're bound
authorNikodemus Siivola <nikodemus@random-state.net>
Tue, 25 Sep 2012 10:39:25 +0000 (13:39 +0300)
committerNikodemus Siivola <nikodemus@random-state.net>
Wed, 3 Oct 2012 05:18:52 +0000 (08:18 +0300)
src/compiler/macros.lisp
src/compiler/main.lisp

index be5100e..240b617 100644 (file)
          (*free-funs* (make-hash-table :test 'equal))
          (*constants* (make-hash-table :test 'equal))
          (*source-paths* (make-hash-table :test 'eq)))
-     (handler-bind ((compiler-error #'compiler-error-handler)
-                    (style-warning #'compiler-style-warning-handler)
-                    (warning #'compiler-warning-handler))
-       ,@forms)))
+     (unwind-protect
+          (handler-bind ((compiler-error #'compiler-error-handler)
+                         (style-warning #'compiler-style-warning-handler)
+                         (warning #'compiler-warning-handler))
+            ,@forms)
+       (clrhash *free-funs*)
+       (clrhash *free-vars*)
+       (clrhash *constants*)
+       (clrhash *source-paths*))))
 
 ;;; Look up NAME in the lexical environment namespace designated by
 ;;; SLOT, returning the <value, T>, or <NIL, NIL> if no entry. The
index f063f3b..4190d37 100644 (file)
@@ -745,12 +745,6 @@ Examples:
 ;;; actually in use, so that this function could go away.
 (defun clear-stuff (&optional (debug-too t))
 
-  ;; Clear global tables.
-  (when (boundp '*free-funs*)
-    (clrhash *free-funs*)
-    (clrhash *free-vars*)
-    (clrhash *constants*))
-
   ;; Clear debug counters and tables.
   (clrhash *seen-blocks*)
   (clrhash *seen-funs*)