Custom Query (1030 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (658 - 660 of 1030)

Ticket Resolution Summary Owner Reporter
#7 fixed bad register targeting in (setf (aref ...) ...) of 2-dimensional array of element-type T. Gary Byers Gary Byers
Description

This code:

(defun matrix-times-matrix (mat1 mat2)
  "Multiplies two matrices together"
  (if (= (array-dimension mat1 1)
         (array-dimension mat2 0))
      (let ((result (make-array (list (array-dimension mat1 0)
                                      (array-dimension mat2 1)))))
        (dotimes (row (array-dimension result 0))
          (dotimes (column (array-dimension result 1))
            (let ((terms 0))
              (dotimes (middle (array-dimension mat1 1))
                (setf terms (+ terms (* (or (aref mat1 row middle) 0)
                                        (or (aref mat2 middle column) 0)))))
              (setf (aref result row column) terms))))
        (return-from matrix-times-matrix result))
      (progn
        (format t "~&Illegal matrix multiplication:
Matrix sizes ~a x ~a and ~a x ~a don't match."
                (array-dimension mat1 0)
                (array-dimension mat1 1)
                (array-dimension mat2 0)
                (array-dimension mat2 1))
        (return-from matrix-times-matrix nil))))

blows up in the compiler, when it discovers that it has to go through the write barrier at .SPgvset and that things are in the wrong registers for that.

It is possible that this just got exposed in 040708, because previous versions may have gotten MAKE-ARRAY type inferencing wrong

#8 fixed branch in x86-64 _SPstore_node_conditional targeted wrong label Gary Byers Gary Byers
Description

If a compare-and-swap (cmpxchgq) instruction used in the subprimitive _SPstore_node_conditional failed (cleard the z flag), the subsequent branch instruction branched forward to local label 0. It should have branched backward, retrying the store-conditional.

Branching backward typically caused code in _SPprogvsave - which checks to ensure that a list of values was a proper list - to signal a confusing, spurious error.

#9 fixed problem compiling CLASP Gary Byers Joshua Moody
Description

Hi Gary,

I found another problem related to the compilation of CLASP.

OpenMCL 1.1-pre-070408: darwin-ppc32, darwin-ppc64, linux-x86-64

  1. updated from cvs at 12:00 PM 16 April 2007
  1. executed (ccl::rebuild-ccl :full t) on platforms listed above
  1. encountered the following problem on all platforms listed above when compiling:
CLASP> (defun invert-matrix (matrix &optional into-matrix)                                                                                                                                                
  "If matrix is singular returns nil, else returns its inverse.                                                                                                                                           
   If into-matrix is supplied, inverse is returned in it,                                                                                                                                                 
    otherwise a new array is created."                                                                                                                                                                    
  (let* ((dims (array-dimensions matrix))                                                                                                                                                                 
         (rows (car dims))                                                                                                                                                                                
         (cols (cadr dims)))                                                                                                                                                                              
    (unless (= rows cols)                                                                                                                                                                                 
      (error () "Matrix ~s not square" matrix))                                                                                                                                                           
    (if (null into-matrix)                                                                                                                                                                                
        (setq into-matrix (make-array dims))                                                                                                                                                              
        (let ((dims-into (array-dimensions into-matrix)))                                                                                                                                                 
          (unless (and (= rows (car dims-into)) (= cols (cadr dims-into)))                                                                                                                                
            (error () "into-matrix ~s does not have same dimensions as matrix ~s" into-matrix                                                                                                             
                   matrix))))                                                                                                                                                                             
    (let ((xcols (+ rows cols))                                                                                                                                                                           
          (vv (make-array rows)))                                                                                                                                                                         
      (dotimes (r rows)                                                                                                                                                                                   
        (let ((v (make-array xcols :initial-element #o0)))                                                                                                                                                
          (setf (aref v (+ r rows)) #o1)                                                                                                                                                                  
          (dotimes (c cols)                                                                                                                                                                               
            (setf (aref v c) (aref matrix r c)))                                                                                                                                                          
          (setf (aref vv r) v)))                                                                                                                                                                          
      (dotimes (r rows)                                                                                                                                                                                   
        (let ((imax #o-1)                                                                                                                                                                                 
              (vmax #o-1))                                                                                                                                                                                
          (do ((i r (1+ i)))                                                                                                                                                                              
              ((= i rows))                                                                                                                                                                                
            (let ((v (abs (aref (aref vv i) r))))                                                                                                                                                         
              (cond                                                                                                                                                                                       
                ((> v vmax) (setq vmax v) (setq imax i)))))                                                                                                                                               
          (cond ((zerop vmax) (return-from invert-matrix ())))                                                                                                                                            
          (cond ((not (= r imax))                                                                                                                                                                         
                 (let ((exch-temp (aref vv r)))                                                                                                                                                           
                   (setf (aref vv r) (aref vv imax))                                                                                                                                                      
                   (setf (aref vv imax) exch-temp)))))                                                                                                                                                    
        (let ((pivot-row (aref vv r)))                                                                                                                                                                    
          (do ((d (aref pivot-row r))                                                                                                                                                                     
               (i (1+ r) (1+ i)))                                                                                                                                                                         
              ((= i xcols))                                                                                                                                                                               
            (setf (aref pivot-row i)                                                                                                                                                                      
                  (/ (aref pivot-row i) d)))                                                                                                                                                              
          (do ((i (1+ r) (1+ i)))                                                                                                                                                                         
              ((= i rows))                                                                                                                                                                                
            (let ((row (aref vv i)))                                                                                                                                                                      
              (do ((d (aref row r))                                                                                                                                                                       
                   (j (1+ r) (1+ j)))                                                                                                                                                                     
                  ((= j xcols))                                                                                                                                                                           
                (setf (aref row j) (- (aref row j) (* d (aref pivot-row j)))))))))                                                                                                                        
      (do ((r (1- rows) (1- r)))                                                                                                                                                                          
          ((= r #o0))                                                                                                                                                                                     
        (let ((pivot-row (aref vv r)))                                                                                                                                                                    
          (do ((i (1- r) (1- i)))                                                                                                                                                                         
              ((< i #o0))
             (do ((d (aref row r))                                                                                                                                                                       
                   (j rows (1+ j)))                                                                                                                                                                       
                  ((= j xcols))                                                                                                                                                                           
                (setf (aref row j) (- (aref row j) (* d (aref pivot-row j)))))))))                                                                                                                        
      (dotimes (r rows)                                                                                                                                                                                   
        (let ((v (aref vv r)))                                                                                                                                                                            
          (dotimes (c cols)                                                                                                                                                                               
            (setf (aref into-matrix r c) (aref v (+ c cols)))))))                                                                                                                                         
    (values into-matrix))) =>
value (VARIABLE  . "ccl:l1;l1-typesys.lisp.newest") is not of the expected type (SATISFIES CCL::CTYPE-P).

Backtrace:
  0: (CCL::TYPE-SPECIFIER)
  1: (CCL::ACODE-FORM-TYPE '(#<VAR  #x30004147ECAD>) #<VAR  #x30004147EC2D>)
  2: (CCL::NX1-NOTE-VAR-BINDING '(25674 (24614 #<VAR  #x30004147F7DD>) (24614 #<VAR  #x30004144330D>)) '(#<VAR  #x30004147ECAD>))
  3: (CCL::NX1-NOTE-VAR-BINDINGS '(#<VAR  #x30004147EC2D> #<VAR  #x30004147ECAD>) 'NIL)
  4: (CCL::NX1-LET '(LET ((D #) (I #)) (TAGBODY (GO #1=#:G38) #:G37 (TAGBODY #) (PSETQ I #) #1# (UNLESS # #))) #<LEXICAL-ENVIRONMENT  #x30004147F48D>)
  5: (CCL::NX1-COMBINATION #<LEXICAL-ENVIRONMENT  #x30004147F48D> '(LET ((D #) (I #)) (TAGBODY (GO #1=#:G38) #:G37 (TAGBODY #) (PSETQ I #) #1# (UNLESS # #))))
  6: (CCL::NX1-FORM '(LET ((D #) (I #)) (TAGBODY (GO #1=#:G38) #:G37 (TAGBODY #) (PSETQ I #) #1# (UNLESS # #))))
  7: (CCL::NX1-BLOCK '(BLOCK NIL (LET (# #) (TAGBODY # #:G37 # # #:G38 #))) #<LEXICAL-ENVIRONMENT  #x30004147F96D>)
  8: (CCL::NX1-COMBINATION #<LEXICAL-ENVIRONMENT  #x30004147F96D> '(DO ((D #) (I # #)) ((= I XCOLS)) (SETF (AREF PIVOT-ROW I) (/ # D))))
  9: (CCL::NX1-FORM '(DO ((D #) (I # #)) ((= I XCOLS)) (SETF (AREF PIVOT-ROW I) (/ # D))))
 10: (CCL::NX1-FORMLIST '((DO (# #) (#) (SETF # #)) (DO (#) (#) (LET # #))))
 11: (CCL::NX1-PROGN-BODY 'NIL)
 12: (CCL::NX1-ENV-BODY '((DO (# #) (#) (SETF # #)) (DO (#) (#) (LET # #))) #<LEXICAL-ENVIRONMENT  #x3000414430FD>)
 13: (CCL::NX1-LET* '(LET* ((PIVOT-ROW #)) (DO (# #) (#) (SETF # #)) (DO (#) (#) (LET # #))) #<LEXICAL-ENVIRONMENT  #x3000414430FD>)

This function can be found in clasp/dev/matrices.lisp.

This is old code (pre-1990) that compiles fine under ACL, MCL, LispWorks, and the OpenMCL 2006-10-24 release.

I've attached a tarball of the CLASP asdf system (unix-newlines).

Thanks,

jjm

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.