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

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

Issue 1500083002: Precompilation/mips: Fix SwitchableCalls to use patchable object pool entries for the lookup stubs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | « no previous file | no next file » | 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 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 void FlowGraphCompiler::EmitSwitchableInstanceCall( 1305 void FlowGraphCompiler::EmitSwitchableInstanceCall(
1306 const ICData& ic_data, 1306 const ICData& ic_data,
1307 intptr_t argument_count, 1307 intptr_t argument_count,
1308 intptr_t deopt_id, 1308 intptr_t deopt_id,
1309 intptr_t token_pos, 1309 intptr_t token_pos,
1310 LocationSummary* locs) { 1310 LocationSummary* locs) {
1311 __ Comment("SwitchableCall"); 1311 __ Comment("SwitchableCall");
1312 __ lw(T0, Address(SP, (argument_count - 1) * kWordSize)); 1312 __ lw(T0, Address(SP, (argument_count - 1) * kWordSize));
1313 if (ic_data.NumArgsTested() == 1) { 1313 if (ic_data.NumArgsTested() == 1) {
1314 __ LoadUniqueObject(S5, ic_data); 1314 __ LoadUniqueObject(S5, ic_data);
1315 __ BranchLink(*StubCode::ICLookup_entry()); 1315 __ BranchLinkPatchable(*StubCode::ICLookup_entry());
1316 } else { 1316 } else {
1317 const String& name = String::Handle(zone(), ic_data.target_name()); 1317 const String& name = String::Handle(zone(), ic_data.target_name());
1318 const Array& arguments_descriptor = 1318 const Array& arguments_descriptor =
1319 Array::ZoneHandle(zone(), ic_data.arguments_descriptor()); 1319 Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
1320 ASSERT(!arguments_descriptor.IsNull() && 1320 ASSERT(!arguments_descriptor.IsNull() &&
1321 (arguments_descriptor.Length() > 0)); 1321 (arguments_descriptor.Length() > 0));
1322 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(), 1322 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(),
1323 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor)); 1323 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor));
1324 1324
1325 __ LoadUniqueObject(S5, cache); 1325 __ LoadUniqueObject(S5, cache);
1326 __ BranchLink(*StubCode::MegamorphicLookup_entry()); 1326 __ BranchLinkPatchable(*StubCode::MegamorphicLookup_entry());
1327 } 1327 }
1328 __ jalr(T1); 1328 __ jalr(T1);
1329 1329
1330 AddCurrentDescriptor(RawPcDescriptors::kOther, 1330 AddCurrentDescriptor(RawPcDescriptors::kOther,
1331 Thread::kNoDeoptId, token_pos); 1331 Thread::kNoDeoptId, token_pos);
1332 RecordSafepoint(locs); 1332 RecordSafepoint(locs);
1333 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1333 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1334 if (is_optimizing()) { 1334 if (is_optimizing()) {
1335 AddDeoptIndexAtCall(deopt_id_after, token_pos); 1335 AddDeoptIndexAtCall(deopt_id_after, token_pos);
1336 } else { 1336 } else {
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 __ AddImmediate(SP, kDoubleSize); 1879 __ AddImmediate(SP, kDoubleSize);
1880 } 1880 }
1881 1881
1882 1882
1883 #undef __ 1883 #undef __
1884 1884
1885 1885
1886 } // namespace dart 1886 } // namespace dart
1887 1887
1888 #endif // defined TARGET_ARCH_MIPS 1888 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698