(storew eax x 0 other-pointer-lowtag)
(move res x)))
\f
-(define-vop (make-fixnum)
+(define-vop (pointer-hash)
+ (:translate pointer-hash)
(:args (ptr :scs (any-reg descriptor-reg) :target res))
(:results (res :scs (any-reg descriptor-reg)))
+ (:policy :fast-safe)
(:generator 1
- ;; Some code (the hash table code) depends on this returning a
- ;; positive number so make sure it does.
(move res ptr)
- (inst shl res 4)
+ ;; Mask the lowtag, and shift the whole address into a positive
+ ;; fixnum.
+ (inst and res (lognot lowtag-mask))
(inst shr res 1)))
(define-vop (make-other-immediate-type)
(define-source-transform %closure-fun (closure)
`(%simple-fun-self ,closure))
-(define-source-transform %funcallable-instance-fun (fin)
- `(%simple-fun-self ,fin))
-
(define-vop (%set-fun-self)
(:policy :fast-safe)
(:translate (setf %simple-fun-self))
fun-pointer-lowtag)))
(storew temp function simple-fun-self-slot fun-pointer-lowtag)
(move result new-self)))
-
-;;; KLUDGE: This seems to be some kind of weird override of the way
-;;; that the objdef.lisp code would ordinarily set up the slot
-;;; accessor. It's inherited from CMU CL, and it works, and naively
-;;; deleting it seemed to cause problems, but it's not obvious why
-;;; it's done this way. Any ideas? -- WHN 2001-08-02
-(defknown ((setf %funcallable-instance-fun)) (function function) function
- (unsafe))
-;;; CMU CL comment:
-;;; We would have really liked to use a source-transform for this, but
-;;; they don't work with SETF functions.
-;;; FIXME: Can't we just use DEFSETF or something?
-(deftransform (setf %funcallable-instance-fun) ((value fin))
- '(setf (%simple-fun-self fin) value))
\f
;;;; other miscellaneous VOPs