The second argument to %more-arg-values is always 0. Remove it.
(incf (the (unsigned-byte 59)
(car info)))
(multiple-value-call original-fun
- (sb-c:%more-arg-values more-context
- 0
- more-count)))))))))
+ (sb-c:%more-arg-values more-context more-count)))))))))
\f
;;; silly examples
(let ((count-var (fourth bind)))
(specs `(,name (multiple-value-list
(sb!c:%more-arg-values (debug-var-value ',var ,n-frame)
- 0
(debug-var-value ',count-var ,n-frame)))))))
(:unknown
(specs `(,name (debug-signal 'invalid-value
(setf reversed-result
(append (reverse
(multiple-value-list
- (sb!c::%more-arg-values context 0 count)))
+ (sb!c::%more-arg-values context count)))
reversed-result))
(return-from enumerating))
(push (make-unprintable-object "unavailable &MORE argument")
(butlast args 2)
(if (fixnump count)
(multiple-value-list
- (sb!c:%more-arg-values context 0 count))
+ (sb!c:%more-arg-values context count))
(list
(make-unprintable-object "more unavailable arguments")))))
args)
(when (and more-context more-count)
(format *debug-io* "~S = ~S~%"
'more
- (multiple-value-list (sb!c:%more-arg-values more-context 0 more-count))))
+ (multiple-value-list (sb!c:%more-arg-values more-context more-count))))
(cond
((not any-p)
(format *debug-io*
(dconsing 0)
(inner-enclosed-profiles 0)
(dgc-run-time 0))
- (declare (truly-dynamic-extent dticks dconsing inner-enclosed-profiles))
+ (declare (truly-dynamic-extent dticks dconsing
+ inner-enclosed-profiles))
(unwind-protect
(let* ((start-ticks (get-internal-ticks))
(start-gc-run-time *gc-run-time*)
(nbf0 *n-bytes-freed-or-purified*)
(dynamic-usage-0 (sb-kernel:dynamic-usage))
(*enclosed-gc-run-time* (make-counter)))
- (declare (dynamic-extent *enclosed-ticks* *enclosed-consing* *enclosed-profiles* *enclosed-gc-run-time*))
+ (declare (dynamic-extent *enclosed-ticks* *enclosed-consing*
+ *enclosed-profiles*
+ *enclosed-gc-run-time*))
(unwind-protect
(multiple-value-call encapsulated-fun
(sb-c:%more-arg-values arg-context
- 0
arg-count))
(let ((*computing-profiling-data-for* encapsulated-fun)
(dynamic-usage-1 (sb-kernel:dynamic-usage)))
;;; them as function arguments.
(define-vop (%more-arg-values)
(:args (context :scs (descriptor-reg any-reg) :target src)
- (skip :scs (any-reg zero immediate))
(num :scs (any-reg) :target count))
- (:arg-types * positive-fixnum positive-fixnum)
+ (:arg-types * positive-fixnum)
(:temporary (:sc any-reg :from (:argument 0)) src)
(:temporary (:sc any-reg :from (:argument 2)) dst)
(:temporary (:sc descriptor-reg :from (:argument 1)) temp)
(:results (start :scs (any-reg))
(count :scs (any-reg)))
(:generator 20
- (sc-case skip
- (zero
- (move context src))
- (immediate
- (inst lda src (* (tn-value skip) n-word-bytes) context))
- (any-reg
- (inst addq context skip src)))
+ (move context src)
(move num count)
(inst move csp-tn start)
(inst beq num done)
;;; FIXME: The second argument here should really be NEGATIVE-INDEX, but doing that
;;; breaks the build, and I cannot seem to figure out why. --NS 2006-06-29
(defknown %more-kw-arg (t fixnum) (values t t))
-(defknown %more-arg-values (t index index) * (flushable))
+(defknown %more-arg-values (t index) * (flushable))
(defknown %verify-arg-count (index index) (values))
(defknown %arg-count-error (t) nil)
(defknown %unknown-values () *)
;;;
(define-vop (%more-arg-values)
(:args (context :scs (descriptor-reg any-reg) :target src)
- (skip :scs (any-reg zero immediate))
(num :scs (any-reg) :target count))
- (:arg-types * positive-fixnum positive-fixnum)
+ (:arg-types * positive-fixnum)
(:temporary (:sc any-reg :from (:argument 0)) src)
(:temporary (:sc any-reg :from (:argument 2)) dst end)
(:temporary (:sc descriptor-reg :from (:argument 1)) temp)
(:results (start :scs (any-reg))
(count :scs (any-reg)))
(:generator 20
- (sc-case skip
- (zero
- (move context src))
- (immediate
- (inst addi (* (tn-value skip) n-word-bytes) context src))
- (any-reg
- (inst add skip context src)))
+ (move context src)
(move num count)
(inst comb := num zero-tn done)
(move csp-tn start t)
(unless (lambda-var-ignorep rest)
;; Make up two extra variables, and squirrel them away in
;; ARG-INFO-DEFAULT for transforming (VALUES-LIST REST) into
- ;; (%MORE-ARG-VALUES CONTEXT 0 COUNT) when possible.
+ ;; (%MORE-ARG-VALUES CONTEXT COUNT) when possible.
(let* ((context-name (sb!xc:gensym "REST-CONTEXT-"))
(context (make-lambda-var :%source-name context-name
:arg-info (make-arg-info :kind :more-context)))
(eq (ir2-lvar-kind 2lvar) :fixed)))
(ir2-convert-full-call node block)))))
-(defoptimizer (%more-arg-values ir2-convert) ((context start count) node block)
+(defoptimizer (%more-arg-values ir2-convert) ((context count) node block)
(binding* ((lvar (node-lvar node) :exit-if-null)
(2lvar (lvar-info lvar)))
(ecase (ir2-lvar-kind 2lvar)
(let ((locs (ir2-lvar-locs 2lvar)))
(vop* %more-arg-values node block
((lvar-tn node block context)
- (lvar-tn node block start)
(lvar-tn node block count)
nil)
((reference-tn-list locs t))))))))
;;; as function arguments.
(define-vop (%more-arg-values)
(:args (context :scs (descriptor-reg any-reg) :target src)
- (skip :scs (any-reg zero immediate))
(num :scs (any-reg) :target count))
- (:arg-types * positive-fixnum positive-fixnum)
+ (:arg-types * positive-fixnum)
(:temporary (:sc any-reg :from (:argument 0)) src)
(:temporary (:sc any-reg :from (:argument 2)) dst)
(:temporary (:sc descriptor-reg :from (:argument 1)) temp)
(:results (start :scs (any-reg))
(count :scs (any-reg)))
(:generator 20
- (sc-case skip
- (zero
- (move src context))
- (immediate
- (inst addu src context (* (tn-value skip) n-word-bytes)))
- (any-reg
- (inst addu src context skip)))
+ (move src context)
(move count num)
(inst beq num done)
(move start csp-tn t)
;;;
(define-vop (%more-arg-values)
(:args (context :scs (descriptor-reg any-reg) :target src)
- (skip :scs (any-reg zero immediate))
(num :scs (any-reg) :target count))
- (:arg-types * positive-fixnum positive-fixnum)
+ (:arg-types * positive-fixnum)
(:temporary (:sc any-reg :from (:argument 0)) src)
(:temporary (:sc any-reg :from (:argument 2)) dst)
(:temporary (:sc descriptor-reg :from (:argument 1)) temp)
(:results (start :scs (any-reg))
(count :scs (any-reg)))
(:generator 20
- (sc-case skip
- (zero
- (inst mr src context))
- (immediate
- (inst addi src context (* (tn-value skip) n-word-bytes)))
- (any-reg
- (inst add src context skip)))
+ (inst mr src context)
(inst mr. count num)
(inst mr start csp-tn)
(inst beq done)
;;; as function arguments.
(define-vop (%more-arg-values)
(:args (context :scs (descriptor-reg any-reg) :target src)
- (skip :scs (any-reg zero immediate))
(num :scs (any-reg) :target count))
- (:arg-types * positive-fixnum positive-fixnum)
+ (:arg-types * positive-fixnum)
(:temporary (:sc any-reg :from (:argument 0)) src)
(:temporary (:sc any-reg :from (:argument 2)) dst)
(:temporary (:sc descriptor-reg :from (:argument 1)) temp)
(:results (start :scs (any-reg))
(count :scs (any-reg)))
(:generator 20
- (sc-case skip
- (zero
- (move src context))
- (immediate
- (inst add src context (* (tn-value skip) n-word-bytes)))
- (any-reg
- (inst add src context skip)))
+ (move src context)
(inst orcc count zero-tn num)
(inst b :eq done)
(inst move start csp-tn)
(deftransform %rest-values ((list context count))
(if (rest-var-more-context-ok list)
- `(%more-arg-values context 0 count)
+ `(%more-arg-values context count)
`(values-list list)))
(deftransform %rest-ref ((n list context count))
;;; defining a new stack frame.
(define-vop (%more-arg-values)
(:args (context :scs (descriptor-reg any-reg) :target src)
- (skip :scs (any-reg immediate))
(num :scs (any-reg) :target count))
- (:arg-types * positive-fixnum positive-fixnum)
- (:temporary (:sc any-reg :offset rsi-offset :from (:argument 0)) src)
- (:temporary (:sc descriptor-reg :offset rax-offset) temp)
+ (:arg-types * positive-fixnum)
+ (:temporary (:sc any-reg :from (:argument 0)) src)
+ (:temporary (:sc descriptor-reg) temp)
(:temporary (:sc unsigned-reg :offset rcx-offset) loop-index)
(:results (start :scs (any-reg))
(count :scs (any-reg)))
(:generator 20
- (sc-case skip
- (immediate
- (cond ((zerop (tn-value skip))
- (move src context)
- (move count num))
- (t
- (inst lea src (make-ea :dword :base context
- :disp (- (* (tn-value skip)
- n-word-bytes))))
- (move count num)
- (inst sub count (* (tn-value skip) n-word-bytes)))))
-
- (any-reg
- (move src context)
- #!+#.(cl:if (cl:= sb!vm:word-shift sb!vm:n-fixnum-tag-bits) '(and) '(or))
- (inst sub src skip)
- #!-#.(cl:if (cl:= sb!vm:word-shift sb!vm:n-fixnum-tag-bits) '(and) '(or))
- (progn
- ;; FIXME: This can't be efficient, but LEA (my first choice)
- ;; doesn't do subtraction.
- (inst shl skip (- word-shift n-fixnum-tag-bits))
- (inst sub src skip)
- (inst shr skip (- word-shift n-fixnum-tag-bits)))
- (move count num)
- (inst sub count skip)))
+ (move src context)
+ (move count num)
(inst lea loop-index (make-ea :byte :index count
- :scale (ash 1 (- word-shift n-fixnum-tag-bits))))
+ :scale (ash 1 (- word-shift n-fixnum-tag-bits))))
(inst mov start rsp-tn)
(inst jrcxz DONE) ; check for 0 count?
;;; defining a new stack frame.
(define-vop (%more-arg-values)
(:args (context :scs (descriptor-reg any-reg) :target src)
- (skip :scs (any-reg immediate))
(num :scs (any-reg) :target count))
- (:arg-types * positive-fixnum positive-fixnum)
+ (:arg-types * positive-fixnum)
(:temporary (:sc any-reg :offset esi-offset :from (:argument 0)) src)
(:temporary (:sc descriptor-reg :offset eax-offset) temp)
(:temporary (:sc unsigned-reg :offset ecx-offset) loop-index)
(:results (start :scs (any-reg))
(count :scs (any-reg)))
(:generator 20
- (sc-case skip
- (immediate
- (cond ((zerop (tn-value skip))
- (move src context)
- (move count num))
- (t
- (inst lea src (make-ea :dword :base context
- :disp (- (* (tn-value skip)
- n-word-bytes))))
- (move count num)
- (inst sub count (* (tn-value skip) n-word-bytes)))))
-
- (any-reg
- (move src context)
- (inst sub src skip)
- (move count num)
- (inst sub count skip)))
+ (move src context)
+ (move count num)
(move loop-index count)
(inst mov start esp-tn)
(inst mov (make-ea :dword :base esp-tn :index loop-index) temp)
(inst jmp :nz LOOP)
- DONE
- ))
+ DONE))
(values (fast-method-call-pv ,method-call))
(values (fast-method-call-next-method-call ,method-call))
,@required-args
- (sb-c::%more-arg-values ,more-context 0 ,more-count))))))
+ (sb-c::%more-arg-values ,more-context ,more-count))))))
(defstruct (fast-instance-boundp (:copier nil))
(index 0 :type fixnum))
(if applyp
`(multiple-value-call ,miss-fn ,@args
(sb-c::%more-arg-values .more-context.
- 0
.more-count.))
`(funcall ,miss-fn ,@args)))