fix `vector' instruction emission for big vectors
authorAndy Wingo <wingo@pobox.com>
Thu, 5 Jul 2012 21:26:38 +0000 (23:26 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 5 Jul 2012 21:26:38 +0000 (23:26 +0200)
* module/language/glil/compile-assembly.scm (dump-constants): Only use
  the `vector' instruction for vectors whose length can fit in 16 bits.

  Fixes http://bugs.gnu.org/11087.

module/language/glil/compile-assembly.scm

index a51fd58..83a5007 100644 (file)
           (values `(,@car-code ,@cdr-code (cons))
                   (1+ addr)))))
      ((and (vector? x)
+           (<= (vector-length x) #xffff)
            (equal? (array-shape x) (list (list 0 (1- (vector-length x))))))
       (receive (codes addr)
           (vector-fold2 (lambda (x codes addr)