OLD | NEW |
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 // -- a2 : receiver | 173 // -- a2 : receiver |
174 // -- ra : return address | 174 // -- ra : return address |
175 // -- a3 : target map, scratch for subsequent call | 175 // -- a3 : target map, scratch for subsequent call |
176 // -- t0 : scratch (elements) | 176 // -- t0 : scratch (elements) |
177 // ----------------------------------- | 177 // ----------------------------------- |
178 Label loop, entry, convert_hole, gc_required, only_change_map, done; | 178 Label loop, entry, convert_hole, gc_required, only_change_map, done; |
179 bool fpu_supported = CpuFeatures::IsSupported(FPU); | 179 bool fpu_supported = CpuFeatures::IsSupported(FPU); |
180 | 180 |
181 Register scratch = t6; | 181 Register scratch = t6; |
182 | 182 |
| 183 if (FLAG_track_allocation_sites) { |
| 184 masm->TestJSArrayForAllocationSiteInfo(a2, t0, fail); |
| 185 } |
| 186 |
183 // Check for empty arrays, which only require a map transition and no changes | 187 // Check for empty arrays, which only require a map transition and no changes |
184 // to the backing store. | 188 // to the backing store. |
185 __ lw(t0, FieldMemOperand(a2, JSObject::kElementsOffset)); | 189 __ lw(t0, FieldMemOperand(a2, JSObject::kElementsOffset)); |
186 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); | 190 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); |
187 __ Branch(&only_change_map, eq, at, Operand(t0)); | 191 __ Branch(&only_change_map, eq, at, Operand(t0)); |
188 | 192 |
189 __ push(ra); | 193 __ push(ra); |
190 __ lw(t1, FieldMemOperand(t0, FixedArray::kLengthOffset)); | 194 __ lw(t1, FieldMemOperand(t0, FixedArray::kLengthOffset)); |
191 // t0: source FixedArray | 195 // t0: source FixedArray |
192 // t1: number of elements (smi-tagged) | 196 // t1: number of elements (smi-tagged) |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); | 708 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); |
705 } | 709 } |
706 } | 710 } |
707 | 711 |
708 | 712 |
709 #undef __ | 713 #undef __ |
710 | 714 |
711 } } // namespace v8::internal | 715 } } // namespace v8::internal |
712 | 716 |
713 #endif // V8_TARGET_ARCH_MIPS | 717 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |