projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.8.5.10:
[sbcl.git]
/
src
/
compiler
/
disassem.lisp
diff --git
a/src/compiler/disassem.lisp
b/src/compiler/disassem.lisp
index
2341203
..
785c81f
100644
(file)
--- a/
src/compiler/disassem.lisp
+++ b/
src/compiler/disassem.lisp
@@
-19,7
+19,7
@@
(deftype alignment () '(integer 0 64))
(deftype offset () '(signed-byte 24))
(deftype address () '(unsigned-byte 32))
(deftype alignment () '(integer 0 64))
(deftype offset () '(signed-byte 24))
(deftype address () '(unsigned-byte 32))
-(deftype length () '(unsigned-byte 24))
+(deftype disassem-length () '(unsigned-byte 24))
(deftype column () '(integer 0 1000))
(def!constant max-filtered-value-index 32)
(deftype column () '(integer 0 1000))
(def!constant max-filtered-value-index 32)
@@
-35,7
+35,6
@@
(declaim (type hash-table *disassem-insts*))
(defvar *disassem-inst-space* nil)
(declaim (type hash-table *disassem-insts*))
(defvar *disassem-inst-space* nil)
-(declaim (type (or null inst-space) *disassem-inst-space*))
;;; minimum alignment of instructions, in bytes
(defvar *disassem-inst-alignment-bytes* sb!vm:n-word-bytes)
;;; minimum alignment of instructions, in bytes
(defvar *disassem-inst-alignment-bytes* sb!vm:n-word-bytes)
@@
-233,7
+232,7
@@
(mask dchunk-zero :type dchunk) ; bits in the inst that are constant
(id dchunk-zero :type dchunk) ; value of those constant bits
(mask dchunk-zero :type dchunk) ; bits in the inst that are constant
(id dchunk-zero :type dchunk) ; value of those constant bits
- (length 0 :type length) ; in bytes
+ (length 0 :type disassem-length) ; in bytes
(print-name nil :type symbol)
(print-name nil :type symbol)
@@
-260,6
+259,10
@@
(def!method print-object ((ispace inst-space) stream)
(print-unreadable-object (ispace stream :type t :identity t)))
(def!method print-object ((ispace inst-space) stream)
(print-unreadable-object (ispace stream :type t :identity t)))
+;;; now that we've defined the structure, we can declaim the type of
+;;; the variable:
+(declaim (type (or null inst-space) *disassem-inst-space*))
+
(defstruct (inst-space-choice (:conc-name ischoice-)
(:copier nil))
(common-id dchunk-zero :type dchunk) ; applies to *parent's* mask
(defstruct (inst-space-choice (:conc-name ischoice-)
(:copier nil))
(common-id dchunk-zero :type dchunk) ; applies to *parent's* mask
@@
-319,7
+322,7
@@
(name nil)
(args nil :type list)
(name nil)
(args nil :type list)
- (length 0 :type length) ; in bytes
+ (length 0 :type disassem-length) ; in bytes
(default-printer nil :type list))
\f
(default-printer nil :type list))
\f
@@
-943,7
+946,7
@@
(let ((form (maybe-listify adjusted-forms)))
(if (and (not (eq use-label t))
(not (atom adjusted-forms))
(let ((form (maybe-listify adjusted-forms)))
(if (and (not (eq use-label t))
(not (atom adjusted-forms))
- (/= (Length adjusted-forms) 1))
+ (/= (length adjusted-forms) 1))
(pd-error
"cannot label a multiple-field argument ~
unless using a function: ~S" arg)
(pd-error
"cannot label a multiple-field argument ~
unless using a function: ~S" arg)
@@
-1214,6
+1217,7
@@
(cons car cdr)))
(defun sharing-mapcar (fun list)
(cons car cdr)))
(defun sharing-mapcar (fun list)
+ (declare (type function fun))
#!+sb-doc
"A simple (one list arg) mapcar that avoids consing up a new list
as long as the results of calling FUN on the elements of LIST are
#!+sb-doc
"A simple (one list arg) mapcar that avoids consing up a new list
as long as the results of calling FUN on the elements of LIST are
@@
-1508,11
+1512,11
@@
(declaim (maybe-inline sign-extend aligned-p align tab tab0))
(defun bytes-to-bits (bytes)
(declaim (maybe-inline sign-extend aligned-p align tab tab0))
(defun bytes-to-bits (bytes)
- (declare (type length bytes))
+ (declare (type disassem-length bytes))
(* bytes sb!vm:n-byte-bits))
(defun bits-to-bytes (bits)
(* bytes sb!vm:n-byte-bits))
(defun bits-to-bytes (bits)
- (declare (type length bits))
+ (declare (type disassem-length bits))
(multiple-value-bind (bytes rbits)
(truncate bits sb!vm:n-byte-bits)
(when (not (zerop rbits))
(multiple-value-bind (bytes rbits)
(truncate bits sb!vm:n-byte-bits)
(when (not (zerop rbits))