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

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

Issue 1339363002: Reapply "Move megamorphic cache table into the Dart heap." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
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" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 __ Drop(argument_count); 1277 __ Drop(argument_count);
1278 } 1278 }
1279 1279
1280 1280
1281 void FlowGraphCompiler::EmitMegamorphicInstanceCall( 1281 void FlowGraphCompiler::EmitMegamorphicInstanceCall(
1282 const ICData& ic_data, 1282 const ICData& ic_data,
1283 intptr_t argument_count, 1283 intptr_t argument_count,
1284 intptr_t deopt_id, 1284 intptr_t deopt_id,
1285 intptr_t token_pos, 1285 intptr_t token_pos,
1286 LocationSummary* locs) { 1286 LocationSummary* locs) {
1287 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table();
1288 const String& name = String::Handle(zone(), ic_data.target_name()); 1287 const String& name = String::Handle(zone(), ic_data.target_name());
1289 const Array& arguments_descriptor = 1288 const Array& arguments_descriptor =
1290 Array::ZoneHandle(zone(), ic_data.arguments_descriptor()); 1289 Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
1291 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); 1290 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
1292 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle( 1291 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(),
1293 zone(), table->Lookup(name, arguments_descriptor)); 1292 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor));
1294 const Register receiverR = R0; 1293 const Register receiverR = R0;
1295 const Register cacheR = R1; 1294 const Register cacheR = R1;
1296 const Register targetR = R1; 1295 const Register targetR = R1;
1297 __ LoadFromOffset(kWord, receiverR, SP, (argument_count - 1) * kWordSize); 1296 __ LoadFromOffset(kWord, receiverR, SP, (argument_count - 1) * kWordSize);
1298 __ LoadObject(cacheR, cache); 1297 __ LoadObject(cacheR, cache);
1299 1298
1300 if (FLAG_use_megamorphic_stub) { 1299 if (FLAG_use_megamorphic_stub) {
1301 __ BranchLink(*StubCode::MegamorphicLookup_entry()); 1300 __ BranchLink(*StubCode::MegamorphicLookup_entry());
1302 } else { 1301 } else {
1303 StubCode::EmitMegamorphicLookup(assembler(), receiverR, cacheR, targetR); 1302 StubCode::EmitMegamorphicLookup(assembler(), receiverR, cacheR, targetR);
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 DRegister dreg = EvenDRegisterOf(reg); 1895 DRegister dreg = EvenDRegisterOf(reg);
1897 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1896 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1898 } 1897 }
1899 1898
1900 1899
1901 #undef __ 1900 #undef __
1902 1901
1903 } // namespace dart 1902 } // namespace dart
1904 1903
1905 #endif // defined TARGET_ARCH_ARM 1904 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698