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" // NOLINT | 5 #include "vm/globals.h" // NOLINT |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/longjump.h" | 10 #include "vm/longjump.h" |
(...skipping 3459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3470 | 3470 |
3471 | 3471 |
3472 void Assembler::TryAllocateArray(intptr_t cid, | 3472 void Assembler::TryAllocateArray(intptr_t cid, |
3473 intptr_t instance_size, | 3473 intptr_t instance_size, |
3474 Label* failure, | 3474 Label* failure, |
3475 Register instance, | 3475 Register instance, |
3476 Register end_address, | 3476 Register end_address, |
3477 Register temp1, | 3477 Register temp1, |
3478 Register temp2) { | 3478 Register temp2) { |
3479 if (FLAG_inline_alloc) { | 3479 if (FLAG_inline_alloc) { |
| 3480 // If this allocation is traced, program will jump to failure path |
| 3481 // (i.e. the allocation stub) which will allocate the object and trace the |
| 3482 // allocation call site. |
| 3483 MaybeTraceAllocation(cid, temp1, failure); |
3480 Isolate* isolate = Isolate::Current(); | 3484 Isolate* isolate = Isolate::Current(); |
3481 Heap* heap = isolate->heap(); | 3485 Heap* heap = isolate->heap(); |
3482 Heap::Space space = heap->SpaceForAllocation(cid); | 3486 Heap::Space space = heap->SpaceForAllocation(cid); |
3483 LoadImmediate(temp1, heap->TopAddress(space)); | 3487 LoadImmediate(temp1, heap->TopAddress(space)); |
3484 ldr(instance, Address(temp1, 0)); // Potential new object start. | 3488 ldr(instance, Address(temp1, 0)); // Potential new object start. |
3485 AddImmediateSetFlags(end_address, instance, instance_size); | 3489 AddImmediateSetFlags(end_address, instance, instance_size); |
3486 b(failure, CS); // Branch if unsigned overflow. | 3490 b(failure, CS); // Branch if unsigned overflow. |
3487 | 3491 |
3488 // Check if the allocation fits into the remaining space. | 3492 // Check if the allocation fits into the remaining space. |
3489 // instance: potential new object start. | 3493 // instance: potential new object start. |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3624 | 3628 |
3625 | 3629 |
3626 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3630 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3627 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 3631 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
3628 return fpu_reg_names[reg]; | 3632 return fpu_reg_names[reg]; |
3629 } | 3633 } |
3630 | 3634 |
3631 } // namespace dart | 3635 } // namespace dart |
3632 | 3636 |
3633 #endif // defined TARGET_ARCH_ARM | 3637 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |