X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fir1tran.lisp;h=7810dae4b8ed59cfd99aae76455575dc4a12613e;hb=b2b5fc7797a2c34d904e2a6e25d9ff357d915ac6;hp=9ac65b658d3b78b2149291a7998aad402023b2ac;hpb=1b6b3e70df90dca341b22f1f3229ca3887c27510;p=sbcl.git diff --git a/src/compiler/ir1tran.lisp b/src/compiler/ir1tran.lisp index 9ac65b6..7810dae 100644 --- a/src/compiler/ir1tran.lisp +++ b/src/compiler/ir1tran.lisp @@ -594,22 +594,13 @@ ;;; functional instead. (defun reference-leaf (start next result leaf &optional (name '.anonymous.)) (declare (type ctran start next) (type (or lvar null) result) (type leaf leaf)) - (when (functional-p leaf) - (assure-functional-live-p leaf)) + (assure-leaf-live-p leaf) (let* ((type (lexenv-find leaf type-restrictions)) (leaf (or (and (defined-fun-p leaf) (not (eq (defined-fun-inlinep leaf) :notinline)) (let ((functional (defined-fun-functional leaf))) - (when (and functional - (not (functional-kind functional)) - ;; Bug MISC.320: ir1-transform - ;; can create a reference to a - ;; inline-expanded function, - ;; defined in another component. - (not (and (lambda-p functional) - (neq (lambda-component functional) - *current-component*)))) + (when (and functional (not (functional-kind functional))) (maybe-reanalyze-functional functional)))) (when (and (lambda-p leaf) (memq (functional-kind leaf) @@ -712,9 +703,12 @@ ;; suppresses compiler-macros. (not (fun-lexically-notinline-p cmacro-fun-name))) (let ((res (careful-expand-macro cmacro-fun form))) - (if (eq res form) - (ir1-convert-common-functoid start next result form op) - (ir1-convert start next result res))) + (cond ((eq res form) + (ir1-convert-common-functoid start next result form op)) + (t + (unless (policy *lexenv* (zerop store-xref-data)) + (record-call cmacro-fun-name (ctran-block start) *current-path*)) + (ir1-convert start next result res)))) (ir1-convert-common-functoid start next result form op))))))) ;;; Handles the "common" cases: any other forms except special forms @@ -1021,14 +1015,16 @@ (defined-fun-inlinep var)))) (if (eq inlinep :notinline) (ir1-convert-combination start next result form var) - (let ((transform (info :function - :source-transform - (leaf-source-name var)))) + (let* ((name (leaf-source-name var)) + (transform (info :function :source-transform name))) (if transform (multiple-value-bind (transformed pass) (funcall transform form) - (if pass - (ir1-convert-maybe-predicate start next result form var) - (ir1-convert start next result transformed))) + (cond (pass + (ir1-convert-maybe-predicate start next result form var)) + (t + (unless (policy *lexenv* (zerop store-xref-data)) + (record-call name (ctran-block start) *current-path*)) + (ir1-convert start next result transformed)))) (ir1-convert-maybe-predicate start next result form var)))))) ;;; KLUDGE: If we insert a synthetic IF for a function with the PREDICATE