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

Side by Side Diff: runtime/vm/assembler_mips.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 | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/assembler_x64.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_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 964
965 965
966 void Assembler::TryAllocateArray(intptr_t cid, 966 void Assembler::TryAllocateArray(intptr_t cid,
967 intptr_t instance_size, 967 intptr_t instance_size,
968 Label* failure, 968 Label* failure,
969 Register instance, 969 Register instance,
970 Register end_address, 970 Register end_address,
971 Register temp1, 971 Register temp1,
972 Register temp2) { 972 Register temp2) {
973 if (FLAG_inline_alloc) { 973 if (FLAG_inline_alloc) {
974 // If this allocation is traced, program will jump to failure path
975 // (i.e. the allocation stub) which will allocate the object and trace the
976 // allocation call site.
977 MaybeTraceAllocation(cid, temp1, failure);
974 Isolate* isolate = Isolate::Current(); 978 Isolate* isolate = Isolate::Current();
975 Heap* heap = isolate->heap(); 979 Heap* heap = isolate->heap();
976 Heap::Space space = heap->SpaceForAllocation(cid); 980 Heap::Space space = heap->SpaceForAllocation(cid);
977 LoadImmediate(temp1, heap->TopAddress(space)); 981 LoadImmediate(temp1, heap->TopAddress(space));
978 lw(instance, Address(temp1, 0)); // Potential new object start. 982 lw(instance, Address(temp1, 0)); // Potential new object start.
979 // Potential next object start. 983 // Potential next object start.
980 AddImmediate(end_address, instance, instance_size); 984 AddImmediate(end_address, instance, instance_size);
981 // Branch on unsigned overflow. 985 // Branch on unsigned overflow.
982 BranchUnsignedLess(end_address, instance, failure); 986 BranchUnsignedLess(end_address, instance, failure);
983 987
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 Label stop; 1277 Label stop;
1274 b(&stop); 1278 b(&stop);
1275 Emit(reinterpret_cast<int32_t>(message)); 1279 Emit(reinterpret_cast<int32_t>(message));
1276 Bind(&stop); 1280 Bind(&stop);
1277 break_(Instr::kStopMessageCode); 1281 break_(Instr::kStopMessageCode);
1278 } 1282 }
1279 1283
1280 } // namespace dart 1284 } // namespace dart
1281 1285
1282 #endif // defined TARGET_ARCH_MIPS 1286 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/assembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698