projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.8.3.66:
[sbcl.git]
/
src
/
compiler
/
vmdef.lisp
diff --git
a/src/compiler/vmdef.lisp
b/src/compiler/vmdef.lisp
index
9ed8e2b
..
3b6fb42
100644
(file)
--- a/
src/compiler/vmdef.lisp
+++ b/
src/compiler/vmdef.lisp
@@
-31,9
+31,9
@@
(defun sc-number-or-lose (x)
(the sc-number (sc-number (sc-or-lose x))))
(defun sc-number-or-lose (x)
(the sc-number (sc-number (sc-or-lose x))))
-;;; Like the non-meta versions, but go for the meta-compile-time info.
-;;; These should not be used after load time, since compiling the compiler
-;;; changes the definitions.
+;;; This is like the non-meta versions, except we go for the
+;;; meta-compile-time info. These should not be used after load time,
+;;; since compiling the compiler changes the definitions.
(defun meta-sc-or-lose (x)
(the sc
(or (gethash x *backend-meta-sc-names*)
(defun meta-sc-or-lose (x)
(the sc
(or (gethash x *backend-meta-sc-names*)
@@
-45,9
+45,9
@@
(defun meta-sc-number-or-lose (x)
(the sc-number (sc-number (meta-sc-or-lose x))))
\f
(defun meta-sc-number-or-lose (x)
(the sc-number (sc-number (meta-sc-or-lose x))))
\f
-;;;; side-effect classes
+;;;; side effect classes
-(def-boolean-attribute vop
+(!def-boolean-attribute vop
any)
\f
;;;; move/coerce definition
any)
\f
;;;; move/coerce definition
@@
-97,7
+97,12
@@
;;;; generation of emit functions
(eval-when (:compile-toplevel :load-toplevel :execute)
;;;; generation of emit functions
(eval-when (:compile-toplevel :load-toplevel :execute)
- (defconstant max-vop-tn-refs 256))
+ ;; We need the EVAL-WHEN because %EMIT-GENERIC-VOP (below)
+ ;; uses #.MAX-VOP-TN-REFS, not just MAX-VOP-TN-REFS.
+ ;; -- AL 20010218
+ ;;
+ ;; See also the description of VOP-INFO-TARGETS. -- APD, 2002-01-30
+ (def!constant max-vop-tn-refs 256))
(defvar *vop-tn-refs* (make-array max-vop-tn-refs :initial-element nil))
(defvar *using-vop-tn-refs* nil)
(defvar *vop-tn-refs* (make-array max-vop-tn-refs :initial-element nil))
(defvar *using-vop-tn-refs* nil)
@@
-108,7
+113,7
@@
(pushnew 'flush-vop-tn-refs *before-gc-hooks*)
(pushnew 'flush-vop-tn-refs *before-gc-hooks*)
-(defconstant sc-bits (integer-length (1- sc-number-limit)))
+(def!constant sc-bits (integer-length (1- sc-number-limit)))
(defun emit-generic-vop (node block template args results &optional info)
(%emit-generic-vop node block template args results info))
(defun emit-generic-vop (node block template args results &optional info)
(%emit-generic-vop node block template args results info))
@@
-149,6
+154,9
@@
(ash temp (- (1+ sc-bits))))
(make-restricted-tn nil (ash temp -1))))
(write-ref (reference-tn tn t)))
(ash temp (- (1+ sc-bits))))
(make-restricted-tn nil (ash temp -1))))
(write-ref (reference-tn tn t)))
+ ;; KLUDGE: These formulas must be consistent with those in
+ ;; COMPUTE-REF-ORDERING, and this is currently
+ ;; maintained by hand. -- WHN 2002-01-30, paraphrasing APD
(setf (aref refs index) (reference-tn tn nil))
(setf (aref refs (1+ index)) write-ref)
(if prev
(setf (aref refs index) (reference-tn tn nil))
(setf (aref refs (1+ index)) write-ref)
(if prev
@@
-191,21
+199,18
@@
#'<=
:key #'template-cost))
\f
#'<=
:key #'template-cost))
\f
-;;; Return a function type specifier describing Template's type computed
+;;; Return a function type specifier describing TEMPLATE's type computed
;;; from the operand type restrictions.
(defun template-type-specifier (template)
(declare (type template template))
(flet ((convert (types more-types)
(flet ((frob (x)
(if (eq x '*)
;;; from the operand type restrictions.
(defun template-type-specifier (template)
(declare (type template template))
(flet ((convert (types more-types)
(flet ((frob (x)
(if (eq x '*)
- 't
+ t
(ecase (first x)
(ecase (first x)
- (:or `(or ,@(mapcar #'(lambda (type)
- (type-specifier
- (primitive-type-type
- type)))
+ (:or `(or ,@(mapcar #'primitive-type-specifier
(rest x))))
(rest x))))
- (:constant `(constant-argument ,(third x)))))))
+ (:constant `(constant-arg ,(third x)))))))
`(,@(mapcar #'frob types)
,@(when more-types
`(&rest ,(frob more-types)))))))
`(,@(mapcar #'frob types)
,@(when more-types
`(&rest ,(frob more-types)))))))