/[gcl]/gcl/lsp/gcl_arraylib.lsp
ViewVC logotype

Diff of /gcl/lsp/gcl_arraylib.lsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by camm, Tue Nov 23 22:38:23 2004 UTC revision 1.6 by camm, Fri Jan 7 17:58:34 2005 UTC
# Line 35  Line 35 
35            bit-andc1 bit-andc2 bit-orc1 bit-orc2 bit-not            bit-andc1 bit-andc2 bit-orc1 bit-orc2 bit-not
36            array-has-fill-pointer-p fill-pointer            array-has-fill-pointer-p fill-pointer
37            vector-push vector-push-extend vector-pop            vector-push vector-push-extend vector-pop
38            adjust-array upgraded-array-element-type))            adjust-array))
39    
40  (in-package 'system)  (in-package 'system)
41    
42    
43  (proclaim '(optimize (safety 2) (space 3)))  (proclaim '(optimize (safety 2) (space 3)))
44    
45    ;;FIXME -- this needs integration with other type functions.  CM 20050106
46  (defun best-array-element-type (type)  (defun best-array-element-type (type)
47    (cond ((null type) nil)    (cond ((null type) nil)
48          ((eql t type) t)          ((eql t type) t)
# Line 50  Line 51 
51                                      signed-short fixnum))                                      signed-short fixnum))
52                 type)                 type)
53          ((subtypep type 'fixnum)          ((subtypep type 'fixnum)
54           (dolist (v '(bit positive-char signed-char unsigned-char positive-short signed-short unsigned-short)           (dolist (v '(bit non-negative-char signed-char unsigned-char non-negative-short signed-short unsigned-short)
55                      'fixnum)                      'fixnum)
56                   (cond ((subtypep type v)                   (cond ((subtypep type v)
57                          (return v)))))                          (return v)))))
# Line 313  Line 314 
314                   (and (equal (cdr new-dimensions)                   (and (equal (cdr new-dimensions)
315                               (cdr (array-dimensions array)))                               (cdr (array-dimensions array)))
316                        (or (not (eq element-type 'bit))                        (or (not (eq element-type 'bit))
317                            (eql 0 (the fixnum (mod (the fixnum (car (last new-dimensions))) char-size))))))                            (eql 0 (the fixnum (mod (the fixnum (car (last new-dimensions))) char-length))))))
318               (copy-array-portion               (copy-array-portion
319                array x 0 0 (min (array-total-size x)                array x 0 0 (min (array-total-size x)
320                                 (array-total-size array))))                                 (array-total-size array))))

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26