projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.pre7.50:
[sbcl.git]
/
src
/
code
/
pcounter.lisp
diff --git
a/src/code/pcounter.lisp
b/src/code/pcounter.lisp
index
cfd7421
..
c250ecd
100644
(file)
--- a/
src/code/pcounter.lisp
+++ b/
src/code/pcounter.lisp
@@
-8,28
+8,28
@@
;;;; bytes consed in a profiled function are all examples of such
;;;; quantities. The name is an abbreviation for "Profiling COUNTER".
;;;;
;;;; bytes consed in a profiled function are all examples of such
;;;; quantities. The name is an abbreviation for "Profiling COUNTER".
;;;;
-;;;; It's not one of my more brilliant names, if you have a better
-;;;; suggestion, I might be interested. -- WHN 2001-06-22
+;;;; (This isn't one of my more brilliant names, so if you have a
+;;;; better suggestion, let me know. -- WHN 2001-06-22)
-(in-package "SB!IMPL")
+;;; This stuff is implemented in the SB!PROFILE because the profiling
+;;; code is currently the only code which wants to poke around in the
+;;; implementation details.
+(in-package "SB!PROFILE")
\f
;;;; basic PCOUNTER stuff
(/show0 "pcounter.lisp 16")
(defstruct (pcounter (:copier nil))
\f
;;;; basic PCOUNTER stuff
(/show0 "pcounter.lisp 16")
(defstruct (pcounter (:copier nil))
- (integer 0);; :type unsigned-byte)
- (fixnum 0));; :type (and fixnum unsigned-byte)))
+ (integer 0 :type unsigned-byte)
+ (fixnum 0 :type (and fixnum unsigned-byte)))
(/show0 "pcounter.lisp 22")
(/show0 "pcounter.lisp 22")
-(declaim (ftype (function (pcounter unsigned-byte) pcounter) incf-pcounter))
-;;;(declaim (inline incf-pcounter)) ; FIXME: maybe inline when more stable
+(declaim (maybe-inline incf-pcounter))
(defun incf-pcounter (pcounter delta)
(aver (typep delta 'unsigned-byte))
(let ((sum (+ (pcounter-fixnum pcounter) delta)))
(defun incf-pcounter (pcounter delta)
(aver (typep delta 'unsigned-byte))
(let ((sum (+ (pcounter-fixnum pcounter) delta)))
- (aver (typep sum 'unsigned-byte))
- ;;(declare (type unsigned-byte sum))
(cond ((typep sum 'fixnum)
(setf (pcounter-fixnum pcounter) sum))
(t
(cond ((typep sum 'fixnum)
(setf (pcounter-fixnum pcounter) sum))
(t
@@
-39,7
+39,6
@@
(/show0 "pcounter.lisp 36")
(/show0 "pcounter.lisp 36")
-(declaim (ftype (function (pcounter) integer) pcounter->integer))
;;;(declaim (inline pcounter->integer)) ; FIXME: maybe inline when more stable
(defun pcounter->integer (pcounter)
(+ (pcounter-integer pcounter)
;;;(declaim (inline pcounter->integer)) ; FIXME: maybe inline when more stable
(defun pcounter->integer (pcounter)
(+ (pcounter-integer pcounter)
@@
-53,8
+52,7
@@
(/show0 "pcounter.lisp 50")
(/show0 "pcounter.lisp 50")
-(declaim (ftype (function ((or pcounter fixnum) integer) (or pcounter fixnum)) %incf-pcounter-or-fixnum))
-;;;(declaim (inline %incf-pcounter-or-fixnum)) ; FIXME: maybe inline when more stable
+(declaim (inline %incf-pcounter-or-fixnum))
(defun %incf-pcounter-or-fixnum (x delta)
(etypecase x
(fixnum
(defun %incf-pcounter-or-fixnum (x delta)
(etypecase x
(fixnum
@@
-83,7
+81,6
@@
(/show0 "pcounter.lisp 80")
(/show0 "pcounter.lisp 80")
-(declaim (ftype (function ((or pcounter fixnum)) integer) pcounter-or-fixnum->integer))
(declaim (maybe-inline pcounter-or-fixnum->integer))
(defun pcounter-or-fixnum->integer (x)
(etypecase x
(declaim (maybe-inline pcounter-or-fixnum->integer))
(defun pcounter-or-fixnum->integer (x)
(etypecase x