| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 7 | 7 |
| 8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
| 9 | 9 |
| 10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 FieldAddress(V0, GrowableObjectArray::data_offset()), | 154 FieldAddress(V0, GrowableObjectArray::data_offset()), |
| 155 T1); | 155 T1); |
| 156 | 156 |
| 157 // V0: new growable array object start as a tagged pointer. | 157 // V0: new growable array object start as a tagged pointer. |
| 158 // Store the type argument field in the growable array object. | 158 // Store the type argument field in the growable array object. |
| 159 __ lw(T1, Address(SP, kTypeArgumentsOffset)); // Type argument. | 159 __ lw(T1, Address(SP, kTypeArgumentsOffset)); // Type argument. |
| 160 __ StoreIntoObjectNoBarrier( | 160 __ StoreIntoObjectNoBarrier( |
| 161 V0, | 161 V0, |
| 162 FieldAddress(V0, GrowableObjectArray::type_arguments_offset()), | 162 FieldAddress(V0, GrowableObjectArray::type_arguments_offset()), |
| 163 T1); | 163 T1); |
| 164 __ UpdateAllocationStats(kGrowableObjectArrayCid, T1); | |
| 165 // Set the length field in the growable array object to 0. | 164 // Set the length field in the growable array object to 0. |
| 166 __ Ret(); // Returns the newly allocated object in V0. | 165 __ Ret(); // Returns the newly allocated object in V0. |
| 167 __ delay_slot()->sw(ZR, | 166 __ delay_slot()->sw(ZR, |
| 168 FieldAddress(V0, GrowableObjectArray::length_offset())); | 167 FieldAddress(V0, GrowableObjectArray::length_offset())); |
| 169 | 168 |
| 170 __ Bind(&fall_through); | 169 __ Bind(&fall_through); |
| 171 } | 170 } |
| 172 | 171 |
| 173 | 172 |
| 174 void Intrinsifier::GrowableList_getLength(Assembler* assembler) { | 173 void Intrinsifier::GrowableList_getLength(Assembler* assembler) { |
| (...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1787 Isolate* isolate = Isolate::Current(); | 1786 Isolate* isolate = Isolate::Current(); |
| 1788 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); | 1787 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); |
| 1789 // Set return value. | 1788 // Set return value. |
| 1790 __ Ret(); | 1789 __ Ret(); |
| 1791 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); | 1790 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); |
| 1792 } | 1791 } |
| 1793 | 1792 |
| 1794 } // namespace dart | 1793 } // namespace dart |
| 1795 | 1794 |
| 1796 #endif // defined TARGET_ARCH_MIPS | 1795 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |