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

Side by Side Diff: runtime/vm/flow_graph_compiler_mips.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_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 __ Drop(argument_count); 1310 __ Drop(argument_count);
1311 } 1311 }
1312 1312
1313 1313
1314 void FlowGraphCompiler::EmitMegamorphicInstanceCall( 1314 void FlowGraphCompiler::EmitMegamorphicInstanceCall(
1315 const ICData& ic_data, 1315 const ICData& ic_data,
1316 intptr_t argument_count, 1316 intptr_t argument_count,
1317 intptr_t deopt_id, 1317 intptr_t deopt_id,
1318 TokenPosition token_pos, 1318 TokenPosition token_pos,
1319 LocationSummary* locs, 1319 LocationSummary* locs,
1320 intptr_t try_index) { 1320 intptr_t try_index,
1321 intptr_t slow_path_argument_count) {
1321 const String& name = String::Handle(zone(), ic_data.target_name()); 1322 const String& name = String::Handle(zone(), ic_data.target_name());
1322 const Array& arguments_descriptor = 1323 const Array& arguments_descriptor =
1323 Array::ZoneHandle(zone(), ic_data.arguments_descriptor()); 1324 Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
1324 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); 1325 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
1325 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(), 1326 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(),
1326 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor)); 1327 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor));
1327 1328
1328 __ Comment("MegamorphicCall"); 1329 __ Comment("MegamorphicCall");
1329 __ lw(T0, Address(SP, (argument_count - 1) * kWordSize)); 1330 __ lw(T0, Address(SP, (argument_count - 1) * kWordSize));
1330 __ LoadObject(S5, cache); 1331 __ LoadObject(S5, cache);
1331 if (FLAG_use_megamorphic_stub) { 1332 if (FLAG_use_megamorphic_stub) {
1332 __ BranchLink(*StubCode::MegamorphicLookup_entry()); 1333 __ BranchLink(*StubCode::MegamorphicLookup_entry());
1333 } else { 1334 } else {
1334 StubCode::EmitMegamorphicLookup(assembler()); 1335 StubCode::EmitMegamorphicLookup(assembler());
1335 } 1336 }
1336 __ jalr(T1); 1337 __ jalr(T1);
1337 1338
1338 RecordSafepoint(locs); 1339 RecordSafepoint(locs, slow_path_argument_count);
1339 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1340 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1340 if (FLAG_precompiled_mode) { 1341 if (FLAG_precompiled_mode) {
1341 // Megamorphic calls may occur in slow path stubs. 1342 // Megamorphic calls may occur in slow path stubs.
1342 // If valid use try_index argument. 1343 // If valid use try_index argument.
1343 if (try_index == CatchClauseNode::kInvalidTryIndex) { 1344 if (try_index == CatchClauseNode::kInvalidTryIndex) {
1344 try_index = CurrentTryIndex(); 1345 try_index = CurrentTryIndex();
1345 } 1346 }
1346 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther, 1347 pc_descriptors_list()->AddDescriptor(RawPcDescriptors::kOther,
1347 assembler()->CodeSize(), 1348 assembler()->CodeSize(),
1348 Thread::kNoDeoptId, 1349 Thread::kNoDeoptId,
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 __ AddImmediate(SP, kDoubleSize); 1942 __ AddImmediate(SP, kDoubleSize);
1942 } 1943 }
1943 1944
1944 1945
1945 #undef __ 1946 #undef __
1946 1947
1947 1948
1948 } // namespace dart 1949 } // namespace dart
1949 1950
1950 #endif // defined TARGET_ARCH_MIPS 1951 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698