Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 11299200: Only fill in holes if storing the number to the double array has succeeded. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4777 matching lines...) Expand 10 before | Expand all | Expand 10 after
4788 TAG_OBJECT); 4788 TAG_OBJECT);
4789 4789
4790 // Initialize the new FixedDoubleArray. 4790 // Initialize the new FixedDoubleArray.
4791 __ LoadRoot(scratch1, Heap::kFixedDoubleArrayMapRootIndex); 4791 __ LoadRoot(scratch1, Heap::kFixedDoubleArrayMapRootIndex);
4792 __ str(scratch1, FieldMemOperand(elements_reg, JSObject::kMapOffset)); 4792 __ str(scratch1, FieldMemOperand(elements_reg, JSObject::kMapOffset));
4793 __ mov(scratch1, 4793 __ mov(scratch1,
4794 Operand(Smi::FromInt(JSArray::kPreallocatedArrayElements))); 4794 Operand(Smi::FromInt(JSArray::kPreallocatedArrayElements)));
4795 __ str(scratch1, 4795 __ str(scratch1,
4796 FieldMemOperand(elements_reg, FixedDoubleArray::kLengthOffset)); 4796 FieldMemOperand(elements_reg, FixedDoubleArray::kLengthOffset));
4797 4797
4798 __ mov(scratch1, Operand(kHoleNanLower32));
4799 __ mov(scratch2, Operand(kHoleNanUpper32));
4800 for (int i = 1; i < JSArray::kPreallocatedArrayElements; i++) {
4801 int offset = FixedDoubleArray::OffsetOfElementAt(i);
4802 __ str(scratch1, FieldMemOperand(elements_reg, offset));
4803 __ str(scratch2, FieldMemOperand(elements_reg, offset + kPointerSize));
4804 }
4805
4806 __ mov(scratch1, elements_reg); 4798 __ mov(scratch1, elements_reg);
4807 __ StoreNumberToDoubleElements(value_reg, 4799 __ StoreNumberToDoubleElements(value_reg,
4808 key_reg, 4800 key_reg,
4809 // All registers after this are overwritten. 4801 // All registers after this are overwritten.
4810 scratch1, 4802 scratch1,
4811 scratch2, 4803 scratch2,
4812 scratch3, 4804 scratch3,
4813 scratch4, 4805 scratch4,
4814 scratch5, 4806 scratch5,
4815 &transition_elements_kind); 4807 &transition_elements_kind);
4816 4808
4809 __ mov(scratch1, Operand(kHoleNanLower32));
4810 __ mov(scratch2, Operand(kHoleNanUpper32));
4811 for (int i = 1; i < JSArray::kPreallocatedArrayElements; i++) {
4812 int offset = FixedDoubleArray::OffsetOfElementAt(i);
4813 __ str(scratch1, FieldMemOperand(elements_reg, offset));
4814 __ str(scratch2, FieldMemOperand(elements_reg, offset + kPointerSize));
4815 }
4816
4817 // Install the new backing store in the JSArray. 4817 // Install the new backing store in the JSArray.
4818 __ str(elements_reg, 4818 __ str(elements_reg,
4819 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); 4819 FieldMemOperand(receiver_reg, JSObject::kElementsOffset));
4820 __ RecordWriteField(receiver_reg, JSObject::kElementsOffset, elements_reg, 4820 __ RecordWriteField(receiver_reg, JSObject::kElementsOffset, elements_reg,
4821 scratch1, kLRHasNotBeenSaved, kDontSaveFPRegs, 4821 scratch1, kLRHasNotBeenSaved, kDontSaveFPRegs,
4822 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); 4822 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
4823 4823
4824 // Increment the length of the array. 4824 // Increment the length of the array.
4825 __ mov(length_reg, Operand(Smi::FromInt(1))); 4825 __ mov(length_reg, Operand(Smi::FromInt(1)));
4826 __ str(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); 4826 __ str(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset));
(...skipping 18 matching lines...) Expand all
4845 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4845 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4846 } 4846 }
4847 } 4847 }
4848 4848
4849 4849
4850 #undef __ 4850 #undef __
4851 4851
4852 } } // namespace v8::internal 4852 } } // namespace v8::internal
4853 4853
4854 #endif // V8_TARGET_ARCH_ARM 4854 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698