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 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1213 } | 1213 } |
1214 | 1214 |
1215 | 1215 |
1216 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, | 1216 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, |
1217 const ICData& ic_data, | 1217 const ICData& ic_data, |
1218 intptr_t argument_count, | 1218 intptr_t argument_count, |
1219 intptr_t deopt_id, | 1219 intptr_t deopt_id, |
1220 intptr_t token_pos, | 1220 intptr_t token_pos, |
1221 LocationSummary* locs) { | 1221 LocationSummary* locs) { |
1222 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); | 1222 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); |
1223 __ LoadImmediate(R4, 0, kNoPP); | |
1224 __ LoadObject(R5, ic_data, PP); | 1223 __ LoadObject(R5, ic_data, PP); |
1225 GenerateDartCall(deopt_id, | 1224 GenerateDartCall(deopt_id, |
1226 token_pos, | 1225 token_pos, |
1227 target_label, | 1226 target_label, |
1228 RawPcDescriptors::kIcCall, | 1227 RawPcDescriptors::kIcCall, |
1229 locs); | 1228 locs); |
1230 __ Drop(argument_count); | 1229 __ Drop(argument_count); |
1231 #if defined(DEBUG) | 1230 #if defined(DEBUG) |
1232 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); | 1231 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); |
1233 #endif | 1232 #endif |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1305 uword label_address = 0; | 1304 uword label_address = 0; |
1306 StubCode* stub_code = isolate()->stub_code(); | 1305 StubCode* stub_code = isolate()->stub_code(); |
1307 if (ic_data.NumArgsTested() == 0) { | 1306 if (ic_data.NumArgsTested() == 0) { |
1308 label_address = stub_code->ZeroArgsUnoptimizedStaticCallEntryPoint(); | 1307 label_address = stub_code->ZeroArgsUnoptimizedStaticCallEntryPoint(); |
1309 } else if (ic_data.NumArgsTested() == 2) { | 1308 } else if (ic_data.NumArgsTested() == 2) { |
1310 label_address = stub_code->TwoArgsUnoptimizedStaticCallEntryPoint(); | 1309 label_address = stub_code->TwoArgsUnoptimizedStaticCallEntryPoint(); |
1311 } else { | 1310 } else { |
1312 UNIMPLEMENTED(); | 1311 UNIMPLEMENTED(); |
1313 } | 1312 } |
1314 ExternalLabel target_label(label_address); | 1313 ExternalLabel target_label(label_address); |
1315 __ LoadImmediate(R4, 0, kNoPP); | |
1316 __ LoadObject(R5, ic_data, PP); | 1314 __ LoadObject(R5, ic_data, PP); |
1317 GenerateDartCall(deopt_id, | 1315 GenerateDartCall(deopt_id, |
1318 token_pos, | 1316 token_pos, |
1319 &target_label, | 1317 &target_label, |
1320 RawPcDescriptors::kUnoptStaticCall, | 1318 RawPcDescriptors::kUnoptStaticCall, |
1321 locs); | 1319 locs); |
1322 #if defined(DEBUG) | 1320 #if defined(DEBUG) |
| 1321 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); |
1323 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); | 1322 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); |
1324 #endif | 1323 #endif |
1325 __ Drop(argument_count); | 1324 __ Drop(argument_count); |
1326 } | 1325 } |
1327 | 1326 |
1328 | 1327 |
1329 void FlowGraphCompiler::EmitOptimizedStaticCall( | 1328 void FlowGraphCompiler::EmitOptimizedStaticCall( |
1330 const Function& function, | 1329 const Function& function, |
1331 const Array& arguments_descriptor, | 1330 const Array& arguments_descriptor, |
1332 intptr_t argument_count, | 1331 intptr_t argument_count, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1382 bool needs_number_check, | 1381 bool needs_number_check, |
1383 intptr_t token_pos) { | 1382 intptr_t token_pos) { |
1384 if (needs_number_check) { | 1383 if (needs_number_check) { |
1385 StubCode* stub_code = isolate()->stub_code(); | 1384 StubCode* stub_code = isolate()->stub_code(); |
1386 __ Push(left); | 1385 __ Push(left); |
1387 __ Push(right); | 1386 __ Push(right); |
1388 if (is_optimizing()) { | 1387 if (is_optimizing()) { |
1389 __ BranchLinkPatchable( | 1388 __ BranchLinkPatchable( |
1390 &stub_code->OptimizedIdenticalWithNumberCheckLabel()); | 1389 &stub_code->OptimizedIdenticalWithNumberCheckLabel()); |
1391 } else { | 1390 } else { |
1392 __ LoadImmediate(R4, 0, kNoPP); | |
1393 __ LoadImmediate(R5, 0, kNoPP); | |
1394 __ BranchLinkPatchable( | 1391 __ BranchLinkPatchable( |
1395 &stub_code->UnoptimizedIdenticalWithNumberCheckLabel()); | 1392 &stub_code->UnoptimizedIdenticalWithNumberCheckLabel()); |
1396 } | 1393 } |
1397 if (token_pos != Scanner::kNoSourcePos) { | 1394 if (token_pos != Scanner::kNoSourcePos) { |
1398 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, | 1395 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, |
1399 Isolate::kNoDeoptId, | 1396 Isolate::kNoDeoptId, |
1400 token_pos); | 1397 token_pos); |
1401 } | 1398 } |
1402 #if defined(DEBUG) | 1399 #if defined(DEBUG) |
1403 if (!is_optimizing()) { | 1400 if (!is_optimizing()) { |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1738 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1735 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
1739 UNIMPLEMENTED(); | 1736 UNIMPLEMENTED(); |
1740 } | 1737 } |
1741 | 1738 |
1742 | 1739 |
1743 #undef __ | 1740 #undef __ |
1744 | 1741 |
1745 } // namespace dart | 1742 } // namespace dart |
1746 | 1743 |
1747 #endif // defined TARGET_ARCH_ARM64 | 1744 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |