| Index: src/compiler/linkage.cc
|
| diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
|
| index f7eb3b8b4ceb657fe010a049911f0d423758ecfc..1ced03137ea4c735e7ce8434785da646a017c50b 100644
|
| --- a/src/compiler/linkage.cc
|
| +++ b/src/compiler/linkage.cc
|
| @@ -341,9 +341,10 @@ CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr,
|
| CallDescriptor::Flags flags) {
|
| const size_t return_count = 1;
|
| const size_t context_count = 1;
|
| + const size_t new_target_count = 1;
|
| const size_t num_args_count = 1;
|
| const size_t parameter_count =
|
| - js_parameter_count + num_args_count + context_count;
|
| + js_parameter_count + new_target_count + num_args_count + context_count;
|
|
|
| LocationSignature::Builder locations(zone, return_count, parameter_count);
|
| MachineSignature::Builder types(zone, return_count, parameter_count);
|
| @@ -359,6 +360,10 @@ CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr,
|
| types.AddParam(kMachAnyTagged);
|
| }
|
|
|
| + // Add JavaScript call new target value.
|
| + locations.AddParam(regloc(kJavaScriptCallNewTargetRegister));
|
| + types.AddParam(kMachAnyTagged);
|
| +
|
| // Add JavaScript call argument count.
|
| locations.AddParam(regloc(kJavaScriptCallArgCountRegister));
|
| types.AddParam(kMachInt32);
|
| @@ -510,8 +515,8 @@ LinkageLocation Linkage::GetOsrValueLocation(int index) const {
|
| if (index == kOsrContextSpillSlotIndex) {
|
| // Context. Use the parameter location of the context spill slot.
|
| // Parameter (arity + 2) is special for the context of the function frame.
|
| - int context_index =
|
| - 1 + 1 + 1 + parameter_count; // target + receiver + params + #args
|
| + // >> context_index = target + receiver + params + new_target + #args
|
| + int context_index = 1 + 1 + parameter_count + 1 + 1;
|
| return incoming_->GetInputLocation(context_index);
|
| } else if (index >= first_stack_slot) {
|
| // Local variable stored in this (callee) stack.
|
|
|