X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Flocall.lisp;h=fe8af571a060886d11b2ffc9110eeda58df97d7f;hb=8f45dd3a5a074998e1aa697ba8f2a8b1b7388427;hp=fe1dea83f7ad075c6ab78c474e3a1441f7102778;hpb=6822034325136cde4e14773c83c3769b42721306;p=sbcl.git diff --git a/src/compiler/locall.lisp b/src/compiler/locall.lisp index fe1dea8..fe8af57 100644 --- a/src/compiler/locall.lisp +++ b/src/compiler/locall.lisp @@ -58,8 +58,13 @@ (handle-nested-dynamic-extent-lvars dx (cast-value use))) (combination (loop for arg in (combination-args use) - when (lvar-good-for-dx-p arg dx) - append (handle-nested-dynamic-extent-lvars dx arg)))))) + ;; deleted args show up as NIL here + when (and arg (lvar-good-for-dx-p arg dx)) + append (handle-nested-dynamic-extent-lvars dx arg))) + (ref + (let* ((other (trivial-lambda-var-ref-lvar use))) + (unless (eq other lvar) + (handle-nested-dynamic-extent-lvars dx other))))))) (cons lvar (if (listp uses) (loop for use in uses @@ -205,9 +210,6 @@ do (entries `((eql ,n-supplied ,n) (%funcall ,(force ep) ,@(subseq temps 0 n))))) `(lambda (,n-supplied ,@temps) - ;; FIXME: Make sure that INDEX type distinguishes between - ;; target and host. (Probably just make the SB!XC:DEFTYPE - ;; different from CL:DEFTYPE.) (declare (type index ,n-supplied)) (cond ,@(if more (butlast (entries)) (entries)) @@ -215,8 +217,7 @@ ;; KLUDGE: (NOT (< ...)) instead of >= avoids one round of ;; deftransforms and lambda-conversion. `((,(if (zerop min) t `(not (< ,n-supplied ,max))) - ,(let ((n-context (gensym)) - (n-count (gensym))) + ,(with-unique-names (n-context n-count) `(multiple-value-bind (,n-context ,n-count) (%more-arg-context ,n-supplied ,max) (locally @@ -240,7 +241,8 @@ (with-ir1-environment-from-node (lambda-bind (main-entry fun)) (let ((res (ir1-convert-lambda (make-xep-lambda-expression fun) :debug-name (debug-name - 'xep (leaf-debug-name fun))))) + 'xep (leaf-debug-name fun)) + :system-lambda t))) (setf (functional-kind res) :external (leaf-ever-used res) t (functional-entry-fun res) fun @@ -595,7 +597,8 @@ (%funcall ,entry ,@args)) :debug-name (debug-name 'hairy-function-entry (lvar-fun-debug-name - (basic-combination-fun call))))))) + (basic-combination-fun call))) + :system-lambda t)))) (convert-call ref call new-fun) (dolist (ref (leaf-refs entry)) (convert-call-if-possible ref (lvar-dest (node-lvar ref)))))) @@ -855,6 +858,8 @@ (setf (lambda-physenv clambda) home-physenv) (when physenv + (unless home-physenv + (setf home-physenv (get-lambda-physenv home))) (setf (physenv-nlx-info home-physenv) (nconc (physenv-nlx-info physenv) (physenv-nlx-info home-physenv))))