| 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 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 __ AddImmediate(R1, R1, Instructions::HeaderSize() - kHeapObjectTag, PP); | 1280 __ AddImmediate(R1, R1, Instructions::HeaderSize() - kHeapObjectTag, PP); |
| 1281 __ blr(R1); | 1281 __ blr(R1); |
| 1282 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); | 1282 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); |
| 1283 RecordSafepoint(locs); | 1283 RecordSafepoint(locs); |
| 1284 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); | 1284 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); |
| 1285 __ Drop(argument_count); | 1285 __ Drop(argument_count); |
| 1286 } | 1286 } |
| 1287 | 1287 |
| 1288 | 1288 |
| 1289 void FlowGraphCompiler::EmitUnoptimizedStaticCall( | 1289 void FlowGraphCompiler::EmitUnoptimizedStaticCall( |
| 1290 const Function& target_function, | |
| 1291 const Array& arguments_descriptor, | |
| 1292 intptr_t argument_count, | 1290 intptr_t argument_count, |
| 1293 intptr_t deopt_id, | 1291 intptr_t deopt_id, |
| 1294 intptr_t token_pos, | 1292 intptr_t token_pos, |
| 1295 LocationSummary* locs) { | 1293 LocationSummary* locs, |
| 1296 // TODO(srdjan): Improve performance of function recognition. | 1294 const ICData& ic_data) { |
| 1297 MethodRecognizer::Kind recognized_kind = | |
| 1298 MethodRecognizer::RecognizeKind(target_function); | |
| 1299 int num_args_checked = 0; | |
| 1300 if ((recognized_kind == MethodRecognizer::kMathMin) || | |
| 1301 (recognized_kind == MethodRecognizer::kMathMax)) { | |
| 1302 num_args_checked = 2; | |
| 1303 } | |
| 1304 const ICData& ic_data = ICData::ZoneHandle( | |
| 1305 ICData::New(parsed_function().function(), // Caller function. | |
| 1306 String::Handle(target_function.name()), | |
| 1307 arguments_descriptor, | |
| 1308 deopt_id, | |
| 1309 num_args_checked)); // No arguments checked. | |
| 1310 ic_data.AddTarget(target_function); | |
| 1311 uword label_address = 0; | 1295 uword label_address = 0; |
| 1312 if (ic_data.NumArgsTested() == 0) { | 1296 if (ic_data.NumArgsTested() == 0) { |
| 1313 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint(); | 1297 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint(); |
| 1314 } else if (ic_data.NumArgsTested() == 2) { | 1298 } else if (ic_data.NumArgsTested() == 2) { |
| 1315 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint(); | 1299 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint(); |
| 1316 } else { | 1300 } else { |
| 1317 UNIMPLEMENTED(); | 1301 UNIMPLEMENTED(); |
| 1318 } | 1302 } |
| 1319 ExternalLabel target_label(label_address); | 1303 ExternalLabel target_label(label_address); |
| 1320 __ LoadObject(R5, ic_data, PP); | 1304 __ LoadObject(R5, ic_data, PP); |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1709 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 1726 UNIMPLEMENTED(); | 1710 UNIMPLEMENTED(); |
| 1727 } | 1711 } |
| 1728 | 1712 |
| 1729 | 1713 |
| 1730 #undef __ | 1714 #undef __ |
| 1731 | 1715 |
| 1732 } // namespace dart | 1716 } // namespace dart |
| 1733 | 1717 |
| 1734 #endif // defined TARGET_ARCH_ARM64 | 1718 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |