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_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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 __ Drop(argument_count); | 1277 __ Drop(argument_count); |
1278 } | 1278 } |
1279 | 1279 |
1280 | 1280 |
1281 void FlowGraphCompiler::EmitMegamorphicInstanceCall( | 1281 void FlowGraphCompiler::EmitMegamorphicInstanceCall( |
1282 const ICData& ic_data, | 1282 const ICData& ic_data, |
1283 intptr_t argument_count, | 1283 intptr_t argument_count, |
1284 intptr_t deopt_id, | 1284 intptr_t deopt_id, |
1285 intptr_t token_pos, | 1285 intptr_t token_pos, |
1286 LocationSummary* locs) { | 1286 LocationSummary* locs) { |
| 1287 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); |
1287 const String& name = String::Handle(zone(), ic_data.target_name()); | 1288 const String& name = String::Handle(zone(), ic_data.target_name()); |
1288 const Array& arguments_descriptor = | 1289 const Array& arguments_descriptor = |
1289 Array::ZoneHandle(zone(), ic_data.arguments_descriptor()); | 1290 Array::ZoneHandle(zone(), ic_data.arguments_descriptor()); |
1290 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); | 1291 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); |
1291 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(), | 1292 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle( |
1292 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor)); | 1293 zone(), table->Lookup(name, arguments_descriptor)); |
1293 const Register receiverR = R0; | 1294 const Register receiverR = R0; |
1294 const Register cacheR = R1; | 1295 const Register cacheR = R1; |
1295 const Register targetR = R1; | 1296 const Register targetR = R1; |
1296 __ LoadFromOffset(kWord, receiverR, SP, (argument_count - 1) * kWordSize); | 1297 __ LoadFromOffset(kWord, receiverR, SP, (argument_count - 1) * kWordSize); |
1297 __ LoadObject(cacheR, cache); | 1298 __ LoadObject(cacheR, cache); |
1298 | 1299 |
1299 if (FLAG_use_megamorphic_stub) { | 1300 if (FLAG_use_megamorphic_stub) { |
1300 __ BranchLink(*StubCode::MegamorphicLookup_entry()); | 1301 __ BranchLink(*StubCode::MegamorphicLookup_entry()); |
1301 } else { | 1302 } else { |
1302 StubCode::EmitMegamorphicLookup(assembler(), receiverR, cacheR, targetR); | 1303 StubCode::EmitMegamorphicLookup(assembler(), receiverR, cacheR, targetR); |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1895 DRegister dreg = EvenDRegisterOf(reg); | 1896 DRegister dreg = EvenDRegisterOf(reg); |
1896 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); | 1897 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); |
1897 } | 1898 } |
1898 | 1899 |
1899 | 1900 |
1900 #undef __ | 1901 #undef __ |
1901 | 1902 |
1902 } // namespace dart | 1903 } // namespace dart |
1903 | 1904 |
1904 #endif // defined TARGET_ARCH_ARM | 1905 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |