| 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 __ AddImmediate(T1, Instructions::HeaderSize() - kHeapObjectTag); | 1316 __ AddImmediate(T1, Instructions::HeaderSize() - kHeapObjectTag); |
| 1317 __ jalr(T1); | 1317 __ jalr(T1); |
| 1318 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); | 1318 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); |
| 1319 RecordSafepoint(locs); | 1319 RecordSafepoint(locs); |
| 1320 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); | 1320 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); |
| 1321 __ Drop(argument_count); | 1321 __ Drop(argument_count); |
| 1322 } | 1322 } |
| 1323 | 1323 |
| 1324 | 1324 |
| 1325 void FlowGraphCompiler::EmitUnoptimizedStaticCall( | 1325 void FlowGraphCompiler::EmitUnoptimizedStaticCall( |
| 1326 const Function& target_function, | |
| 1327 const Array& arguments_descriptor, | |
| 1328 intptr_t argument_count, | 1326 intptr_t argument_count, |
| 1329 intptr_t deopt_id, | 1327 intptr_t deopt_id, |
| 1330 intptr_t token_pos, | 1328 intptr_t token_pos, |
| 1331 LocationSummary* locs) { | 1329 LocationSummary* locs, |
| 1332 // TODO(srdjan): Improve performance of function recognition. | 1330 const ICData& ic_data) { |
| 1333 MethodRecognizer::Kind recognized_kind = | |
| 1334 MethodRecognizer::RecognizeKind(target_function); | |
| 1335 int num_args_checked = 0; | |
| 1336 if ((recognized_kind == MethodRecognizer::kMathMin) || | |
| 1337 (recognized_kind == MethodRecognizer::kMathMax)) { | |
| 1338 num_args_checked = 2; | |
| 1339 } | |
| 1340 const ICData& ic_data = ICData::ZoneHandle( | |
| 1341 ICData::New(parsed_function().function(), // Caller function. | |
| 1342 String::Handle(target_function.name()), | |
| 1343 arguments_descriptor, | |
| 1344 deopt_id, | |
| 1345 num_args_checked)); // No arguments checked. | |
| 1346 ic_data.AddTarget(target_function); | |
| 1347 uword label_address = 0; | 1331 uword label_address = 0; |
| 1348 if (ic_data.NumArgsTested() == 0) { | 1332 if (ic_data.NumArgsTested() == 0) { |
| 1349 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint(); | 1333 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint(); |
| 1350 } else if (ic_data.NumArgsTested() == 2) { | 1334 } else if (ic_data.NumArgsTested() == 2) { |
| 1351 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint(); | 1335 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint(); |
| 1352 } else { | 1336 } else { |
| 1353 UNIMPLEMENTED(); | 1337 UNIMPLEMENTED(); |
| 1354 } | 1338 } |
| 1355 ExternalLabel target_label(label_address); | 1339 ExternalLabel target_label(label_address); |
| 1356 __ LoadObject(S5, ic_data); | 1340 __ LoadObject(S5, ic_data); |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1806 __ AddImmediate(SP, kDoubleSize); | 1790 __ AddImmediate(SP, kDoubleSize); |
| 1807 } | 1791 } |
| 1808 | 1792 |
| 1809 | 1793 |
| 1810 #undef __ | 1794 #undef __ |
| 1811 | 1795 |
| 1812 | 1796 |
| 1813 } // namespace dart | 1797 } // namespace dart |
| 1814 | 1798 |
| 1815 #endif // defined TARGET_ARCH_MIPS | 1799 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |