Changeset 5347


Ignore:
Timestamp:
Oct 14, 2006, 5:30:09 AM (18 years ago)
Author:
Gary Byers
Message:

Don't (DECLARE (OPTIMIZE (SAFETY 3))) in generated DEFSTRUCT accessors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lib/defstruct.lisp

    r2325 r5347  
    148148; no #. for cross compile
    149149(defvar *struct-ref-vector*
    150   (vector #'(lambda (x) (declare (optimize (safety 3))) (struct-ref x 0))
    151           #'(lambda (x) (declare (optimize (safety 3))) (struct-ref x 1))
    152           #'(lambda (x) (declare (optimize (safety 3))) (struct-ref x 2))
    153           #'(lambda (x) (declare (optimize (safety 3))) (struct-ref x 3))
    154           #'(lambda (x) (declare (optimize (safety 3))) (struct-ref x 4))
    155           #'(lambda (x) (declare (optimize (safety 3))) (struct-ref x 5))
    156           #'(lambda (x) (declare (optimize (safety 3))) (struct-ref x 6))
    157           #'(lambda (x) (declare (optimize (safety 3))) (struct-ref x 7))
    158           #'(lambda (x) (declare (optimize (safety 3))) (struct-ref x 8))
    159           #'(lambda (x) (declare (optimize (safety 3))) (struct-ref x 9))))
     150  (vector #'(lambda (x) (struct-ref x 0))
     151          #'(lambda (x) (struct-ref x 1))
     152          #'(lambda (x) (struct-ref x 2))
     153          #'(lambda (x) (struct-ref x 3))
     154          #'(lambda (x) (struct-ref x 4))
     155          #'(lambda (x) (struct-ref x 5))
     156          #'(lambda (x) (struct-ref x 6))
     157          #'(lambda (x) (struct-ref x 7))
     158          #'(lambda (x) (struct-ref x 8))
     159          #'(lambda (x) (struct-ref x 9))))
    160160
    161161(defvar *svref-vector*
    162   (vector #'(lambda (x) (declare (optimize (safety 3))) (svref x 0))
    163           #'(lambda (x) (declare (optimize (safety 3))) (svref x 1))
    164           #'(lambda (x) (declare (optimize (safety 3))) (svref x 2))
    165           #'(lambda (x) (declare (optimize (safety 3))) (svref x 3))
    166           #'(lambda (x) (declare (optimize (safety 3))) (svref x 4))
    167           #'(lambda (x) (declare (optimize (safety 3))) (svref x 5))
    168           #'(lambda (x) (declare (optimize (safety 3))) (svref x 6))
    169           #'(lambda (x) (declare (optimize (safety 3))) (svref x 7))
    170           #'(lambda (x) (declare (optimize (safety 3))) (svref x 8))
    171           #'(lambda (x) (declare (optimize (safety 3))) (svref x 9))))
     162  (vector #'(lambda (x) (svref x 0))
     163          #'(lambda (x) (svref x 1))
     164          #'(lambda (x) (svref x 2))
     165          #'(lambda (x) (svref x 3))
     166          #'(lambda (x) (svref x 4))
     167          #'(lambda (x) (svref x 5))
     168          #'(lambda (x) (svref x 6))
     169          #'(lambda (x) (svref x 7))
     170          #'(lambda (x) (svref x 8))
     171          #'(lambda (x) (svref x 9))))
    172172
    173173
     
    188188                      (%svref '#(first second third fourth fifth
    189189                                       sixth seventh eighth ninth tenth) offset)))
    190              `(defun ,name (x) (declare (optimize (safety 3))) (nth ,offset x))))
     190             `(defun ,name (x) (nth ,offset x))))
    191191          ((eq ref $defstruct-struct)
    192192           (if (and (%i< offset 10) *defstruct-share-accessor-functions*)
    193193             `(fset ',name , (%svref *struct-ref-vector* offset))
    194              `(defun ,name (x) (declare (optimize (safety 3))) (struct-ref x ,offset))))
     194             `(defun ,name (x) (struct-ref x ,offset))))
    195195          ((or (eq ref target::subtag-simple-vector)
    196196               (eq ref $defstruct-simple-vector))
    197197           (if (and (%i< offset 10) *defstruct-share-accessor-functions*)
    198198             `(fset ',name ,(%svref *svref-vector* offset))
    199              `(defun ,name (x) (declare (optimize (safety 3))) (svref x ,offset))))
     199             `(defun ,name (x) (svref x ,offset))))
    200200          (t `(defun ,name (x) (uvref x ,offset)))))
    201201
Note: See TracChangeset for help on using the changeset viewer.