Changeset 395
- Timestamp:
- Jan 25, 2004, 2:08:47 PM (21 years ago)
- Location:
- trunk/ccl/level-1
- Files:
-
- 2 edited
-
l1-aprims.lisp (modified) (14 diffs)
-
l1-clos-boot.lisp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-aprims.lisp
r310 r395 284 284 (when (eq elt (%svref vector i)) (return i)))) 285 285 286 (defun logical-pathname-p (thing) (istruct-typep thing 'logical-pathname)) 286 287 287 288 (progn … … 444 445 (defun coerce-to-uvector (object subtype simple-p) ; simple-p ? 445 446 (let ((type-code (typecode object))) 446 (cond ((eq type-code ppc32::tag-list)447 (cond ((eq type-code target::tag-list) 447 448 (%list-to-uvector subtype object)) 448 ((>= type-code ppc32::min-cl-ivector-subtag) ; 175449 ((>= type-code target::min-cl-ivector-subtag) ; 175 449 450 (if (or (null subtype)(= subtype type-code)) 450 451 (return-from coerce-to-uvector object))) 451 ((>= type-code ppc32::min-vector-subtag) ; 170452 (if (= type-code ppc32::subtag-simple-vector)452 ((>= type-code target::min-vector-subtag) ; 170 453 (if (= type-code target::subtag-simple-vector) 453 454 (if (or (null subtype) 454 455 (= type-code subtype)) … … 459 460 (return-from coerce-to-uvector object)))) 460 461 (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)) 462 463 (let* ((size (length object)) 463 464 (val (%alloc-misc size subtype))) … … 479 480 (defun %list-to-uvector (subtype list) ; subtype may be nil (meaning simple-vector 480 481 (let* ((n (length list)) 481 (new (%alloc-misc n (or subtype ppc32::subtag-simple-vector)))) ; yech482 (new (%alloc-misc n (or subtype target::subtag-simple-vector)))) ; yech 482 483 (dotimes (i n) 483 484 (declare (fixnum i)) … … 536 537 537 538 (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))) 541 542 542 543 … … 585 586 ; $arh_disp_bit. If displaced-to is not adjustable, then our 586 587 ; 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))) 590 591 (declare (fixnum dflags)) 591 592 (when (or (logbitp $arh_adjp_bit dflags) … … 593 594 (progn 594 595 #+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))) 597 598 (logbitp $arh_disp_bit dflags) 598 599 #-nope t)) … … 600 601 (setq vect-subtype (%array-header-subtype displaced-to))) 601 602 ; 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)) 603 604 (if (eq rank 1) 604 (%gvector ppc32::subtag-vectorH605 (%gvector target::subtag-vectorH 605 606 (if (fixnump fill) fill new-size) 606 607 new-size … … 608 609 real-offset 609 610 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) 616 617 (do* ((dims dimensions (cdr dims)) 617 618 (i 0 (1+ i))) 618 619 ((null dims)) 619 620 (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))) 621 622 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)) 622 641 623 642 … … 862 881 (when (egc-enabled-p) 863 882 (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)))) 867 886 (values total full g2-count g1-count g0-count))) 868 887 … … 893 912 ; this IS effectively a passive way of inquiring about enabled status. 894 913 (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)))) 896 915 897 916 (defun egc-configuration () 898 917 (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)))) 905 924 906 925 … … 917 936 (if (eql (uvsize (setq macptr (require-type macptr 'macptr))) 1) 918 937 0 919 (uvref macptr PPC32::XMACPTR.FLAGS-CELL)))938 (uvref macptr TARGET::XMACPTR.FLAGS-CELL))) 920 939 921 940 … … 925 944 (defun set-macptr-flags (macptr value) 926 945 (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) 928 947 value)) 929 948 … … 949 968 (or (and (>= code (char-code #\A)) (<= code (char-code #\Z))) 950 969 (and (>= code (char-code #\a)) (<= code (char-code #\z)))))) 970 971 951 972 952 973 -
trunk/ccl/level-1/l1-clos-boot.lisp
r311 r395 31 31 (defun instance-slots (instance) 32 32 (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)) 35 35 ((typep instance 'standard-generic-function) (gf.slots instance)) 36 36 (t (error "Don't know how to find slots of ~s" instance))))) … … 532 532 (eval-when (:compile-toplevel :execute) 533 533 (defmacro make-structure-vector (size) 534 `(%alloc-misc ,size ppc32::subtag-struct nil))534 `(%alloc-misc ,size target::subtag-struct nil)) 535 535 536 536 ) … … 1410 1410 1411 1411 (defun standard-instance-p (i) 1412 (eq (typecode i) ppc32::subtag-instance))1412 (eq (typecode i) target::subtag-instance)) 1413 1413 1414 1414 … … 2272 2272 2273 2273 (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) 2276 2276 (eq *standard-effective-slot-definition-class-wrapper* 2277 2277 (instance.class-wrapper slotd)) … … 2312 2312 2313 2313 (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) 2316 2316 (eq *standard-effective-slot-definition-class-wrapper* 2317 2317 (instance.class-wrapper slotd))
Note:
See TracChangeset
for help on using the changeset viewer.
