projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.pre8.34
[sbcl.git]
/
src
/
code
/
pcounter.lisp
diff --git
a/src/code/pcounter.lisp
b/src/code/pcounter.lisp
index
57a38f7
..
d2b6b5e
100644
(file)
--- a/
src/code/pcounter.lisp
+++ b/
src/code/pcounter.lisp
@@
-8,20
+8,17
@@
;;;; 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
\f
;;;; basic PCOUNTER stuff
-(/show0 "pcounter.lisp 16")
-
-(defstruct (pcounter (:copier nil))
- (integer 0 :type unsigned-byte)
- (fixnum 0 :type (and fixnum unsigned-byte)))
-
-(/show0 "pcounter.lisp 22")
+(/show0 "pcounter.lisp 21")
(declaim (maybe-inline incf-pcounter))
(defun incf-pcounter (pcounter delta)
(declaim (maybe-inline incf-pcounter))
(defun incf-pcounter (pcounter delta)
@@
-34,7
+31,7
@@
(setf (pcounter-fixnum pcounter) 0))))
pcounter)
(setf (pcounter-fixnum pcounter) 0))))
pcounter)
-(/show0 "pcounter.lisp 36")
+(/show0 "pcounter.lisp 34")
;;;(declaim (inline pcounter->integer)) ; FIXME: maybe inline when more stable
(defun pcounter->integer (pcounter)
;;;(declaim (inline pcounter->integer)) ; FIXME: maybe inline when more stable
(defun pcounter->integer (pcounter)
@@
-47,7
+44,7
@@
;;;; start with a FIXNUM counter and only create a PCOUNTER if the
;;;; FIXNUM overflows.
;;;; start with a FIXNUM counter and only create a PCOUNTER if the
;;;; FIXNUM overflows.
-(/show0 "pcounter.lisp 50")
+(/show0 "pcounter.lisp 47")
(declaim (inline %incf-pcounter-or-fixnum))
(defun %incf-pcounter-or-fixnum (x delta)
(declaim (inline %incf-pcounter-or-fixnum))
(defun %incf-pcounter-or-fixnum (x delta)
@@
-62,7
+59,7
@@
(define-modify-macro incf-pcounter-or-fixnum (delta) %incf-pcounter-or-fixnum)
(define-modify-macro incf-pcounter-or-fixnum (delta) %incf-pcounter-or-fixnum)
-(/show0 "pcounter.lisp 64")
+(/show0 "pcounter.lisp 62")
;;; Trade off space for execution time by handling the common fast
;;; (TYPEP DELTA 'FIXNUM) case inline and only calling generic
;;; Trade off space for execution time by handling the common fast
;;; (TYPEP DELTA 'FIXNUM) case inline and only calling generic
@@
-76,7
+73,7
@@
(incf-pcounter-or-fixnum ,x ,delta)
(incf-pcounter-or-fixnum ,x ,delta)))))
(incf-pcounter-or-fixnum ,x ,delta)
(incf-pcounter-or-fixnum ,x ,delta)))))
-(/show0 "pcounter.lisp 80")
+(/show0 "pcounter.lisp 76")
(declaim (maybe-inline pcounter-or-fixnum->integer))
(defun pcounter-or-fixnum->integer (x)
(declaim (maybe-inline pcounter-or-fixnum->integer))
(defun pcounter-or-fixnum->integer (x)