1.0.28.58: more MAKE-ARRAY goodness
authorNikodemus Siivola <nikodemus@random-state.net>
Mon, 18 May 2009 09:17:49 +0000 (09:17 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Mon, 18 May 2009 09:17:49 +0000 (09:17 +0000)
commite4c6f7338e2ca63cef6f82fbd8f88bc9264c292e
tree3a51a4e45479f7729c86dfe87796ac5214aa312b
parent7f9f1fd113d7047731bda9dab2c7719cdf092a21
1.0.28.58: more MAKE-ARRAY goodness

  Consider (MAKE-ARRAY '(3) :INITIAL-CONTENTS (LIST X Y Z)):

  The transform for LIST dimensions replaces this with an identical
  call, except that the dimensions will be 3.

  The transform for INTEGER dimensions fires, but does not yet
  see the (LIST X Y Z) in INITIAL-CONTENTS, since it is now an
  argument to the lambda introduced by the previous call.

  One option would be to delay the latter transform if we don't see
  how to compile it nicely, because after a couple of IR1-OPTIMIZE
  passes the call to LIST will be there, and the intermediate lambda
  eliminated.

  However, because multiple roundtrips like that suck, instead make
  the source transform for MAKE-ARRAY smart enough to recognize this
  case, and transform to the integer argument case directly.

  ...now, this makes me think we really should try to eliminate /
  simplify lambdas introduced by TRANSFORM-CALL up front somehow.
src/compiler/array-tran.lisp
tests/compiler.impure.lisp
version.lisp-expr