Chromium Code Reviews| Index: src/arm/full-codegen-arm.cc |
| diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
| index 5f5de3a9f93fbf71c214ac517c6d69bd1b753535..80b275cdb0b7103582598d56e2111470f6849628 100644 |
| --- a/src/arm/full-codegen-arm.cc |
| +++ b/src/arm/full-codegen-arm.cc |
| @@ -212,11 +212,18 @@ void FullCodeGenerator::Generate(CompilationInfo* info) { |
| // stack frame was an arguments adapter frame. |
| ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); |
| __ CallStub(&stub); |
| - // Duplicate the value; move-to-slot operation might clobber registers. |
| - __ mov(r3, r0); |
| - Move(arguments->AsSlot(), r0, r1, r2); |
| - Slot* dot_arguments_slot = scope()->arguments_shadow()->AsSlot(); |
| - Move(dot_arguments_slot, r3, r1, r2); |
| + |
| + Variable* arguments_shadow = scope()->arguments_shadow(); |
| + if (arguments_shadow != NULL) { |
|
Kevin Millikin (Chromium)
2011/03/07 11:46:48
A bit simpler (also on the other platforms):
if (
Martin Maly
2011/03/07 19:09:40
Done.
|
| + // Duplicate the value; move-to-slot operation might clobber registers. |
| + __ mov(r3, r0); |
| + Move(arguments->AsSlot(), r0, r1, r2); |
| + Move(arguments_shadow->AsSlot(), r3, r1, r2); |
| + } else { |
| + // arguments are allocated without shadow only in strict mode. |
| + ASSERT(scope()->is_strict_mode()); |
| + Move(arguments->AsSlot(), r0, r1, r2); |
| + } |
| } |
| if (FLAG_trace) { |