())
(defknown %setnth (index list t) t (unsafe))
(defknown %set-fill-pointer (vector index) index (unsafe))
-\f
-;;;; internal type predicates
-
-;;; Simple TYPEP uses that don't have any standard predicate are
-;;; translated into non-standard unary predicates.
-(defknown (fixnump bignump ratiop short-float-p single-float-p double-float-p
- long-float-p base-char-p %standard-char-p %instancep
- array-header-p)
- (t) boolean (movable foldable flushable))
-
-;;; REMOVEME
-#|
-\f
-;;;; miscellaneous "sub-primitives"
-
-(defknown %sp-string-compare
- (simple-string index index simple-string index index)
- (or index null)
- (foldable flushable))
-|#
\ No newline at end of file
(define-primitive-object (function :type function
:lowtag function-pointer-type
:header function-header-type)
- #!-gengc (self :ref-trans %function-self :set-trans (setf %function-self))
+ #!-(or gengc x86) (self :ref-trans %function-self
+ :set-trans (setf %function-self))
+ #!+x86 (self
+ ;; KLUDGE: There's no :SET-KNOWN, :SET-TRANS, :REF-KNOWN, or
+ ;; :REF-TRANS here in this case. Instead, there's separate
+ ;; DEFKNOWN/DEFINE-VOP/DEFTRANSFORM stuff in
+ ;; compiler/x86/system.lisp to define and declare them by
+ ;; hand. I don't know why this is, but that's (basically)
+ ;; the way it was done in CMU CL, and it works. (It's not
+ ;; exactly the same way it was done in CMU CL in that CMU
+ ;; CL's allows duplicate DEFKNOWNs, blithely overwriting any
+ ;; previous data associated with the previous DEFKNOWN, and
+ ;; that property was used to mask the definitions here. In
+ ;; SBCL as of 0.6.12.64 that's not allowed -- too confusing!
+ ;; -- so we have to explicitly suppress the DEFKNOWNish
+ ;; stuff here in order to allow this old hack to work in the
+ ;; new world. -- WHN 2001-08-82
+ )
#!+gengc (entry-point :c-type "char *")
(next :type (or function null)
:ref-known (flushable)
(dolist (name names)
(let ((old-function-info (info :function :info name)))
(when old-function-info
- ;; This is an error because it's generally a bad thing to blow
- ;; away all the old optimization stuff. It's also a potential
- ;; source of sneaky bugs:
+ ;; This is handled as an error because it's generally a bad
+ ;; thing to blow away all the old optimization stuff. It's
+ ;; also a potential source of sneaky bugs:
;; DEFKNOWN FOO
;; DEFTRANSFORM FOO
;; DEFKNOWN FOO ; possibly hidden inside some macroexpansion
;; ; Now the DEFTRANSFORM doesn't exist in the target Lisp.
;; However, it's continuable because it might be useful to do
;; it when testing new optimization stuff interactively.
- #+nil (cerror "Go ahead, overwrite it."
- "overwriting old FUNCTION-INFO for ~S" name)
- (warn "~@<overwriting old FUNCTION-INFO ~2I~_~S ~I~_for ~S~:>"
- old-function-info name)))
+ (cerror "Go ahead, overwrite it."
+ "~@<overwriting old FUNCTION-INFO ~2I~_~S ~I~_for ~S~:>"
+ old-function-info name)))
(setf (info :function :type name target-env) ctype)
(setf (info :function :where-from name target-env) :declared)
(setf (info :function :kind name target-env) :function)
:disp (- function-pointer-type other-pointer-type)))
(inst add func code)))
-;;; REMOVEME
-(defknown %function-self (function) function (flushable))
-
(define-vop (%function-self)
(:policy :fast-safe)
(:translate %function-self)
(def-source-transform %funcallable-instance-function (fin)
`(%function-self ,fin))
-;;; REMOVEME
-(defknown (setf %function-self) (function function) function (unsafe))
-
(define-vop (%set-function-self)
(:policy :fast-safe)
(:translate (setf %function-self))
;;; four numeric fields, is used for versions which aren't released
;;; but correspond only to CVS tags or snapshots.
-"0.6.12.63"
+"0.6.12.64"