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

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

Issue 1756403002: VM: Add smi fast path operations for precompiled code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 4 years, 9 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_ia32.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 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 __ Drop(argument_count); 1283 __ Drop(argument_count);
1284 } 1284 }
1285 1285
1286 1286
1287 void FlowGraphCompiler::EmitMegamorphicInstanceCall( 1287 void FlowGraphCompiler::EmitMegamorphicInstanceCall(
1288 const ICData& ic_data, 1288 const ICData& ic_data,
1289 intptr_t argument_count, 1289 intptr_t argument_count,
1290 intptr_t deopt_id, 1290 intptr_t deopt_id,
1291 TokenPosition token_pos, 1291 TokenPosition token_pos,
1292 LocationSummary* locs, 1292 LocationSummary* locs,
1293 intptr_t try_index) { 1293 intptr_t try_index,
1294 intptr_t slow_path_argument_count) {
1294 const String& name = String::Handle(zone(), ic_data.target_name()); 1295 const String& name = String::Handle(zone(), ic_data.target_name());
1295 const Array& arguments_descriptor = 1296 const Array& arguments_descriptor =
1296 Array::ZoneHandle(zone(), ic_data.arguments_descriptor()); 1297 Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
1297 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); 1298 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
1298 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(), 1299 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(),
1299 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor)); 1300 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor));
1300 1301
1301 __ Comment("MegamorphicCall"); 1302 __ Comment("MegamorphicCall");
1302 __ LoadFromOffset(R0, SP, (argument_count - 1) * kWordSize); 1303 __ LoadFromOffset(R0, SP, (argument_count - 1) * kWordSize);
1303 __ LoadObject(R5, cache); 1304 __ LoadObject(R5, cache);
1304 if (FLAG_use_megamorphic_stub) { 1305 if (FLAG_use_megamorphic_stub) {
1305 __ BranchLink(*StubCode::MegamorphicLookup_entry()); 1306 __ BranchLink(*StubCode::MegamorphicLookup_entry());
1306 } else { 1307 } else {
1307 StubCode::EmitMegamorphicLookup(assembler()); 1308 StubCode::EmitMegamorphicLookup(assembler());
1308 } 1309 }
1309 __ blr(R1); 1310 __ blr(R1);
1310 1311
1311 RecordSafepoint(locs); 1312 RecordSafepoint(locs, slow_path_argument_count);
1312 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1313 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1313 if (FLAG_precompiled_mode) { 1314 if (FLAG_precompiled_mode) {
1314 // Megamorphic calls may occur in slow path stubs. 1315 // Megamorphic calls may occur in slow path stubs.
1315 // If valid use try_index argument. 1316 // If valid use try_index argument.
1316 if (try_index == CatchClauseNode::kInvalidTryIndex) { 1317 if (try_index == CatchClauseNode::kInvalidTryIndex) {
1317 try_index = CurrentTryIndex(); 1318 try_index = CurrentTryIndex();
1318 } 1319 }
1319 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther, 1320 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther,
1320 assembler()->CodeSize(), 1321 assembler()->CodeSize(),
1321 Thread::kNoDeoptId, 1322 Thread::kNoDeoptId,
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 1914 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
1914 __ PopDouble(reg); 1915 __ PopDouble(reg);
1915 } 1916 }
1916 1917
1917 1918
1918 #undef __ 1919 #undef __
1919 1920
1920 } // namespace dart 1921 } // namespace dart
1921 1922
1922 #endif // defined TARGET_ARCH_ARM64 1923 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698