Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index aa4b8a223752907f3bdbe751847db070636592c1..1e9c330df93c64a833adadfeee5dcd3c46611bb7 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -7661,11 +7661,11 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker( |
void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { |
// ----------- S t a t e ------------- |
// -- eax : element value to store |
- // -- ebx : array literal |
- // -- edi : map of array literal |
// -- ecx : element index as smi |
- // -- edx : array literal index in function |
// -- esp[0] : return address |
+ // -- esp[4] : array literal index in function |
+ // -- esp[8] : array literal |
+ // clobbers ebx, edx, edi |
// ----------------------------------- |
Label element_done; |
@@ -7675,6 +7675,11 @@ void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { |
Label slow_elements_from_double; |
Label fast_elements; |
+ // Get array literal index, array literal and its map. |
+ __ mov(edx, Operand(esp, 1 * kPointerSize)); |
+ __ mov(ebx, Operand(esp, 2 * kPointerSize)); |
+ __ mov(edi, FieldOperand(ebx, JSObject::kMapOffset)); |
+ |
__ CheckFastElements(edi, &double_elements); |
// Check for FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS elements |