Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index ec5992a20afcc3e3d685e21ffc1ebb682f30c929..1a4e591f0635e1e3df977a3c3cafab5cf1d653f5 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -129,8 +129,8 @@ 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 (is_sloppy(info_->language_mode()) && info()->MayUseThis() && |
+ !info_->is_native()) { |
Label ok; |
StackArgumentsAccessor args(rsp, scope()->num_parameters()); |
__ movp(rcx, args.GetReceiverOperand()); |
@@ -213,9 +213,8 @@ bool LCodeGen::GeneratePrologue() { |
// Copy any necessary parameters into the context. |
int num_parameters = scope()->num_parameters(); |
- int first_parameter = scope()->has_this_declaration() ? -1 : 0; |
- for (int i = first_parameter; i < num_parameters; i++) { |
- Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i); |
+ for (int i = 0; i < num_parameters; i++) { |
+ Variable* var = scope()->parameter(i); |
if (var->IsContextSlot()) { |
int parameter_offset = StandardFrameConstants::kCallerSPOffset + |
(num_parameters - 1 - i) * kPointerSize; |