[Q] array-dimension inlining

Didier Verna <[email protected]> Sun, 09 Apr 2006 14:58:04 +0200
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
        Hi !

Consider this (piece of a) function:

(defun assign (array value)
  (declare (:explain :boxing :calls :types))
  (declare (type (simple-array fixnum (*)) array))
  (declare (type fixnum value))
  (let ((size (array-dimension array 0)))
     ...))

ACL seems to inline the call to array-dimension. However, I my array is of
rank 2, hence declared as (simple-array fixnum (* *)), the same call to
(array-dimension 0) is not inlined (so tells me the compiler).

Can somebody explain why the 2 situations are different ? I though only
knowing the exact array size at compile time would change anything.

Thanks !

--
Didier Verna, [email protected], http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-BicĂȘtre, France   Fax.+33 (1) 53 14 59 22   [email protected]