X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmacros.lisp;h=99ca9dc49708c3349401b53108fec0a7b584ce22;hb=7f579b076a1fc54587538ead07e506e7f06f3fe8;hp=be5100edb161abb1860e6a55586d725802c402cd;hpb=40bff32181a4d9b591ae2bac69bbee3bd77a82bc;p=sbcl.git diff --git a/src/compiler/macros.lisp b/src/compiler/macros.lisp index be5100e..99ca9dc 100644 --- a/src/compiler/macros.lisp +++ b/src/compiler/macros.lisp @@ -685,17 +685,25 @@ (aver-live-component *current-component*) (funcall fun))) +(defmacro with-source-paths (&body forms) + (with-unique-names (source-paths) + `(let* ((,source-paths (make-hash-table :test 'eq)) + (*source-paths* ,source-paths)) + (unwind-protect + (progn ,@forms) + (clrhash ,source-paths))))) + ;;; Bind the hashtables used for keeping track of global variables, ;;; functions, etc. Also establish condition handlers. (defmacro with-ir1-namespace (&body forms) `(let ((*free-vars* (make-hash-table :test 'eq)) (*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))) + (*constants* (make-hash-table :test 'equal))) + (unwind-protect + (progn ,@forms) + (clrhash *free-funs*) + (clrhash *free-vars*) + (clrhash *constants*)))) ;;; Look up NAME in the lexical environment namespace designated by ;;; SLOT, returning the , or if no entry. The