X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Flocall.lisp;h=360c241d5071d763d5d27acc47adfc5f26dc155d;hb=d6cacf136631916da0db8bbe32554ca499e17589;hp=d4ce370f0eda88a8f7a75f04d4e99f1cd3498725;hpb=16f848f33e91035457132f704448d2d23c34724e;p=sbcl.git diff --git a/src/compiler/locall.lisp b/src/compiler/locall.lisp index d4ce370..360c241 100644 --- a/src/compiler/locall.lisp +++ b/src/compiler/locall.lisp @@ -334,27 +334,35 @@ (>= speed compilation-speed))) (not (eq (functional-kind (node-home-lambda call)) :external)) (inline-expansion-ok call)) - (multiple-value-bind (losing-local-functional converted-lambda) - (catch 'locall-already-let-converted - (with-ir1-environment-from-node call - (let ((*lexenv* (functional-lexenv original-functional))) - (values nil - (ir1-convert-lambda - (functional-inline-expansion original-functional) - :debug-name (debug-namify - "local inline ~A" - (leaf-debug-name - original-functional))))))) - (cond (losing-local-functional - (let ((*compiler-error-context* call)) - (compiler-note "couldn't inline expand because expansion ~ - calls this LET-converted local function:~ - ~% ~S" - (leaf-debug-name losing-local-functional))) - original-functional) - (t - (change-ref-leaf ref converted-lambda) - converted-lambda))) + (let* ((end (component-last-block (node-component call))) + (pred (block-prev end))) + (multiple-value-bind (losing-local-functional converted-lambda) + (catch 'locall-already-let-converted + (with-ir1-environment-from-node call + (let ((*lexenv* (functional-lexenv original-functional))) + (values nil + (ir1-convert-lambda + (functional-inline-expansion original-functional) + :debug-name (debug-namify + "local inline ~A" + (leaf-debug-name + original-functional))))))) + (cond (losing-local-functional + (let ((*compiler-error-context* call)) + (compiler-notify "couldn't inline expand because expansion ~ + calls this LET-converted local function:~ + ~% ~S" + (leaf-debug-name losing-local-functional))) + (loop for block = (block-next pred) then (block-next block) + until (eq block end) + do (setf (block-delete-p block) t)) + (loop for block = (block-next pred) then (block-next block) + until (eq block end) + do (delete-block block t)) + original-functional) + (t + (change-ref-leaf ref converted-lambda) + converted-lambda)))) original-functional)) ;;; Dispatch to the appropriate function to attempt to convert a call. @@ -602,7 +610,7 @@ (let ((cont (first key))) (unless (constant-continuation-p cont) (when flame - (compiler-note "non-constant keyword in keyword call")) + (compiler-notify "non-constant keyword in keyword call")) (setf (basic-combination-kind call) :error) (return-from convert-more-call)) @@ -616,7 +624,7 @@ (setq allow-found t allowp (continuation-value val))) (t (when flame - (compiler-note "non-constant :ALLOW-OTHER-KEYS value")) + (compiler-notify "non-constant :ALLOW-OTHER-KEYS value")) (setf (basic-combination-kind call) :error) (return-from convert-more-call))))) (dolist (var (key-vars)