From e49315bdf16727acef105d8632d9dcc2c4365395 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Tue, 25 Sep 2012 13:39:25 +0300 Subject: [PATCH] move clearing of *FREE-FUNS* &co to WITH-IR1-NAMESPACE where they're bound --- src/compiler/macros.lisp | 13 +++++++++---- src/compiler/main.lisp | 6 ------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/compiler/macros.lisp b/src/compiler/macros.lisp index be5100edb..240b6170f 100644 --- a/src/compiler/macros.lisp +++ b/src/compiler/macros.lisp @@ -692,10 +692,15 @@ (*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 , or if no entry. The diff --git a/src/compiler/main.lisp b/src/compiler/main.lisp index f063f3b78..4190d3737 100644 --- a/src/compiler/main.lisp +++ b/src/compiler/main.lisp @@ -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*)