1.0.28.19: faster ARRAY-DIMENSION for non-vectors
authorNikodemus Siivola <nikodemus@random-state.net>
Wed, 6 May 2009 16:28:03 +0000 (16:28 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Wed, 6 May 2009 16:28:03 +0000 (16:28 +0000)
commit7306e23c5a4687bef98fdfb3459aaf15fe79d5ca
tree03ee4f5323cf7556110baa1ecd940b28c467576d
parent757091b10a73a7f6e2bd673bcf990ac93f23f77c
1.0.28.19: faster ARRAY-DIMENSION for non-vectors

  Previously each ARRAY-DIMENSION call for a non-vector resulted in
  checking (1) if the array was a displaced array (2) if the array it
  was displaced to was still big enough for it.

  This sucks pretty badly, because we use ARRAY-DIMENSION in bounds
  checking -- especially given how rare it is to have an array
  displaced to an adjustable array.

  Add a new slot, ARRAY-DISPLACED-FROM, to array-headers, and store a
  list of weak backpointers to arrays displaced to the array in
  question there. SET-ARRAY-HEADER (as part of ADJUST-ARRAY) now
  checks this list, and signals an error if any of the displaced-from
  arrays is larger than the new size.

  This also allows us to open code ARRAY-DIMENSION as long as the
  array rank is known.
NEWS
package-data-list.lisp-expr
src/code/array.lisp
src/code/condition.lisp
src/code/fop.lisp
src/code/stream.lisp
src/compiler/array-tran.lisp
src/compiler/generic/genesis.lisp
src/compiler/generic/objdef.lisp
tests/array.pure.lisp
version.lisp-expr