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

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

Issue 1210283003: Extend allocation profile testing (Closed) Base URL: git@github.com:dart-lang/sdk.git@profile_model_public
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/stub_code_ia32.cc ('k') | runtime/vm/stub_code_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" 5 #include "vm/globals.h"
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/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 // kInlineInstanceSize is a constant used as a threshold for determining 1171 // kInlineInstanceSize is a constant used as a threshold for determining
1172 // when the object initialization should be done as a loop or as 1172 // when the object initialization should be done as a loop or as
1173 // straight line code. 1173 // straight line code.
1174 const int kInlineInstanceSize = 12; 1174 const int kInlineInstanceSize = 12;
1175 const intptr_t instance_size = cls.instance_size(); 1175 const intptr_t instance_size = cls.instance_size();
1176 ASSERT(instance_size > 0); 1176 ASSERT(instance_size > 0);
1177 if (is_cls_parameterized) { 1177 if (is_cls_parameterized) {
1178 __ lw(T1, Address(SP, 0 * kWordSize)); 1178 __ lw(T1, Address(SP, 0 * kWordSize));
1179 // T1: type arguments. 1179 // T1: type arguments.
1180 } 1180 }
1181 if (FLAG_inline_alloc && Heap::IsAllocatableInNewSpace(instance_size)) { 1181 if (FLAG_inline_alloc && Heap::IsAllocatableInNewSpace(instance_size) &&
1182 !cls.trace_allocation()) {
1182 Label slow_case; 1183 Label slow_case;
1183 // Allocate the object and update top to point to 1184 // Allocate the object and update top to point to
1184 // next object start and initialize the allocated object. 1185 // next object start and initialize the allocated object.
1185 // T1: instantiated type arguments (if is_cls_parameterized). 1186 // T1: instantiated type arguments (if is_cls_parameterized).
1186 Heap* heap = Isolate::Current()->heap(); 1187 Heap* heap = Isolate::Current()->heap();
1187 Heap::Space space = heap->SpaceForAllocation(cls.id()); 1188 Heap::Space space = heap->SpaceForAllocation(cls.id());
1188 __ LoadImmediate(T5, heap->TopAddress(space)); 1189 __ LoadImmediate(T5, heap->TopAddress(space));
1189 __ lw(T2, Address(T5)); 1190 __ lw(T2, Address(T5));
1190 __ LoadImmediate(T4, instance_size); 1191 __ LoadImmediate(T4, instance_size);
1191 __ addu(T3, T2, T4); 1192 __ addu(T3, T2, T4);
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
2312 // Result: 2313 // Result:
2313 // T1: entry point. 2314 // T1: entry point.
2314 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { 2315 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) {
2315 EmitMegamorphicLookup(assembler, T0, T1, T1); 2316 EmitMegamorphicLookup(assembler, T0, T1, T1);
2316 __ Ret(); 2317 __ Ret();
2317 } 2318 }
2318 2319
2319 } // namespace dart 2320 } // namespace dart
2320 2321
2321 #endif // defined TARGET_ARCH_MIPS 2322 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698