| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 intptr_t token_pos, | 1246 intptr_t token_pos, |
| 1247 LocationSummary* locs) { | 1247 LocationSummary* locs) { |
| 1248 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); | 1248 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); |
| 1249 __ LoadObject(R5, ic_data, PP); | 1249 __ LoadObject(R5, ic_data, PP); |
| 1250 GenerateDartCall(deopt_id, | 1250 GenerateDartCall(deopt_id, |
| 1251 token_pos, | 1251 token_pos, |
| 1252 target_label, | 1252 target_label, |
| 1253 RawPcDescriptors::kIcCall, | 1253 RawPcDescriptors::kIcCall, |
| 1254 locs); | 1254 locs); |
| 1255 __ Drop(argument_count); | 1255 __ Drop(argument_count); |
| 1256 #if defined(DEBUG) | |
| 1257 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); | |
| 1258 #endif | |
| 1259 } | 1256 } |
| 1260 | 1257 |
| 1261 | 1258 |
| 1262 void FlowGraphCompiler::EmitMegamorphicInstanceCall( | 1259 void FlowGraphCompiler::EmitMegamorphicInstanceCall( |
| 1263 const ICData& ic_data, | 1260 const ICData& ic_data, |
| 1264 intptr_t argument_count, | 1261 intptr_t argument_count, |
| 1265 intptr_t deopt_id, | 1262 intptr_t deopt_id, |
| 1266 intptr_t token_pos, | 1263 intptr_t token_pos, |
| 1267 LocationSummary* locs) { | 1264 LocationSummary* locs) { |
| 1268 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); | 1265 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 StubCode* stub_code = isolate()->stub_code(); | 1327 StubCode* stub_code = isolate()->stub_code(); |
| 1331 const uword label_address = | 1328 const uword label_address = |
| 1332 stub_code->UnoptimizedStaticCallEntryPoint(ic_data.NumArgsTested()); | 1329 stub_code->UnoptimizedStaticCallEntryPoint(ic_data.NumArgsTested()); |
| 1333 ExternalLabel target_label(label_address); | 1330 ExternalLabel target_label(label_address); |
| 1334 __ LoadObject(R5, ic_data, PP); | 1331 __ LoadObject(R5, ic_data, PP); |
| 1335 GenerateDartCall(deopt_id, | 1332 GenerateDartCall(deopt_id, |
| 1336 token_pos, | 1333 token_pos, |
| 1337 &target_label, | 1334 &target_label, |
| 1338 RawPcDescriptors::kUnoptStaticCall, | 1335 RawPcDescriptors::kUnoptStaticCall, |
| 1339 locs); | 1336 locs); |
| 1340 #if defined(DEBUG) | |
| 1341 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); | |
| 1342 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); | |
| 1343 #endif | |
| 1344 __ Drop(argument_count); | 1337 __ Drop(argument_count); |
| 1345 } | 1338 } |
| 1346 | 1339 |
| 1347 | 1340 |
| 1348 void FlowGraphCompiler::EmitOptimizedStaticCall( | 1341 void FlowGraphCompiler::EmitOptimizedStaticCall( |
| 1349 const Function& function, | 1342 const Function& function, |
| 1350 const Array& arguments_descriptor, | 1343 const Array& arguments_descriptor, |
| 1351 intptr_t argument_count, | 1344 intptr_t argument_count, |
| 1352 intptr_t deopt_id, | 1345 intptr_t deopt_id, |
| 1353 intptr_t token_pos, | 1346 intptr_t token_pos, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 &stub_code->OptimizedIdenticalWithNumberCheckLabel()); | 1404 &stub_code->OptimizedIdenticalWithNumberCheckLabel()); |
| 1412 } else { | 1405 } else { |
| 1413 __ BranchLinkPatchable( | 1406 __ BranchLinkPatchable( |
| 1414 &stub_code->UnoptimizedIdenticalWithNumberCheckLabel()); | 1407 &stub_code->UnoptimizedIdenticalWithNumberCheckLabel()); |
| 1415 } | 1408 } |
| 1416 if (token_pos != Scanner::kNoSourcePos) { | 1409 if (token_pos != Scanner::kNoSourcePos) { |
| 1417 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, | 1410 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, |
| 1418 Isolate::kNoDeoptId, | 1411 Isolate::kNoDeoptId, |
| 1419 token_pos); | 1412 token_pos); |
| 1420 } | 1413 } |
| 1421 #if defined(DEBUG) | |
| 1422 if (!is_optimizing()) { | |
| 1423 // Do this *after* adding the pc descriptor! | |
| 1424 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); | |
| 1425 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); | |
| 1426 } | |
| 1427 #endif | |
| 1428 // Stub returns result in flags (result of a cmp, we need Z computed). | 1414 // Stub returns result in flags (result of a cmp, we need Z computed). |
| 1429 __ Pop(right); | 1415 __ Pop(right); |
| 1430 __ Pop(left); | 1416 __ Pop(left); |
| 1431 } else { | 1417 } else { |
| 1432 __ CompareRegisters(left, right); | 1418 __ CompareRegisters(left, right); |
| 1433 } | 1419 } |
| 1434 return EQ; | 1420 return EQ; |
| 1435 } | 1421 } |
| 1436 | 1422 |
| 1437 | 1423 |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1822 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 1837 __ PopDouble(reg); | 1823 __ PopDouble(reg); |
| 1838 } | 1824 } |
| 1839 | 1825 |
| 1840 | 1826 |
| 1841 #undef __ | 1827 #undef __ |
| 1842 | 1828 |
| 1843 } // namespace dart | 1829 } // namespace dart |
| 1844 | 1830 |
| 1845 #endif // defined TARGET_ARCH_ARM64 | 1831 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |