Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index 52efd5fb522fe66fa70f1a623e572fbc8fd16af7..e75e7f7081668211888e80f39a8d1462133a90ea 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -7055,10 +7055,10 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker( |
void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { |
// ----------- S t a t e ------------- |
// -- r0 : element value to store |
- // -- r1 : array literal |
- // -- r2 : map of array literal |
// -- r3 : element index as smi |
- // -- r4 : array literal index in function as smi |
+ // -- sp[0] : array literal index in function as smi |
+ // -- sp[4] : array literal |
+ // clobbers r1, r2, r4 |
// ----------------------------------- |
Label element_done; |
@@ -7067,6 +7067,11 @@ void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { |
Label slow_elements; |
Label fast_elements; |
+ // Get array literal index, array literal and its map. |
+ __ ldr(r4, MemOperand(sp, 0 * kPointerSize)); |
+ __ ldr(r1, MemOperand(sp, 1 * kPointerSize)); |
+ __ ldr(r2, FieldMemOperand(r1, JSObject::kMapOffset)); |
+ |
__ CheckFastElements(r2, r5, &double_elements); |
// FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS |
__ JumpIfSmi(r0, &smi_element); |