| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index 9a7d41ada25f2117859ca644b12d9a5dcc95c946..36238fa126ce867d38ad35dab0ea8ca91a8a7b4e 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -199,10 +199,17 @@ void FullCodeGenerator::Generate(CompilationInfo* info) {
|
| // stack frame was an arguments adapter frame.
|
| ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT);
|
| __ CallStub(&stub);
|
| - __ mov(ecx, eax); // Duplicate result.
|
| - Move(arguments->AsSlot(), eax, ebx, edx);
|
| - Slot* dot_arguments_slot = scope()->arguments_shadow()->AsSlot();
|
| - Move(dot_arguments_slot, ecx, ebx, edx);
|
| +
|
| + Variable* arguments_shadow = scope()->arguments_shadow();
|
| + if (arguments_shadow != NULL) {
|
| + __ mov(ecx, eax); // Duplicate result.
|
| + Move(arguments->AsSlot(), eax, ebx, edx);
|
| + Move(arguments_shadow->AsSlot(), ecx, ebx, edx);
|
| + } else {
|
| + // arguments are allocated without shadow only in strict mode.
|
| + ASSERT(scope()->is_strict_mode());
|
| + Move(arguments->AsSlot(), eax, ebx, edx);
|
| + }
|
| }
|
|
|
| if (FLAG_trace) {
|
|
|