Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index a75a658cf3dda94d38e00b87eed40fdd0ad85094..1b017be3e3c76a7daf3ad37d29323a9396a2331d 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -121,7 +121,7 @@ bool LCodeGen::GeneratePrologue() { |
// 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()) { |
+ !info_->is_native()) { |
Label ok; |
int receiver_offset = info_->scope()->num_parameters() * kPointerSize; |
__ ldr(r2, MemOperand(sp, receiver_offset)); |
@@ -197,9 +197,8 @@ bool LCodeGen::GeneratePrologue() { |
__ str(r0, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
// 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; |