OLD | NEW |
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 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 __ Drop(argument_count); | 1275 __ Drop(argument_count); |
1276 } | 1276 } |
1277 | 1277 |
1278 | 1278 |
1279 void FlowGraphCompiler::EmitMegamorphicInstanceCall( | 1279 void FlowGraphCompiler::EmitMegamorphicInstanceCall( |
1280 const ICData& ic_data, | 1280 const ICData& ic_data, |
1281 intptr_t argument_count, | 1281 intptr_t argument_count, |
1282 intptr_t deopt_id, | 1282 intptr_t deopt_id, |
1283 intptr_t token_pos, | 1283 intptr_t token_pos, |
1284 LocationSummary* locs) { | 1284 LocationSummary* locs) { |
1285 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); | |
1286 const String& name = String::Handle(zone(), ic_data.target_name()); | 1285 const String& name = String::Handle(zone(), ic_data.target_name()); |
1287 const Array& arguments_descriptor = | 1286 const Array& arguments_descriptor = |
1288 Array::ZoneHandle(zone(), ic_data.arguments_descriptor()); | 1287 Array::ZoneHandle(zone(), ic_data.arguments_descriptor()); |
1289 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); | 1288 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); |
1290 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle( | 1289 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(), |
1291 zone(), table->Lookup(name, arguments_descriptor)); | 1290 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor)); |
1292 __ Comment("MegamorphicInstanceCall"); | 1291 __ Comment("MegamorphicInstanceCall"); |
1293 const Register receiverR = T0; | 1292 const Register receiverR = T0; |
1294 const Register cacheR = T1; | 1293 const Register cacheR = T1; |
1295 const Register targetR = T1; | 1294 const Register targetR = T1; |
1296 __ lw(receiverR, Address(SP, (argument_count - 1) * kWordSize)); | 1295 __ lw(receiverR, Address(SP, (argument_count - 1) * kWordSize)); |
1297 __ LoadObject(cacheR, cache); | 1296 __ LoadObject(cacheR, cache); |
1298 | 1297 |
1299 if (FLAG_use_megamorphic_stub) { | 1298 if (FLAG_use_megamorphic_stub) { |
1300 __ BranchLink(*StubCode::MegamorphicLookup_entry()); | 1299 __ BranchLink(*StubCode::MegamorphicLookup_entry()); |
1301 } else { | 1300 } else { |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1859 __ AddImmediate(SP, kDoubleSize); | 1858 __ AddImmediate(SP, kDoubleSize); |
1860 } | 1859 } |
1861 | 1860 |
1862 | 1861 |
1863 #undef __ | 1862 #undef __ |
1864 | 1863 |
1865 | 1864 |
1866 } // namespace dart | 1865 } // namespace dart |
1867 | 1866 |
1868 #endif // defined TARGET_ARCH_MIPS | 1867 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |