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

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

Issue 1888783002: VM: Always start switchable calls with IC stub. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_compiler_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" // 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 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 1358
1359 1359
1360 void FlowGraphCompiler::EmitSwitchableInstanceCall( 1360 void FlowGraphCompiler::EmitSwitchableInstanceCall(
1361 const ICData& ic_data, 1361 const ICData& ic_data,
1362 intptr_t argument_count, 1362 intptr_t argument_count,
1363 intptr_t deopt_id, 1363 intptr_t deopt_id,
1364 TokenPosition token_pos, 1364 TokenPosition token_pos,
1365 LocationSummary* locs) { 1365 LocationSummary* locs) {
1366 __ Comment("SwitchableCall"); 1366 __ Comment("SwitchableCall");
1367 __ LoadFromOffset(kWord, R0, SP, (argument_count - 1) * kWordSize); 1367 __ LoadFromOffset(kWord, R0, SP, (argument_count - 1) * kWordSize);
1368 if (ic_data.NumArgsTested() == 1) { 1368 ASSERT(ic_data.NumArgsTested() == 1);
1369 __ LoadUniqueObject(R9, ic_data); 1369 __ LoadUniqueObject(R9, ic_data);
1370 __ BranchLinkPatchable(*StubCode::ICLookupThroughFunction_entry()); 1370 __ BranchLinkPatchable(*StubCode::ICLookupThroughFunction_entry());
1371 } else {
1372 const String& name = String::Handle(zone(), ic_data.target_name());
1373 const Array& arguments_descriptor =
1374 Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
1375 ASSERT(!arguments_descriptor.IsNull() &&
1376 (arguments_descriptor.Length() > 0));
1377 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(),
1378 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor));
1379
1380 __ LoadUniqueObject(R9, cache);
1381 __ BranchLinkPatchable(*StubCode::MegamorphicLookup_entry());
1382 }
1383 __ blx(R1); 1371 __ blx(R1);
1384 1372
1385 AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId, token_pos); 1373 AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId, token_pos);
1386 RecordSafepoint(locs); 1374 RecordSafepoint(locs);
1387 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1375 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1388 if (is_optimizing()) { 1376 if (is_optimizing()) {
1389 AddDeoptIndexAtCall(deopt_id_after, token_pos); 1377 AddDeoptIndexAtCall(deopt_id_after, token_pos);
1390 } else { 1378 } else {
1391 // Add deoptimization continuation point after the call and before the 1379 // Add deoptimization continuation point after the call and before the
1392 // arguments are removed. 1380 // arguments are removed.
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1988 DRegister dreg = EvenDRegisterOf(reg); 1976 DRegister dreg = EvenDRegisterOf(reg);
1989 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1977 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1990 } 1978 }
1991 1979
1992 1980
1993 #undef __ 1981 #undef __
1994 1982
1995 } // namespace dart 1983 } // namespace dart
1996 1984
1997 #endif // defined TARGET_ARCH_ARM 1985 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_compiler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698