* add a test-case.
* untested on alpha.
(load-stack-tn temp ,tn)
temp))))
(storew reg ,list ,slot list-pointer-lowtag))))
- (let* ((dx-p (awhen (sb!c::node-lvar node) (sb!c::lvar-dynamic-extent it)))
+ (let* ((dx-p (node-stack-allocate-p node))
(cons-cells (if star (1- num) num))
(space (* (pad-data-block cons-size) cons-cells)))
(pseudo-atomic (:extra (if dx-p 0 space))
(define-vop (make-closure)
(:args (function :to :save :scs (descriptor-reg)))
(:info length stack-allocate-p)
- (:ignore stack-allocate-p)
(:temporary (:scs (non-descriptor-reg)) temp)
(:results (result :scs (descriptor-reg)))
(:node-var node)
(:generator 10
(let* ((size (+ length closure-info-offset))
- (alloc-size (pad-data-block size))
- (dx-p (node-stack-allocate-p node)))
+ (alloc-size (pad-data-block size)))
(inst li
(logior (ash (1- size) n-widetag-bits) closure-header-widetag)
temp)
- (pseudo-atomic (:extra (if dx-p 0 alloc-size))
- (cond (dx-p
+ (pseudo-atomic (:extra (if stack-allocate-p 0 alloc-size))
+ (cond (stack-allocate-p
;; no need to align CSP: FUN-POINTER-LOWTAG already has
;; the corresponding bit set
(inst bis csp-tn fun-pointer-lowtag result)
(define-vop (make-closure)
(:args (function :to :save :scs (descriptor-reg)))
(:info length stack-allocate-p)
- (:ignore stack-allocate-p)
(:temporary (:scs (non-descriptor-reg)) temp)
(:temporary (:sc non-descriptor-reg :offset nl3-offset) pa-flag)
(:results (result :scs (descriptor-reg)))
- (:node-var node)
(:generator 10
(let* ((size (+ length closure-info-offset))
(alloc-size (pad-data-block size))
- (dx-p (node-stack-allocate-p node))
- (allocation-area-tn (if dx-p csp-tn alloc-tn)))
- (pseudo-atomic (pa-flag :extra (if dx-p 0 alloc-size))
+ (allocation-area-tn (if stack-allocate-p csp-tn alloc-tn)))
+ (pseudo-atomic (pa-flag :extra (if stack-allocate-p 0 alloc-size))
;; no need to align CSP for DX: FUN-POINTER-LOWTAG already has
;; the corresponding bit set
(inst clrrwi. result allocation-area-tn n-lowtag-bits)
- (when dx-p
- (inst addi csp-tn alloc-size))
+ (when stack-allocate-p
+ (inst addi csp-tn csp-tn alloc-size))
(inst ori result result fun-pointer-lowtag)
(inst lr temp (logior (ash (1- size) n-widetag-bits) closure-header-widetag))
(storew temp result 0 fun-pointer-lowtag)))
(assert (equal (multiple-value-list (test-alignment-dx-list form)) res))
(assert (equal *x* '(1 2 3 4)))))
+;;; closure
+(declaim (notinline true))
+(defun true (x)
+ (declare (ignore x))
+ t)
+
+(defun-with-dx dxclosure (x)
+ (flet ((f (y)
+ (+ y x)))
+ (declare (dynamic-extent #'f))
+ (true #'f)))
+
+(assert (eq t (dxclosure 13)))
\f
(defmacro assert-no-consing (form &optional times)
- `(%assert-no-consing (lambda () ,form ,times)))
+ `(%assert-no-consing (lambda () ,form) ,times))
(defun %assert-no-consing (thunk &optional times)
(let ((before (get-bytes-consed))
(times (or times 10000)))
#+(or x86 x86-64 alpha ppc)
(progn
+ (assert-no-consing (dxclosure 42))
(assert-no-consing (dxlength 1 2 3))
(assert-no-consing (dxlength t t t t t t))
(assert-no-consing (dxlength))
;;; 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".)
-"0.9.1.60"
+"0.9.1.61"