1.0.42.15: prevent inline expansion from creating refs to dead lambda-vars
authorNikodemus Siivola <nikodemus@random-state.net>
Wed, 1 Sep 2010 14:42:09 +0000 (14:42 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Wed, 1 Sep 2010 14:42:09 +0000 (14:42 +0000)
commitc8ec5e9baf0e79e49aa54c6ac1b2582b74301d5b
tree67911540aa581dfac41052d23597bc5f8c781794
parent4d653f81365917ace3da1e155f1bfe25fbc71507
1.0.42.15: prevent inline expansion from creating refs to dead lambda-vars

 * Fixes lp#454681.

 * Patch by Alexey. In his words, in reference to the test-case:

   (multiple-value-bind (iterator+977 getter+978)
       (does-not-exist-but-does-not-matter)
     (flet ((iterator+976 ()
              (funcall iterator+977)))
       (declare (inline iterator+976))
       (let ((iterator+976 #'iterator+976))
         (funcall iterator+976)))))

   Inline expansion of ITERATOR+976 tries to refer to a dead
   LAMBDA-VAR ITERATOR+977 of varargs entry, which was substituted
   with ITERATOR+977 of &OPTIONAL processor. Thus the referenced
   variable is dead and is not bound anywhere.

   The attached patch fixes the problem by giving up on inline
   expansion if it tries to make a reference to a dead LAMBDA-VAR,
   similar to the way dead BLOCK tags are treated.
NEWS
src/compiler/ir1tran.lisp
src/compiler/ir1util.lisp
src/compiler/node.lisp
tests/compiler.pure.lisp
version.lisp-expr