Changeset 657
- Timestamp:
- Mar 17, 2004, 7:26:08 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-1/l1-lisp-threads.lisp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-lisp-threads.lisp
r602 r657 1 ;;; -*- Mode: Lisp; Package: CCL -*-1 ;;; -*- Mode: LISP; Package: CCL -*- 2 2 ;;; 3 3 ;;; Copyright (C) 1994-2001 Digitool, Inc 4 ;;; This file is part of Open sourced MCL.4 ;;; This file is part of OpenMCL. 5 5 ;;; 6 ;;; Opensourced MCL is free software; you can redistribute it and/or 7 ;;; modify it under the terms of the GNU Lesser General Public 8 ;;; License as published by the Free Software Foundation; either 9 ;;; version 2.1 of the License, or (at your option) any later version. 6 ;;; OpenMCL is licensed under the terms of the Lisp Lesser GNU Public 7 ;;; License , known as the LLGPL and distributed with OpenMCL as the 8 ;;; file "LICENSE". The LLGPL consists of a preamble and the LGPL, 9 ;;; which is distributed with OpenMCL as the file "LGPL". Where these 10 ;;; conflict, the preamble takes precedence. 10 11 ;;; 11 ;;; Opensourced MCL is distributed in the hope that it will be useful, 12 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 ;;; Lesser General Public License for more details. 12 ;;; OpenMCL is referenced in the preamble as the "LIBRARY." 15 13 ;;; 16 ;;; You should have received a copy of the GNU Lesser General Public 17 ;;; License along with this library; if not, write to the Free Software 18 ;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 ;;; 14 ;;; The LLGPL is also available online at 15 ;;; http://opensource.franz.com/preamble.html 20 16 21 17 ;; l1-lisp-threads.lisp 22 18 23 ( cl:in-package "CCL")19 (in-package "CCL") 24 20 25 21 (defvar *bind-io-control-vars-per-process* nil … … 736 732 (when (fake-stack-frame-p p) 737 733 (setq p (%fake-stack-frame.sp p))) 738 (ldb (byte 32 0) (ash p ppc32::fixnumshift)))734 (ldb (byte #+ppc32-target 32 #+ppc64-target 64 0) (ash p target::fixnumshift))) 739 735 740 736 ; This returns the current head of the db-link chain. … … 742 738 (%fixnum-ref tcr ppc32::tcr.db-link)) 743 739 744 (defun previous-db-link (db-link start &optional (tcr (%current-tcr)))740 (defun previous-db-link (db-link start ) 745 741 (declare (fixnum db-link start)) 746 (if (eq tcr (%current-tcr)) 747 (let ((prev nil)) 748 (loop 749 (when (or (eql db-link start) (eql 0 start)) 750 (return prev)) 751 (setq prev start 752 start (%fixnum-ref start 0)))) 753 (let ((prev (%fixnum-ref db-link))) 754 (unless (eql prev 0) prev)))) 742 (let ((prev nil)) 743 (loop 744 (when (or (eql db-link start) (eql 0 start)) 745 (return prev)) 746 (setq prev start 747 start (%fixnum-ref start 0))))) 755 748 756 749 (defun count-db-links-in-frame (vsp parent-vsp &optional (tcr (%current-tcr))) … … 759 752 (count 0) 760 753 (first nil) 761 (last nil) 762 (current? (eq tcr (%current-tcr)))) 754 (last nil)) 763 755 (declare (fixnum db count)) 764 756 (loop 765 757 (cond ((eql db 0) 766 (unless current?767 (rotatef first last))768 758 (return (values count (or first 0) (or last 0)))) 769 759 ((and (>= db vsp) (< db parent-vsp)) … … 819 809 (< object high)))))) 820 810 811 (defparameter *aux-tsp-ranges* ()) 812 (defparameter *aux-vsp-ranges* ()) 813 (defun object-in-range-p (object range) 814 (declare (fixnum object)) 815 (when range 816 (destructuring-bind (active . high) range 817 (declare (fixnum active high)) 818 (and (< active object) 819 (< object high))))) 820 821 (defun object-in-some-range (object ranges) 822 (dolist (r ranges) 823 (when (object-in-range-p object r) 824 (return t)))) 825 826 821 827 (defun on-any-tsp-stack (object) 822 (or (%on-tsp-stack (%current-tcr) object))) 828 (or (%on-tsp-stack (%current-tcr) object) 829 (object-in-some-range object *aux-tsp-ranges*))) 823 830 824 831 (defun on-any-vstack (idx) 825 (or (%ptr-to-vstack-p (%current-tcr) idx))) 832 (or (%ptr-to-vstack-p (%current-tcr) idx) 833 (object-in-some-range idx *aux-vsp-ranges*))) 826 834 827 835 ; This MUST return either T or NIL. … … 958 966 (setq db-link-p t 959 967 arg-vsp last-db 960 last-db (previous-db-link last-db first-db tcr)968 last-db (previous-db-link last-db first-db) 961 969 phys-cell (+ phys-cell 2)) 962 970 (setq db-link-p nil)) … … 965 973 (return 966 974 (if db-link-p 967 ;; Really ought to find the next binding if not the968 ;; current tcr, but noone has complained about this969 ;; bug before, so why fix it?970 975 (values (+ 2 arg-vsp) 971 976 :saved-special
Note:
See TracChangeset
for help on using the changeset viewer.
