Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index eaa1c489fd71e35fbe1857aa111ade3d8a5bb10c..0c77d81ee2ed09876b7e978a64f7a13f6588d17b 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -210,9 +210,8 @@ |
// Copy parameters into context if necessary. |
int num_parameters = info->scope()->num_parameters(); |
- int first_parameter = info->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; |
@@ -2939,9 +2938,7 @@ |
// Push the enclosing function. |
__ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
// Push the receiver of the enclosing function. |
- Variable* this_var = scope()->LookupThis(); |
- DCHECK_NOT_NULL(this_var); |
- __ push(VarOperand(this_var, ecx)); |
+ __ push(Operand(ebp, (2 + info_->scope()->num_parameters()) * kPointerSize)); |
// Push the language mode. |
__ push(Immediate(Smi::FromInt(language_mode()))); |