(:policy :fast)
(:translate symbol-value))
+(define-vop (symbol-hash)
+ (:policy :fast-safe)
+ (:translate symbol-hash)
+ (:args (symbol :scs (descriptor-reg)))
+ (:results (res :scs (any-reg)))
+ (:result-types positive-fixnum)
+ (:generator 2
+ ;; The symbol-hash slot of NIL holds NIL because it is also the
+ ;; cdr slot, so we have to strip off the two low bits to make sure
+ ;; it is a fixnum. The lowtag selection magic that is required to
+ ;; ensure this is explained in the comment in objdef.lisp
+ (loadw res symbol symbol-hash-slot other-pointer-lowtag)
+ (inst andn res res fixnum-tag-mask)))
\f
;;;; FDEFINITION (fdefn) objects.
(define-vop (fdefn-fun cell-ref)
(inst cmp type simple-fun-header-widetag)
(inst b :eq normal-fn)
(inst move lip function)
- (inst li lip (make-fixup (extern-alien-name "closure_tramp") :foreign))
+ (inst li lip (make-fixup "closure_tramp" :foreign))
(emit-label normal-fn)
(storew function fdefn fdefn-fun-slot other-pointer-lowtag)
(storew lip fdefn fdefn-raw-addr-slot other-pointer-lowtag)
(:results (result :scs (descriptor-reg)))
(:generator 38
(storew null-tn fdefn fdefn-fun-slot other-pointer-lowtag)
- (inst li temp (make-fixup (extern-alien-name "undefined_tramp") :foreign))
+ (inst li temp (make-fixup "undefined_tramp" :foreign))
(storew temp fdefn fdefn-raw-addr-slot other-pointer-lowtag)
(move result fdefn)))