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

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

Issue 1346473002: Move megamorphic cache table into the Dart heap. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: non-x64 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 __ Drop(argument_count); 1250 __ Drop(argument_count);
1251 } 1251 }
1252 1252
1253 1253
1254 void FlowGraphCompiler::EmitMegamorphicInstanceCall( 1254 void FlowGraphCompiler::EmitMegamorphicInstanceCall(
1255 const ICData& ic_data, 1255 const ICData& ic_data,
1256 intptr_t argument_count, 1256 intptr_t argument_count,
1257 intptr_t deopt_id, 1257 intptr_t deopt_id,
1258 intptr_t token_pos, 1258 intptr_t token_pos,
1259 LocationSummary* locs) { 1259 LocationSummary* locs) {
1260 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table();
1261 const String& name = String::Handle(zone(), ic_data.target_name()); 1260 const String& name = String::Handle(zone(), ic_data.target_name());
1262 const Array& arguments_descriptor = 1261 const Array& arguments_descriptor =
1263 Array::ZoneHandle(zone(), ic_data.arguments_descriptor()); 1262 Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
1264 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); 1263 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
1265 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle( 1264 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(),
1266 zone(), table->Lookup(name, arguments_descriptor)); 1265 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor));
1267 const Register receiverR = R0; 1266 const Register receiverR = R0;
1268 const Register cacheR = R1; 1267 const Register cacheR = R1;
1269 const Register targetR = R1; 1268 const Register targetR = R1;
1270 __ LoadFromOffset(receiverR, SP, (argument_count - 1) * kWordSize); 1269 __ LoadFromOffset(receiverR, SP, (argument_count - 1) * kWordSize);
1271 __ LoadObject(cacheR, cache); 1270 __ LoadObject(cacheR, cache);
1272 1271
1273 if (FLAG_use_megamorphic_stub) { 1272 if (FLAG_use_megamorphic_stub) {
1274 __ BranchLink(*StubCode::MegamorphicLookup_entry()); 1273 __ BranchLink(*StubCode::MegamorphicLookup_entry());
1275 } else { 1274 } else {
1276 StubCode::EmitMegamorphicLookup(assembler(), receiverR, cacheR, targetR); 1275 StubCode::EmitMegamorphicLookup(assembler(), receiverR, cacheR, targetR);
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1833 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 1832 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
1834 __ PopDouble(reg); 1833 __ PopDouble(reg);
1835 } 1834 }
1836 1835
1837 1836
1838 #undef __ 1837 #undef __
1839 1838
1840 } // namespace dart 1839 } // namespace dart
1841 1840
1842 #endif // defined TARGET_ARCH_ARM64 1841 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698