variants no longer cons.
* optimization: Direct calls to CHAR-{EQUAL,LESSP,GREATERP} and
their NOT- variants no longer cons.
- * optimization: Stack allocation of arrays containing unboxed
- elements is slightly more efficient on x86 and x86-64.
* enhancement: XREF information is now collected to references made
to global variables using SYMBOL-VALUE and a constant argument.
* enhancement: SIGINT now causes a specific condition
should know the connection between an NLE and its CLEANUP.)
--------------------------------------------------------------------------------
#27
-(We always zeroize stack-allocated arrays of boxed elements. The
-previous note here suggested that we could avoid that step on
-platforms with conservative GC; it's not clear to me (NJF) that
-doing so is a wise idea.)
-
-x86 and x86-64 do not zeroize stack-allocated arrays of unboxed
-elements; other platforms could copy what they do.
+Initialization of stack-allocated arrays is inefficient: we always
+fill the vector with zeroes, even when it is not needed (as for
+platforms with conservative GC or for arrays of unboxed objectes) and
+is performed later explicitely.
+
+(This is harder than it might look at first glance, as MAKE-ARRAY is smart
+enough to eliminate something like ':initial-element 0'. Such an optimization
+is valid if the vector is being allocated in the heap, but not if it is being
+allocated on the stack. You could remove this optimization, but that makes
+the heap-allocated case somewhat slower...)
--------------------------------------------------------------------------------
#28
a. Accessing raw slots in structure instances is more inefficient than
(storew length result vector-length-slot other-pointer-lowtag))))
(define-vop (allocate-vector-on-stack)
- (:args (type :scs (unsigned-reg immediate))
+ (:args (type :scs (unsigned-reg))
(length :scs (any-reg))
(words :scs (any-reg) :target ecx))
(:temporary (:sc any-reg :offset ecx-offset :from (:argument 2)) ecx)
(:policy :fast-safe)
(:node-var node)
(:generator 100
- (when (sc-is type immediate)
- (aver (typep (tn-value type) '(unsigned-byte 8))))
- (let ((unboxed-elements-p (and (sc-is type immediate)
- (/= (tn-value type)
- simple-vector-widetag))))
- (inst lea result (make-ea :byte :base words :disp
- (+ (1- (ash 1 n-lowtag-bits))
- (* vector-data-offset n-word-bytes))))
- (inst and result (lognot lowtag-mask))
- ;; FIXME: It would be good to check for stack overflow here.
- (move ecx words)
- (inst shr ecx n-fixnum-tag-bits)
- (allocation result result node t)
- (unless unboxed-elements-p
- (inst cld))
- (inst lea res
- (make-ea :byte :base result :disp (* vector-data-offset n-word-bytes)))
- (inst lea result (make-ea :byte :base result :disp other-pointer-lowtag))
- (storew type result 0 other-pointer-lowtag)
- (storew length result vector-length-slot other-pointer-lowtag)
- (unless unboxed-elements-p
- (zeroize zero)
- (inst rep)
- (inst stos zero)))))
+ (inst lea result (make-ea :byte :base words :disp
+ (+ (1- (ash 1 n-lowtag-bits))
+ (* vector-data-offset n-word-bytes))))
+ (inst and result (lognot lowtag-mask))
+ ;; FIXME: It would be good to check for stack overflow here.
+ (move ecx words)
+ (inst shr ecx n-fixnum-tag-bits)
+ (allocation result result node t)
+ (inst cld)
+ (inst lea res
+ (make-ea :byte :base result :disp (* vector-data-offset n-word-bytes)))
+ (inst lea result (make-ea :byte :base result :disp other-pointer-lowtag))
+ (storew type result 0 other-pointer-lowtag)
+ (storew length result vector-length-slot other-pointer-lowtag)
+ (zeroize zero)
+ (inst rep)
+ (inst stos zero)))
(in-package "SB!C")
(:policy :fast-safe)
(:node-var node)
(:generator 100
- (let ((unboxed-elements-p (and (sc-is type immediate)
- (/= (tn-value type)
- simple-vector-widetag))))
- (inst lea result (make-ea :byte :base words :disp
- (+ (1- (ash 1 n-lowtag-bits))
- (* vector-data-offset n-word-bytes))))
- (inst and result (lognot lowtag-mask))
- ;; FIXME: It would be good to check for stack overflow here.
- (move ecx words)
- (inst shr ecx n-fixnum-tag-bits)
- (allocation result result node t)
- (unless unboxed-elements-p
- (inst cld))
- (inst lea res
- (make-ea :byte :base result :disp (* vector-data-offset n-word-bytes)))
- (inst lea result (make-ea :byte :base result :disp other-pointer-lowtag))
- (sc-case type
- (immediate
- (aver (typep (tn-value type) '(unsigned-byte 8)))
- (storeb (tn-value type) result 0 other-pointer-lowtag))
- (t
- (storew type result 0 other-pointer-lowtag)))
- (storew length result vector-length-slot other-pointer-lowtag)
- (unless unboxed-elements-p
- (inst xor zero zero)
- (inst rep)
- (inst stos zero)))))
+ (inst lea result (make-ea :byte :base words :disp
+ (+ (1- (ash 1 n-lowtag-bits))
+ (* vector-data-offset n-word-bytes))))
+ (inst and result (lognot lowtag-mask))
+ ;; FIXME: It would be good to check for stack overflow here.
+ (move ecx words)
+ (inst shr ecx n-fixnum-tag-bits)
+ (allocation result result node t)
+ (inst cld)
+ (inst lea res
+ (make-ea :byte :base result :disp (* vector-data-offset n-word-bytes)))
+ (inst lea result (make-ea :byte :base result :disp other-pointer-lowtag))
+ (sc-case type
+ (immediate
+ (aver (typep (tn-value type) '(unsigned-byte 8)))
+ (storeb (tn-value type) result 0 other-pointer-lowtag))
+ (t
+ (storew type result 0 other-pointer-lowtag)))
+ (storew length result vector-length-slot other-pointer-lowtag)
+ (inst xor zero zero)
+ (inst rep)
+ (inst stos zero)))
(in-package "SB!C")
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.4.65"
+"1.0.4.66"