X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Fcall.lisp;h=e1a1267e48a3613f8d4bf8283e6b0e3481f2bccc;hb=94ea2b2082deaa0331dfb66fa6af6ca12dd8dc83;hp=abff23f9b96919013f77ec4c78c659c0a94de165;hpb=4dc4761909992ceb346d003f3fb19e5c837ee985;p=sbcl.git diff --git a/src/compiler/x86-64/call.lisp b/src/compiler/x86-64/call.lisp index abff23f..e1a1267 100644 --- a/src/compiler/x86-64/call.lisp +++ b/src/compiler/x86-64/call.lisp @@ -1248,8 +1248,10 @@ (inst mov value (make-ea :qword :base object :disp (- (* index n-word-bytes)))))) - ;;; Turn more arg (context, count) into a list. +(defoptimizer (%listify-rest-args stack-allocate-result) ((&rest args)) + t) + (define-vop (listify-rest-args) (:translate %listify-rest-args) (:policy :safe) @@ -1265,15 +1267,16 @@ (:generator 20 (let ((enter (gen-label)) (loop (gen-label)) - (done (gen-label))) + (done (gen-label)) + (stack-allocate-p (node-stack-allocate-p node))) (move src context) (move rcx count) ;; Check to see whether there are no args, and just return NIL if so. (inst mov result nil-value) (inst jecxz done) (inst lea dst (make-ea :qword :index rcx :scale 2)) - (pseudo-atomic - (allocation dst dst node) + (maybe-pseudo-atomic stack-allocate-p + (allocation dst dst node stack-allocate-p) (inst lea dst (make-ea :byte :base dst :disp list-pointer-lowtag)) ;; Convert the count into a raw value, so that we can use the ;; LOOP instruction.