| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 3a98fcb18b901460715975b09b93b911dc981af8..602a2d46b7a64a24571b60e2a994b66e9ca46a20 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -127,8 +127,7 @@ bool LCodeGen::GeneratePrologue() {
|
|
|
| // Sloppy mode functions need to replace the receiver with the global proxy
|
| // when called as functions (without an explicit receiver object).
|
| - if (is_sloppy(info()->language_mode()) && info()->MayUseThis() &&
|
| - !info()->is_native() && info()->scope()->has_this_declaration()) {
|
| + if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) {
|
| Label ok;
|
| StackArgumentsAccessor args(rsp, scope()->num_parameters());
|
| __ movp(rcx, args.GetReceiverOperand());
|
|
|