X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Ftarget-main.lisp;h=8a1cffb07d3986f7952bbc7f04d72754e5a4366d;hb=964e644f3f1ec2c169b1def87f11e2f5b09a748e;hp=6edf906f20e42efddc56ce51bd4ce67144062f1b;hpb=3eb39e017e52b5d704e7d33405c873af52a533fd;p=sbcl.git diff --git a/src/compiler/target-main.lisp b/src/compiler/target-main.lisp index 6edf906..8a1cffb 100644 --- a/src/compiler/target-main.lisp +++ b/src/compiler/target-main.lisp @@ -61,7 +61,19 @@ (*last-format-args* nil) (*last-message-count* 0) (*gensym-counter* 0) + ;; KLUDGE: This rebinding of policy is necessary so that + ;; forms such as LOCALLY at the REPL actually extend the + ;; compilation policy correctly. However, there is an + ;; invariant that is potentially violated: future + ;; refactoring must not allow this to be done in the file + ;; compiler. At the moment we're clearly alright, as we + ;; call %COMPILE with a core-object, not a fasl-stream, + ;; but caveat future maintainers. -- CSR, 2002-10-27 (*policy* (lexenv-policy *lexenv*)) + ;; see above + (*handled-conditions* (lexenv-handled-conditions *lexenv*)) + ;; ditto + (*disabled-package-locks* (lexenv-disabled-package-locks *lexenv*)) ;; FIXME: ANSI doesn't say anything about CL:COMPILE ;; interacting with these variables, so we shouldn't. As ;; of SBCL 0.6.7, COMPILE-FILE controls its verbosity by @@ -70,11 +82,12 @@ ;; controlled by function arguments and lexical variables. (*compile-verbose* nil) (*compile-print* nil)) - (clear-stuff) - (find-source-paths form 0) - (%compile form (make-core-object) - :name name - :path '(original-source-start 0 0)))))) + (handler-bind (((satisfies handle-condition-p) #'handle-condition-handler)) + (clear-stuff) + (find-source-paths form 0) + (%compile form (make-core-object) + :name name + :path '(original-source-start 0 0))))))) (defun compile-in-lexenv (name definition lexenv) (multiple-value-bind (compiled-definition warnings-p failure-p)