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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 const int32_t raw_null = reinterpret_cast<int32_t>(Object::null()); | 182 const int32_t raw_null = reinterpret_cast<int32_t>(Object::null()); |
183 __ LoadImmediate(R0, raw_null); | 183 __ LoadImmediate(R0, raw_null); |
184 __ Ret(); | 184 __ Ret(); |
185 __ Bind(&fall_through); | 185 __ Bind(&fall_through); |
186 } | 186 } |
187 | 187 |
188 | 188 |
189 #define TYPED_ARRAY_ALLOCATION(type_name, cid, max_len, scale_shift) \ | 189 #define TYPED_ARRAY_ALLOCATION(type_name, cid, max_len, scale_shift) \ |
190 Label fall_through; \ | 190 Label fall_through; \ |
191 const intptr_t kArrayLengthStackOffset = 0 * kWordSize; \ | 191 const intptr_t kArrayLengthStackOffset = 0 * kWordSize; \ |
| 192 __ MaybeTraceAllocation(cid, R2, &fall_through); \ |
192 __ ldr(R2, Address(SP, kArrayLengthStackOffset)); /* Array length. */ \ | 193 __ ldr(R2, Address(SP, kArrayLengthStackOffset)); /* Array length. */ \ |
193 /* Check that length is a positive Smi. */ \ | 194 /* Check that length is a positive Smi. */ \ |
194 /* R2: requested array length argument. */ \ | 195 /* R2: requested array length argument. */ \ |
195 __ tst(R2, Operand(kSmiTagMask)); \ | 196 __ tst(R2, Operand(kSmiTagMask)); \ |
196 __ b(&fall_through, NE); \ | 197 __ b(&fall_through, NE); \ |
197 __ CompareImmediate(R2, 0); \ | 198 __ CompareImmediate(R2, 0); \ |
198 __ b(&fall_through, LT); \ | 199 __ b(&fall_through, LT); \ |
199 __ SmiUntag(R2); \ | 200 __ SmiUntag(R2); \ |
200 /* Check for maximum allowed length. */ \ | 201 /* Check for maximum allowed length. */ \ |
201 /* R2: untagged array length. */ \ | 202 /* R2: untagged array length. */ \ |
(...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2060 Isolate* isolate = Isolate::Current(); | 2061 Isolate* isolate = Isolate::Current(); |
2061 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); | 2062 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); |
2062 // Set return value to Isolate::current_tag_. | 2063 // Set return value to Isolate::current_tag_. |
2063 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); | 2064 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); |
2064 __ Ret(); | 2065 __ Ret(); |
2065 } | 2066 } |
2066 | 2067 |
2067 } // namespace dart | 2068 } // namespace dart |
2068 | 2069 |
2069 #endif // defined TARGET_ARCH_ARM | 2070 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |