| 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 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 __ AddImmediate(R1, Instructions::HeaderSize() - kHeapObjectTag); | 1274 __ AddImmediate(R1, Instructions::HeaderSize() - kHeapObjectTag); |
| 1275 __ blx(R1); | 1275 __ blx(R1); |
| 1276 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); | 1276 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); |
| 1277 RecordSafepoint(locs); | 1277 RecordSafepoint(locs); |
| 1278 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); | 1278 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); |
| 1279 __ Drop(argument_count); | 1279 __ Drop(argument_count); |
| 1280 } | 1280 } |
| 1281 | 1281 |
| 1282 | 1282 |
| 1283 void FlowGraphCompiler::EmitUnoptimizedStaticCall( | 1283 void FlowGraphCompiler::EmitUnoptimizedStaticCall( |
| 1284 const Function& target_function, | |
| 1285 const Array& arguments_descriptor, | |
| 1286 intptr_t argument_count, | 1284 intptr_t argument_count, |
| 1287 intptr_t deopt_id, | 1285 intptr_t deopt_id, |
| 1288 intptr_t token_pos, | 1286 intptr_t token_pos, |
| 1289 LocationSummary* locs) { | 1287 LocationSummary* locs, |
| 1290 // TODO(srdjan): Improve performance of function recognition. | 1288 const ICData& ic_data) { |
| 1291 MethodRecognizer::Kind recognized_kind = | |
| 1292 MethodRecognizer::RecognizeKind(target_function); | |
| 1293 int num_args_checked = 0; | |
| 1294 if ((recognized_kind == MethodRecognizer::kMathMin) || | |
| 1295 (recognized_kind == MethodRecognizer::kMathMax)) { | |
| 1296 num_args_checked = 2; | |
| 1297 } | |
| 1298 const ICData& ic_data = ICData::ZoneHandle( | |
| 1299 ICData::New(parsed_function().function(), // Caller function. | |
| 1300 String::Handle(target_function.name()), | |
| 1301 arguments_descriptor, | |
| 1302 deopt_id, | |
| 1303 num_args_checked)); // No arguments checked. | |
| 1304 ic_data.AddTarget(target_function); | |
| 1305 uword label_address = 0; | 1289 uword label_address = 0; |
| 1306 if (ic_data.NumArgsTested() == 0) { | 1290 if (ic_data.NumArgsTested() == 0) { |
| 1307 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint(); | 1291 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint(); |
| 1308 } else if (ic_data.NumArgsTested() == 2) { | 1292 } else if (ic_data.NumArgsTested() == 2) { |
| 1309 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint(); | 1293 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint(); |
| 1310 } else { | 1294 } else { |
| 1311 UNIMPLEMENTED(); | 1295 UNIMPLEMENTED(); |
| 1312 } | 1296 } |
| 1313 ExternalLabel target_label(label_address); | 1297 ExternalLabel target_label(label_address); |
| 1314 __ LoadObject(R5, ic_data); | 1298 __ LoadObject(R5, ic_data); |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1761 DRegister dreg = EvenDRegisterOf(reg); | 1745 DRegister dreg = EvenDRegisterOf(reg); |
| 1762 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); | 1746 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); |
| 1763 } | 1747 } |
| 1764 | 1748 |
| 1765 | 1749 |
| 1766 #undef __ | 1750 #undef __ |
| 1767 | 1751 |
| 1768 } // namespace dart | 1752 } // namespace dart |
| 1769 | 1753 |
| 1770 #endif // defined TARGET_ARCH_ARM | 1754 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |