Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: runtime/vm/assembler_arm.cc

Issue 1226143011: Trace allocation of arrays (Closed) Base URL: git@github.com:dart-lang/sdk.git@try_allocate_realz
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/assembler_arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698