Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index 9729f59cc9977b924a6e772bf497ac3438126484..743042dacb19beece1827644a6a6f1fdf5133040 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -283,22 +283,21 @@ void FullCodeGenerator::Generate() { |
if (arguments != NULL) { |
// Function uses arguments object. |
Comment cmnt(masm_, "[ Allocate arguments object"); |
- if (function_in_register) { |
- __ push(edi); |
- } else { |
- __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
+ DCHECK(edi.is(ArgumentsAccessNewDescriptor::function())); |
+ if (!function_in_register) { |
+ __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
} |
// Receiver is just before the parameters on the caller's stack. |
int num_parameters = info->scope()->num_parameters(); |
int offset = num_parameters * kPointerSize; |
- __ lea(edx, |
+ __ mov(ArgumentsAccessNewDescriptor::parameter_count(), |
+ Immediate(Smi::FromInt(num_parameters))); |
+ __ lea(ArgumentsAccessNewDescriptor::parameter_pointer(), |
Operand(ebp, StandardFrameConstants::kCallerSPOffset + offset)); |
- __ push(edx); |
- __ push(Immediate(Smi::FromInt(num_parameters))); |
// Arguments to ArgumentsAccessStub: |
- // function, receiver address, parameter count. |
- // The stub will rewrite receiver and parameter count if the previous |
- // stack frame was an arguments adapter frame. |
+ // function, parameter pointer, parameter count. |
+ // The stub will rewrite parameter pointer and parameter count if the |
+ // previous stack frame was an arguments adapter frame. |
ArgumentsAccessStub::Type type; |
if (is_strict(language_mode()) || !has_simple_parameters()) { |
type = ArgumentsAccessStub::NEW_STRICT; |