| Index: src/full-codegen/mips64/full-codegen-mips64.cc
|
| diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc
|
| index 73959e39b63f4397559e1b70611f93fa818df50a..a51e873709484771837eb3d707e176b2e4ec1f70 100644
|
| --- a/src/full-codegen/mips64/full-codegen-mips64.cc
|
| +++ b/src/full-codegen/mips64/full-codegen-mips64.cc
|
| @@ -2115,7 +2115,9 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| __ sd(a1, MemOperand(sp, 2 * kPointerSize));
|
| SetCallPosition(expr, 1);
|
| __ li(a0, Operand(1));
|
| - __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
|
| + __ Call(
|
| + isolate()->builtins()->Call(ConvertReceiverMode::kNotNullOrUndefined),
|
| + RelocInfo::CODE_TARGET);
|
|
|
| __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| __ Drop(1); // The function is still on the stack; drop it.
|
| @@ -2808,6 +2810,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
|
| Expression* callee = expr->expression();
|
|
|
| // Get the target function.
|
| + ConvertReceiverMode convert_mode;
|
| if (callee->IsVariableProxy()) {
|
| { StackValueContext context(this);
|
| EmitVariableLoad(callee->AsVariableProxy());
|
| @@ -2817,6 +2820,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
|
| // is a sloppy mode method.
|
| __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
|
| __ push(at);
|
| + convert_mode = ConvertReceiverMode::kNullOrUndefined;
|
| } else {
|
| // Load the function from the receiver.
|
| DCHECK(callee->IsProperty());
|
| @@ -2828,9 +2832,10 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
|
| __ ld(at, MemOperand(sp, 0));
|
| __ push(at);
|
| __ sd(v0, MemOperand(sp, kPointerSize));
|
| + convert_mode = ConvertReceiverMode::kNotNullOrUndefined;
|
| }
|
|
|
| - EmitCall(expr);
|
| + EmitCall(expr, convert_mode);
|
| }
|
|
|
|
|
| @@ -2892,7 +2897,7 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
|
| __ push(at);
|
| __ sd(v0, MemOperand(sp, kPointerSize));
|
|
|
| - EmitCall(expr);
|
| + EmitCall(expr, ConvertReceiverMode::kNotNullOrUndefined);
|
| }
|
|
|
|
|
| @@ -2932,7 +2937,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
|
| }
|
|
|
|
|
| -void FullCodeGenerator::EmitCall(Call* expr) {
|
| +void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
|
| // Load the arguments.
|
| ZoneList<Expression*>* args = expr->arguments();
|
| int arg_count = args->length();
|
| @@ -2943,7 +2948,7 @@ void FullCodeGenerator::EmitCall(Call* expr) {
|
| PrepareForBailoutForId(expr->CallId(), NO_REGISTERS);
|
| // Record source position of the IC call.
|
| SetCallPosition(expr, arg_count);
|
| - Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count).code();
|
| + Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code();
|
| __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
|
| __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
|
| // Don't assign a type feedback id to the IC, since type feedback is provided
|
| @@ -4249,7 +4254,8 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
|
| SetCallPosition(expr, arg_count);
|
| __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
|
| __ li(a0, Operand(arg_count));
|
| - __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
|
| + __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined),
|
| + RelocInfo::CODE_TARGET);
|
| }
|
|
|
|
|
|
|