Commit a74d30f0 authored by verwaest@chromium.org's avatar verwaest@chromium.org

MIPS: Only fill in holes if storing the number to the double array has succeeded.

Port r13067 (c822cffa)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/11428068
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d84ebd39
......@@ -4852,14 +4852,6 @@ void KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(
__ sw(scratch1,
FieldMemOperand(elements_reg, FixedDoubleArray::kLengthOffset));
__ li(scratch1, Operand(kHoleNanLower32));
__ li(scratch2, Operand(kHoleNanUpper32));
for (int i = 1; i < JSArray::kPreallocatedArrayElements; i++) {
int offset = FixedDoubleArray::OffsetOfElementAt(i);
__ sw(scratch1, FieldMemOperand(elements_reg, offset));
__ sw(scratch2, FieldMemOperand(elements_reg, offset + kPointerSize));
}
__ mov(scratch1, elements_reg);
__ StoreNumberToDoubleElements(value_reg,
key_reg,
......@@ -4871,6 +4863,14 @@ void KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(
scratch5,
&transition_elements_kind);
__ li(scratch1, Operand(kHoleNanLower32));
__ li(scratch2, Operand(kHoleNanUpper32));
for (int i = 1; i < JSArray::kPreallocatedArrayElements; i++) {
int offset = FixedDoubleArray::OffsetOfElementAt(i);
__ sw(scratch1, FieldMemOperand(elements_reg, offset));
__ sw(scratch2, FieldMemOperand(elements_reg, offset + kPointerSize));
}
// Install the new backing store in the JSArray.
__ sw(elements_reg,
FieldMemOperand(receiver_reg, JSObject::kElementsOffset));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment