Skip to content

Commit

Permalink
Rearrange inline function to appear before they are used.
Browse files Browse the repository at this point in the history
  • Loading branch information
stassats committed Dec 24, 2014
1 parent 74d6e68 commit be3ceb6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions disk.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
;; (collect-stats code)
(funcall (aref *readers* code) stream))

(declaim (inline get-instance))
(defun get-instance (id)
(aref *indexes* id))

;;;

(defun slot-effective-definition (class slot-name)
Expand Down Expand Up @@ -642,10 +646,6 @@
(write-n-bytes #.(type-code 'identifiable) 1 stream)
(write-n-bytes (fast-id object) +id-length+ stream))

(declaim (inline get-instance))
(defun get-instance (id)
(aref *indexes* id))

(defreader identifiable (stream)
(get-instance (read-n-bytes +id-length+ stream)))

Expand Down
16 changes: 8 additions & 8 deletions io-sbcl.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,6 @@
(type (integer 1 4) n))
(n-signed-mem-ref n (advance-input-stream n stream)))

(declaim (inline write-n-signed-bytes))
(defun write-n-signed-bytes (value n stream)
(declare (optimize speed)
(sb-ext:muffle-conditions sb-ext:compiler-note)
(fixnum n))
(setf (n-signed-mem-ref n (advance-output-stream n stream)) value)
t)

(defun flush-output-buffer (stream n &optional count)
(write-buffer (output-stream-fd stream)
(output-stream-buffer-start stream)
Expand Down Expand Up @@ -347,6 +339,14 @@
(type (integer 1 4) n))
(setf (mem-ref-32 (advance-output-stream n stream)) value))

(declaim (inline write-n-signed-bytes))
(defun write-n-signed-bytes (value n stream)
(declare (optimize speed)
(sb-ext:muffle-conditions sb-ext:compiler-note)
(fixnum n))
(setf (n-signed-mem-ref n (advance-output-stream n stream)) value)
t)

;;;

(declaim (inline read-single-float))
Expand Down

0 comments on commit be3ceb6

Please sign in to comment.