| 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_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2808 | 2808 |
| 2809 | 2809 |
| 2810 void Assembler::TryAllocateArray(intptr_t cid, | 2810 void Assembler::TryAllocateArray(intptr_t cid, |
| 2811 intptr_t instance_size, | 2811 intptr_t instance_size, |
| 2812 Label* failure, | 2812 Label* failure, |
| 2813 bool near_jump, | 2813 bool near_jump, |
| 2814 Register instance, | 2814 Register instance, |
| 2815 Register end_address) { | 2815 Register end_address) { |
| 2816 ASSERT(failure != NULL); | 2816 ASSERT(failure != NULL); |
| 2817 if (FLAG_inline_alloc) { | 2817 if (FLAG_inline_alloc) { |
| 2818 // If this allocation is traced, program will jump to failure path |
| 2819 // (i.e. the allocation stub) which will allocate the object and trace the |
| 2820 // allocation call site. |
| 2821 MaybeTraceAllocation(cid, kNoRegister, failure, near_jump); |
| 2818 Isolate* isolate = Isolate::Current(); | 2822 Isolate* isolate = Isolate::Current(); |
| 2819 Heap* heap = isolate->heap(); | 2823 Heap* heap = isolate->heap(); |
| 2820 Heap::Space space = heap->SpaceForAllocation(cid); | 2824 Heap::Space space = heap->SpaceForAllocation(cid); |
| 2821 movl(instance, Address::Absolute(heap->TopAddress(space))); | 2825 movl(instance, Address::Absolute(heap->TopAddress(space))); |
| 2822 movl(end_address, instance); | 2826 movl(end_address, instance); |
| 2823 | 2827 |
| 2824 addl(end_address, Immediate(instance_size)); | 2828 addl(end_address, Immediate(instance_size)); |
| 2825 j(CARRY, failure); | 2829 j(CARRY, failure); |
| 2826 | 2830 |
| 2827 // Check if the allocation fits into the remaining space. | 2831 // Check if the allocation fits into the remaining space. |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3193 | 3197 |
| 3194 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3198 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 3195 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 3199 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
| 3196 return xmm_reg_names[reg]; | 3200 return xmm_reg_names[reg]; |
| 3197 } | 3201 } |
| 3198 | 3202 |
| 3199 | 3203 |
| 3200 } // namespace dart | 3204 } // namespace dart |
| 3201 | 3205 |
| 3202 #endif // defined TARGET_ARCH_IA32 | 3206 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |