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..e6389ef8e4a50269dd783c71e71ae0d106baece6 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -283,28 +283,30 @@ 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)); |
+ if (!function_in_register) { |
+ __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
} |
// Receiver is just before the parameters on the caller's stack. |
+ DCHECK(edi.is(ArgumentsAccessNewDescriptor::callee())); |
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; |
} else if (literal()->has_duplicate_parameters()) { |
type = ArgumentsAccessStub::NEW_SLOPPY_SLOW; |
} else { |
+ __ push(edi); |
+ __ push(edx); |
+ __ push(ecx); |
type = ArgumentsAccessStub::NEW_SLOPPY_FAST; |
Michael Starzinger
2015/09/16 15:19:20
I am still fighting with this third kind of stub,
Michael Starzinger
2015/09/17 11:16:45
Done.
|
} |