X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Falpha%2Fcall.lisp;h=fd82448890b9fe3e69b35115a8288bddc7a37e65;hb=7c7e6276719b8d40fddec2070cad81064a25c8ed;hp=efbf2f251e268b019df90b45179fa877523c530f;hpb=8902b8b6bd2e9285749dd39d313b33b6c69c5213;p=sbcl.git diff --git a/src/compiler/alpha/call.lisp b/src/compiler/alpha/call.lisp index efbf2f2..fd82448 100644 --- a/src/compiler/alpha/call.lisp +++ b/src/compiler/alpha/call.lisp @@ -315,7 +315,7 @@ default-value-8 (move ocfp-tn csp-tn) (let ((defaults (defaults))) - (assert defaults) + (aver defaults) (assemble (*elsewhere*) (emit-label default-stack-vals) (do ((remaining defaults (cdr remaining))) @@ -594,7 +594,7 @@ default-value-8 ;;; passed as a more arg, but there is no new-FP, since the arguments ;;; have been set up in the current frame. (defmacro define-full-call (name named return variable) - (assert (not (and variable (eq return :tail)))) + (aver (not (and variable (eq return :tail)))) `(define-vop (,name ,@(when (eq return :unknown) '(unknown-values-receiver))) @@ -1106,20 +1106,26 @@ default-value-8 (define-full-reffer more-arg * 0 0 (descriptor-reg any-reg) * %more-arg) ;;; Turn &MORE arg (context, count) into a list. +(defoptimizer (%listify-rest-args stack-allocate-result) ((&rest args)) + t) + (define-vop (listify-rest-args) (:args (context-arg :target context :scs (descriptor-reg)) (count-arg :target count :scs (any-reg))) - (:arg-types * tagged-num (:constant t)) + (:arg-types * tagged-num) (:temporary (:scs (any-reg) :from (:argument 0)) context) (:temporary (:scs (any-reg) :from (:argument 1)) count) (:temporary (:scs (descriptor-reg) :from :eval) temp dst) (:results (result :scs (descriptor-reg))) (:translate %listify-rest-args) (:policy :safe) + (:node-var node) (:generator 20 - (let ((enter (gen-label)) - (loop (gen-label)) - (done (gen-label))) + (let* ((enter (gen-label)) + (loop (gen-label)) + (done (gen-label)) + (dx-p (node-stack-allocate-p node)) + (alloc-area-tn (if dx-p csp-tn alloc-tn))) (move context-arg context) (move count-arg count) ;; Check to see if there are any arguments. @@ -1128,11 +1134,13 @@ default-value-8 ;; We need to do this atomically. (pseudo-atomic () + ;; align CSP + (when dx-p (align-csp temp)) ;; Allocate a cons (2 words) for each item. - (inst bis alloc-tn list-pointer-lowtag result) + (inst bis alloc-area-tn list-pointer-lowtag result) (move result dst) (inst sll count 1 temp) - (inst addq alloc-tn temp alloc-tn) + (inst addq alloc-area-tn temp alloc-area-tn) (inst br zero-tn enter) ;; Store the current cons in the cdr of the previous cons.