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

Side by Side Diff: runtime/vm/flow_graph_compiler_arm64.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_arm.cc ('k') | runtime/vm/flow_graph_compiler_mips.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) 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 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 1338
1339 1339
1340 void FlowGraphCompiler::EmitSwitchableInstanceCall( 1340 void FlowGraphCompiler::EmitSwitchableInstanceCall(
1341 const ICData& ic_data, 1341 const ICData& ic_data,
1342 intptr_t argument_count, 1342 intptr_t argument_count,
1343 intptr_t deopt_id, 1343 intptr_t deopt_id,
1344 TokenPosition token_pos, 1344 TokenPosition token_pos,
1345 LocationSummary* locs) { 1345 LocationSummary* locs) {
1346 __ Comment("SwitchableCall"); 1346 __ Comment("SwitchableCall");
1347 __ LoadFromOffset(R0, SP, (argument_count - 1) * kWordSize); 1347 __ LoadFromOffset(R0, SP, (argument_count - 1) * kWordSize);
1348 if (ic_data.NumArgsTested() == 1) { 1348 ASSERT(ic_data.NumArgsTested() == 1);
1349 __ LoadUniqueObject(R5, ic_data); 1349 __ LoadUniqueObject(R5, ic_data);
1350 __ BranchLinkPatchable(*StubCode::ICLookupThroughFunction_entry()); 1350 __ BranchLinkPatchable(*StubCode::ICLookupThroughFunction_entry());
1351 } else {
1352 const String& name = String::Handle(zone(), ic_data.target_name());
1353 const Array& arguments_descriptor =
1354 Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
1355 ASSERT(!arguments_descriptor.IsNull() &&
1356 (arguments_descriptor.Length() > 0));
1357 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(),
1358 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor));
1359
1360 __ LoadUniqueObject(R5, cache);
1361 __ BranchLinkPatchable(*StubCode::MegamorphicLookup_entry());
1362 }
1363 __ blr(R1); 1351 __ blr(R1);
1364 1352
1365 AddCurrentDescriptor(RawPcDescriptors::kOther, 1353 AddCurrentDescriptor(RawPcDescriptors::kOther,
1366 Thread::kNoDeoptId, token_pos); 1354 Thread::kNoDeoptId, token_pos);
1367 RecordSafepoint(locs); 1355 RecordSafepoint(locs);
1368 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1356 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1369 if (is_optimizing()) { 1357 if (is_optimizing()) {
1370 AddDeoptIndexAtCall(deopt_id_after, token_pos); 1358 AddDeoptIndexAtCall(deopt_id_after, token_pos);
1371 } else { 1359 } else {
1372 // Add deoptimization continuation point after the call and before the 1360 // Add deoptimization continuation point after the call and before the
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 1913 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
1926 __ PopDouble(reg); 1914 __ PopDouble(reg);
1927 } 1915 }
1928 1916
1929 1917
1930 #undef __ 1918 #undef __
1931 1919
1932 } // namespace dart 1920 } // namespace dart
1933 1921
1934 #endif // defined TARGET_ARCH_ARM64 1922 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698