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

Side by Side Diff: runtime/vm/flow_graph_compiler_arm.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.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 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 __ Drop(argument_count); 1302 __ Drop(argument_count);
1303 } 1303 }
1304 1304
1305 1305
1306 void FlowGraphCompiler::EmitMegamorphicInstanceCall( 1306 void FlowGraphCompiler::EmitMegamorphicInstanceCall(
1307 const ICData& ic_data, 1307 const ICData& ic_data,
1308 intptr_t argument_count, 1308 intptr_t argument_count,
1309 intptr_t deopt_id, 1309 intptr_t deopt_id,
1310 TokenPosition token_pos, 1310 TokenPosition token_pos,
1311 LocationSummary* locs, 1311 LocationSummary* locs,
1312 intptr_t try_index) { 1312 intptr_t try_index,
1313 intptr_t slow_path_argument_count) {
1313 const String& name = String::Handle(zone(), ic_data.target_name()); 1314 const String& name = String::Handle(zone(), ic_data.target_name());
1314 const Array& arguments_descriptor = 1315 const Array& arguments_descriptor =
1315 Array::ZoneHandle(zone(), ic_data.arguments_descriptor()); 1316 Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
1316 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); 1317 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
1317 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(), 1318 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(),
1318 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor)); 1319 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor));
1319 1320
1320 __ Comment("MegamorphicCall"); 1321 __ Comment("MegamorphicCall");
1321 __ LoadFromOffset(kWord, R0, SP, (argument_count - 1) * kWordSize); 1322 __ LoadFromOffset(kWord, R0, SP, (argument_count - 1) * kWordSize);
1322 __ LoadObject(R9, cache); 1323 __ LoadObject(R9, cache);
1323 if (FLAG_use_megamorphic_stub) { 1324 if (FLAG_use_megamorphic_stub) {
1324 __ BranchLink(*StubCode::MegamorphicLookup_entry()); 1325 __ BranchLink(*StubCode::MegamorphicLookup_entry());
1325 } else { 1326 } else {
1326 StubCode::EmitMegamorphicLookup(assembler()); 1327 StubCode::EmitMegamorphicLookup(assembler());
1327 } 1328 }
1328 __ blx(R1); 1329 __ blx(R1);
1329 1330
1330 RecordSafepoint(locs); 1331 RecordSafepoint(locs, slow_path_argument_count);
1331 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1332 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1332 if (FLAG_precompiled_mode) { 1333 if (FLAG_precompiled_mode) {
1333 // Megamorphic calls may occur in slow path stubs. 1334 // Megamorphic calls may occur in slow path stubs.
1334 // If valid use try_index argument. 1335 // If valid use try_index argument.
1335 if (try_index == CatchClauseNode::kInvalidTryIndex) { 1336 if (try_index == CatchClauseNode::kInvalidTryIndex) {
1336 try_index = CurrentTryIndex(); 1337 try_index = CurrentTryIndex();
1337 } 1338 }
1338 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther, 1339 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther,
1339 assembler()->CodeSize(), 1340 assembler()->CodeSize(),
1340 Thread::kNoDeoptId, 1341 Thread::kNoDeoptId,
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 DRegister dreg = EvenDRegisterOf(reg); 1977 DRegister dreg = EvenDRegisterOf(reg);
1977 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1978 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1978 } 1979 }
1979 1980
1980 1981
1981 #undef __ 1982 #undef __
1982 1983
1983 } // namespace dart 1984 } // namespace dart
1984 1985
1985 #endif // defined TARGET_ARCH_ARM 1986 #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