} else {
__ bind(&return_label_);
__ LeaveFrame(StackFrame::MANUAL);
- int pop_count = descriptor->IsJSFunctionCall()
- ? static_cast<int>(descriptor->JSParameterCount())
- : (info()->IsStub()
- ? info()->code_stub()->GetStackParameterCount()
- : 0);
+ int pop_count = static_cast<int>(descriptor->StackParameterCount());
if (pop_count != 0) {
__ Drop(pop_count);
}
__ Bind(&return_label_);
__ Mov(jssp, fp);
__ Pop(fp, lr);
- int pop_count = descriptor->IsJSFunctionCall()
- ? static_cast<int>(descriptor->JSParameterCount())
- : (info()->IsStub()
- ? info()->code_stub()->GetStackParameterCount()
- : 0);
+ int pop_count = static_cast<int>(descriptor->StackParameterCount());
if (pop_count != 0) {
__ Drop(pop_count);
}
target_loc, // target location
msig, // machine_sig
locations.Build(), // location_sig
- 0, // js_parameter_count
+ 0, // stack_parameter_count
Operator::kNoProperties, // properties
kCalleeSaveRegisters, // callee-saved registers
kCalleeSaveFPRegisters, // callee-saved fp regs
__ bind(&return_label_);
__ mov(esp, ebp); // Move stack pointer back to frame pointer.
__ pop(ebp); // Pop caller's frame pointer.
- int pop_count = descriptor->IsJSFunctionCall()
- ? static_cast<int>(descriptor->JSParameterCount())
- : (info()->IsStub()
- ? info()->code_stub()->GetStackParameterCount()
- : 0);
+ int pop_count = static_cast<int>(descriptor->StackParameterCount());
if (pop_count == 0) {
__ ret(0);
} else {
target_loc, // target location
types.Build(), // machine_sig
locations.Build(), // location_sig
- js_parameter_count, // js_parameter_count
+ js_parameter_count, // stack_parameter_count
Operator::kNoProperties, // properties
kNoCalleeSaved, // callee-saved
kNoCalleeSaved, // callee-saved fp
target_loc, // target location
types.Build(), // machine_sig
locations.Build(), // location_sig
- js_parameter_count, // js_parameter_count
+ js_parameter_count, // stack_parameter_count
properties, // properties
kNoCalleeSaved, // callee-saved
kNoCalleeSaved, // callee-saved fp
target_loc, // target location
types.Build(), // machine_sig
locations.Build(), // location_sig
- js_parameter_count, // js_parameter_count
+ stack_parameter_count, // stack_parameter_count
properties, // properties
kNoCalleeSaved, // callee-saved registers
kNoCalleeSaved, // callee-saved fp
target_loc, // target location
types.Build(), // machine_sig
locations.Build(), // location_sig
- 0, // js_parameter_count
+ 0, // stack_parameter_count
Operator::kNoProperties, // properties
kNoCalleeSaved, // callee-saved registers
kNoCalleeSaved, // callee-saved fp regs
CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc,
const MachineSignature* machine_sig,
- LocationSignature* location_sig, size_t js_param_count,
+ LocationSignature* location_sig, size_t stack_param_count,
Operator::Properties properties,
RegList callee_saved_registers,
RegList callee_saved_fp_registers, Flags flags,
target_loc_(target_loc),
machine_sig_(machine_sig),
location_sig_(location_sig),
- js_param_count_(js_param_count),
+ stack_param_count_(stack_param_count),
properties_(properties),
callee_saved_registers_(callee_saved_registers),
callee_saved_fp_registers_(callee_saved_fp_registers),
// The number of C parameters to this call.
size_t CParameterCount() const { return machine_sig_->parameter_count(); }
- // The number of JavaScript parameters to this call, including the receiver
- // object.
- size_t JSParameterCount() const { return js_param_count_; }
+ // The number of stack parameters to the call.
+ size_t StackParameterCount() const { return stack_param_count_; }
+
+ // The number of parameters to the JS function call.
+ size_t JSParameterCount() const {
+ DCHECK(IsJSFunctionCall());
+ return stack_param_count_;
+ }
// The total number of inputs to this call, which includes the target,
// receiver, context, etc.
const LinkageLocation target_loc_;
const MachineSignature* const machine_sig_;
const LocationSignature* const location_sig_;
- const size_t js_param_count_;
+ const size_t stack_param_count_;
const Operator::Properties properties_;
const RegList callee_saved_registers_;
const RegList callee_saved_fp_registers_;
__ bind(&return_label_);
__ mov(sp, fp);
__ Pop(ra, fp);
- int pop_count = descriptor->IsJSFunctionCall()
- ? static_cast<int>(descriptor->JSParameterCount())
- : (info()->IsStub()
- ? info()->code_stub()->GetStackParameterCount()
- : 0);
+ int pop_count = static_cast<int>(descriptor->StackParameterCount());
if (pop_count != 0) {
__ DropAndRet(pop_count);
} else {
__ bind(&return_label_);
__ mov(sp, fp);
__ Pop(ra, fp);
- int pop_count = descriptor->IsJSFunctionCall()
- ? static_cast<int>(descriptor->JSParameterCount())
- : (info()->IsStub()
- ? info()->code_stub()->GetStackParameterCount()
- : 0);
+ int pop_count = static_cast<int>(descriptor->StackParameterCount());
if (pop_count != 0) {
__ DropAndRet(pop_count);
} else {
__ b(&return_label_);
} else {
__ bind(&return_label_);
- int pop_count = descriptor->IsJSFunctionCall()
- ? static_cast<int>(descriptor->JSParameterCount())
- : (info()->IsStub()
- ? info()->code_stub()->GetStackParameterCount()
- : 0);
+ int pop_count = static_cast<int>(descriptor->StackParameterCount());
__ LeaveFrame(StackFrame::MANUAL, pop_count * kPointerSize);
__ Ret();
}
__ bind(&return_label_);
__ movq(rsp, rbp); // Move stack pointer back to frame pointer.
__ popq(rbp); // Pop caller's frame pointer.
- int pop_count = descriptor->IsJSFunctionCall()
- ? static_cast<int>(descriptor->JSParameterCount())
- : (info()->IsStub()
- ? info()->code_stub()->GetStackParameterCount()
- : 0);
+ int pop_count = static_cast<int>(descriptor->StackParameterCount());
if (pop_count == 0) {
__ Ret();
} else {
__ bind(&return_label_);
__ mov(esp, ebp); // Move stack pointer back to frame pointer.
__ pop(ebp); // Pop caller's frame pointer.
- int pop_count = descriptor->IsJSFunctionCall()
- ? static_cast<int>(descriptor->JSParameterCount())
- : (info()->IsStub()
- ? info()->code_stub()->GetStackParameterCount()
- : 0);
+ int pop_count = static_cast<int>(descriptor->StackParameterCount());
if (pop_count == 0) {
__ ret(0);
} else {
CompilationInfo info(&stub, isolate, &zone);
CallDescriptor* descriptor = Linkage::ComputeIncoming(&zone, &info);
CHECK(descriptor);
- CHECK_EQ(1, static_cast<int>(descriptor->JSParameterCount()));
+ CHECK_EQ(0, static_cast<int>(descriptor->StackParameterCount()));
CHECK_EQ(1, static_cast<int>(descriptor->ReturnCount()));
CHECK_EQ(Operator::kNoProperties, descriptor->properties());
CHECK_EQ(false, descriptor->IsJSFunctionCall());