Changeset 395


Ignore:
Timestamp:
Jan 25, 2004, 2:08:47 PM (21 years ago)
Author:
Gary Byers
Message:

Say "target:" a few times.

Location:
trunk/ccl/level-1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-aprims.lisp

    r310 r395  
    284284    (when (eq elt (%svref vector i)) (return i))))
    285285
     286(defun logical-pathname-p (thing) (istruct-typep thing 'logical-pathname))
    286287
    287288(progn
     
    444445(defun coerce-to-uvector (object subtype simple-p)  ; simple-p ? 
    445446  (let ((type-code (typecode object)))
    446     (cond ((eq type-code ppc32::tag-list)
     447    (cond ((eq type-code target::tag-list)
    447448           (%list-to-uvector subtype object))
    448           ((>= type-code ppc32::min-cl-ivector-subtag)  ; 175
     449          ((>= type-code target::min-cl-ivector-subtag)  ; 175
    449450           (if (or (null subtype)(= subtype type-code))
    450451             (return-from coerce-to-uvector object)))
    451           ((>= type-code ppc32::min-vector-subtag)     ; 170
    452            (if (= type-code ppc32::subtag-simple-vector)
     452          ((>= type-code target::min-vector-subtag)     ; 170
     453           (if (= type-code target::subtag-simple-vector)
    453454             (if (or (null subtype)
    454455                     (= type-code subtype))
     
    459460               (return-from coerce-to-uvector object))))
    460461          (t (error "Can't coerce ~s to Uvector" object))) ; or just let length error
    461     (if (null subtype)(setq subtype ppc32::subtag-simple-vector))
     462    (if (null subtype)(setq subtype target::subtag-simple-vector))
    462463    (let* ((size (length object))
    463464           (val (%alloc-misc size subtype)))
     
    479480(defun %list-to-uvector (subtype list)   ; subtype may be nil (meaning simple-vector
    480481  (let* ((n (length list))
    481          (new (%alloc-misc n (or subtype ppc32::subtag-simple-vector))))  ; yech
     482         (new (%alloc-misc n (or subtype target::subtag-simple-vector))))  ; yech
    482483    (dotimes (i n)
    483484      (declare (fixnum i))
     
    536537
    537538(eval-when (:compile-toplevel)
    538   (assert (eql ppc32::arrayH.flags-cell ppc32::vectorH.flags-cell))
    539   (assert (eql ppc32::arrayH.displacement-cell ppc32::vectorH.displacement-cell))
    540   (assert (eql ppc32::arrayH.data-vector-cell ppc32::vectorH.data-vector-cell)))
     539  (assert (eql target::arrayH.flags-cell target::vectorH.flags-cell))
     540  (assert (eql target::arrayH.displacement-cell target::vectorH.displacement-cell))
     541  (assert (eql target::arrayH.data-vector-cell target::vectorH.data-vector-cell)))
    541542
    542543
     
    585586      ; $arh_disp_bit. If displaced-to is not adjustable, then our
    586587      ; target can be its target instead of itself.
    587       (when (or (eql vect-subtype ppc32::subtag-arrayH)
    588                 (eql vect-subtype ppc32::subtag-vectorH))
    589         (let ((dflags (%svref displaced-to ppc32::arrayH.flags-cell)))
     588      (when (or (eql vect-subtype target::subtag-arrayH)
     589                (eql vect-subtype target::subtag-vectorH))
     590        (let ((dflags (%svref displaced-to target::arrayH.flags-cell)))
    590591          (declare (fixnum dflags))
    591592          (when (or (logbitp $arh_adjp_bit dflags)
     
    593594                    (progn
    594595                      #+nope
    595                       (setq target (%svref displaced-to ppc32::arrayH.data-vector-cell)
    596                             real-offset (+ offset (%svref displaced-to ppc32::arrayH.displacement-cell)))
     596                      (setq target (%svref displaced-to target::arrayH.data-vector-cell)
     597                            real-offset (+ offset (%svref displaced-to target::arrayH.displacement-cell)))
    597598                      (logbitp $arh_disp_bit dflags)
    598599                      #-nope t))
     
    600601        (setq vect-subtype (%array-header-subtype displaced-to)))
    601602      ; assumes flags is low byte
    602       (setq flags (dpb vect-subtype ppc32::arrayH.flags-cell-subtag-byte flags))
     603      (setq flags (dpb vect-subtype target::arrayH.flags-cell-subtag-byte flags))
    603604      (if (eq rank 1)
    604         (%gvector ppc32::subtag-vectorH
     605        (%gvector target::subtag-vectorH
    605606                      (if (fixnump fill) fill new-size)
    606607                      new-size
     
    608609                      real-offset
    609610                      flags)
    610         (let ((val (%alloc-misc (+ ppc32::arrayh.dim0-cell rank) ppc32::subtag-arrayH)))
    611           (setf (%svref val ppc32::arrayH.rank-cell) rank)
    612           (setf (%svref val ppc32::arrayH.physsize-cell) new-size)
    613           (setf (%svref val ppc32::arrayH.data-vector-cell) target)
    614           (setf (%svref val ppc32::arrayH.displacement-cell) real-offset)
    615           (setf (%svref val ppc32::arrayH.flags-cell) flags)
     611        (let ((val (%alloc-misc (+ target::arrayh.dim0-cell rank) target::subtag-arrayH)))
     612          (setf (%svref val target::arrayH.rank-cell) rank)
     613          (setf (%svref val target::arrayH.physsize-cell) new-size)
     614          (setf (%svref val target::arrayH.data-vector-cell) target)
     615          (setf (%svref val target::arrayH.displacement-cell) real-offset)
     616          (setf (%svref val target::arrayH.flags-cell) flags)
    616617          (do* ((dims dimensions (cdr dims))
    617618                (i 0 (1+ i)))             
    618619               ((null dims))
    619620            (declare (fixnum i)(list dims))
    620             (setf (%svref val (%i+ ppc32::arrayH.dim0-cell i)) (car dims)))
     621            (setf (%svref val (%i+ target::arrayH.dim0-cell i)) (car dims)))
    621622          val)))))
     623
     624(defun make-array (dims &key (element-type t element-type-p)
     625                        displaced-to
     626                        displaced-index-offset
     627                        adjustable
     628                        fill-pointer
     629                        (initial-element nil initial-element-p)
     630                        (initial-contents nil initial-contents-p))
     631  (when (and initial-element-p initial-contents-p)
     632        (error "Cannot specify both ~S and ~S" :initial-element-p :initial-contents-p))
     633  (make-array-1 dims element-type element-type-p
     634                displaced-to
     635                displaced-index-offset
     636                adjustable
     637                fill-pointer
     638                initial-element initial-element-p
     639                initial-contents initial-contents-p
     640                nil))
    622641
    623642
     
    862881    (when (egc-enabled-p)
    863882      (let* ((a (%active-dynamic-area)))
    864         (setq g0-count (%fixnum-ref a ppc32::area.gc-count) a (%fixnum-ref a ppc32::area.older))
    865         (setq g1-count (%fixnum-ref a ppc32::area.gc-count) a (%fixnum-ref a ppc32::area.older))
    866         (setq g2-count (%fixnum-ref a ppc32::area.gc-count))))
     883        (setq g0-count (%fixnum-ref a target::area.gc-count) a (%fixnum-ref a target::area.older))
     884        (setq g1-count (%fixnum-ref a target::area.gc-count) a (%fixnum-ref a target::area.older))
     885        (setq g2-count (%fixnum-ref a target::area.gc-count))))
    867886    (values total full g2-count g1-count g0-count)))
    868887
     
    893912; this IS effectively a passive way of inquiring about enabled status.
    894913(defun egc-enabled-p ()
    895   (not (eql 0 (%fixnum-ref (%active-dynamic-area) ppc32::area.older))))
     914  (not (eql 0 (%fixnum-ref (%active-dynamic-area) target::area.older))))
    896915
    897916(defun egc-configuration ()
    898917  (let* ((ta (%get-kernel-global 'tenured-area))
    899          (g2 (%fixnum-ref ta ppc32::area.younger))
    900          (g1 (%fixnum-ref g2 ppc32::area.younger))
    901          (g0 (%fixnum-ref g1 ppc32::area.younger)))
    902     (values (ash (the fixnum (%fixnum-ref g0 ppc32::area.threshold)) -8)
    903             (ash (the fixnum (%fixnum-ref g1 ppc32::area.threshold)) -8)
    904             (ash (the fixnum (%fixnum-ref g2 ppc32::area.threshold)) -8))))
     918         (g2 (%fixnum-ref ta target::area.younger))
     919         (g1 (%fixnum-ref g2 target::area.younger))
     920         (g0 (%fixnum-ref g1 target::area.younger)))
     921    (values (ash (the fixnum (%fixnum-ref g0 target::area.threshold)) -8)
     922            (ash (the fixnum (%fixnum-ref g1 target::area.threshold)) -8)
     923            (ash (the fixnum (%fixnum-ref g2 target::area.threshold)) -8))))
    905924
    906925
     
    917936  (if (eql (uvsize (setq macptr (require-type macptr 'macptr))) 1)
    918937    0
    919     (uvref macptr PPC32::XMACPTR.FLAGS-CELL)))
     938    (uvref macptr TARGET::XMACPTR.FLAGS-CELL)))
    920939
    921940
     
    925944(defun set-macptr-flags (macptr value)
    926945  (unless (eql (uvsize (setq macptr (require-type macptr 'macptr))) 1)
    927     (setf (%svref macptr PPC32::XMACPTR.FLAGS-CELL) value)
     946    (setf (%svref macptr TARGET::XMACPTR.FLAGS-CELL) value)
    928947    value))
    929948
     
    949968    (or (and (>= code (char-code #\A)) (<= code (char-code #\Z)))
    950969        (and (>= code (char-code #\a)) (<= code (char-code #\z))))))
     970
     971
    951972
    952973
  • trunk/ccl/level-1/l1-clos-boot.lisp

    r311 r395  
    3131(defun instance-slots (instance)
    3232  (let* ((typecode (typecode instance)))
    33     (cond ((eql typecode ppc32::subtag-instance) (instance.slots instance))
    34           ((eql typecode ppc32::subtag-macptr) (foreign-slots-vector instance))
     33    (cond ((eql typecode target::subtag-instance) (instance.slots instance))
     34          ((eql typecode target::subtag-macptr) (foreign-slots-vector instance))
    3535          ((typep instance 'standard-generic-function) (gf.slots instance))
    3636          (t  (error "Don't know how to find slots of ~s" instance)))))
     
    532532(eval-when (:compile-toplevel :execute)
    533533  (defmacro make-structure-vector (size)
    534     `(%alloc-misc ,size ppc32::subtag-struct nil))
     534    `(%alloc-misc ,size target::subtag-struct nil))
    535535
    536536)
     
    14101410
    14111411(defun standard-instance-p (i)
    1412   (eq (typecode i) ppc32::subtag-instance))
     1412  (eq (typecode i) target::subtag-instance))
    14131413
    14141414
     
    22722272
    22732273(defun %maybe-std-slot-value-using-class (class instance slotd)
    2274   (if (and (eql (typecode class) ppc32::subtag-instance)
    2275            (eql (typecode slotd) ppc32::subtag-instance)
     2274  (if (and (eql (typecode class) target::subtag-instance)
     2275           (eql (typecode slotd) target::subtag-instance)
    22762276           (eq *standard-effective-slot-definition-class-wrapper*
    22772277               (instance.class-wrapper slotd))
     
    23122312
    23132313(defun %maybe-std-setf-slot-value-using-class (class instance slotd new)
    2314   (if (and (eql (typecode class) ppc32::subtag-instance)
    2315            (eql (typecode slotd) ppc32::subtag-instance)
     2314  (if (and (eql (typecode class) target::subtag-instance)
     2315           (eql (typecode slotd) target::subtag-instance)
    23162316           (eq *standard-effective-slot-definition-class-wrapper*
    23172317               (instance.class-wrapper slotd))
Note: See TracChangeset for help on using the changeset viewer.