fix erroneous compilation of #@2(1 2 3) as #(1 2 3)
authorAndy Wingo <wingo@pobox.com>
Mon, 11 Jan 2010 19:45:52 +0000 (20:45 +0100)
committerAndy Wingo <wingo@pobox.com>
Mon, 11 Jan 2010 19:45:52 +0000 (20:45 +0100)
* module/language/glil/compile-assembly.scm (dump-object): Fix the
  vector case to only match 0-indexed, vectors, not arrays like #@2(1 2
  3).

module/language/glil/compile-assembly.scm

index 32c5a9d3a8568ac9a25bde7f8def9858a12f28f0..21ef95975405f48f46150e17fea83f244aefd632 100644 (file)
@@ -1,6 +1,6 @@
 ;;; Guile VM assembler
 
-;; Copyright (C) 2001, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
 
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
       `(,@kar
         ,@(dump-object (cdr x) (addr+ addr kar))
         (cons))))
-   ((vector? x)
+   ((and (vector? x)
+         (equal? (array-shape x) (list (list 0 (1- (vector-length x))))))
     (let* ((len (vector-length x))
            (tail (if (>= len 65536)
                      (too-long "vector")