| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // Store the type argument field in the growable array object. | 160 // Store the type argument field in the growable array object. |
| 161 __ ldr(R1, Address(SP, kTypeArgumentsOffset)); // Type argument. | 161 __ ldr(R1, Address(SP, kTypeArgumentsOffset)); // Type argument. |
| 162 __ StoreIntoObjectNoBarrier( | 162 __ StoreIntoObjectNoBarrier( |
| 163 R0, | 163 R0, |
| 164 FieldAddress(R0, GrowableObjectArray::type_arguments_offset()), | 164 FieldAddress(R0, GrowableObjectArray::type_arguments_offset()), |
| 165 R1); | 165 R1); |
| 166 | 166 |
| 167 // Set the length field in the growable array object to 0. | 167 // Set the length field in the growable array object to 0. |
| 168 __ LoadImmediate(R1, 0); | 168 __ LoadImmediate(R1, 0); |
| 169 __ str(R1, FieldAddress(R0, GrowableObjectArray::length_offset())); | 169 __ str(R1, FieldAddress(R0, GrowableObjectArray::length_offset())); |
| 170 __ UpdateAllocationStats(kGrowableObjectArrayCid, R1); | |
| 171 __ Ret(); // Returns the newly allocated object in R0. | 170 __ Ret(); // Returns the newly allocated object in R0. |
| 172 | 171 |
| 173 __ Bind(&fall_through); | 172 __ Bind(&fall_through); |
| 174 } | 173 } |
| 175 | 174 |
| 176 | 175 |
| 177 void Intrinsifier::GrowableList_getLength(Assembler* assembler) { | 176 void Intrinsifier::GrowableList_getLength(Assembler* assembler) { |
| 178 __ ldr(R0, Address(SP, 0 * kWordSize)); | 177 __ ldr(R0, Address(SP, 0 * kWordSize)); |
| 179 __ ldr(R0, FieldAddress(R0, GrowableObjectArray::length_offset())); | 178 __ ldr(R0, FieldAddress(R0, GrowableObjectArray::length_offset())); |
| 180 __ Ret(); | 179 __ Ret(); |
| (...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1750 Isolate* isolate = Isolate::Current(); | 1749 Isolate* isolate = Isolate::Current(); |
| 1751 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); | 1750 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); |
| 1752 // Set return value to Isolate::current_tag_. | 1751 // Set return value to Isolate::current_tag_. |
| 1753 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); | 1752 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); |
| 1754 __ Ret(); | 1753 __ Ret(); |
| 1755 } | 1754 } |
| 1756 | 1755 |
| 1757 } // namespace dart | 1756 } // namespace dart |
| 1758 | 1757 |
| 1759 #endif // defined TARGET_ARCH_ARM | 1758 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |