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 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 __ lw(T0, FieldAddress(T1, base + kWordSize)); | 1330 __ lw(T0, FieldAddress(T1, base + kWordSize)); |
1331 | 1331 |
1332 __ lw(T1, FieldAddress(T0, Function::instructions_offset())); | 1332 __ lw(T1, FieldAddress(T0, Function::instructions_offset())); |
1333 __ LoadObject(S5, ic_data); | 1333 __ LoadObject(S5, ic_data); |
1334 __ LoadObject(S4, arguments_descriptor); | 1334 __ LoadObject(S4, arguments_descriptor); |
1335 __ AddImmediate(T1, Instructions::HeaderSize() - kHeapObjectTag); | 1335 __ AddImmediate(T1, Instructions::HeaderSize() - kHeapObjectTag); |
1336 __ jalr(T1); | 1336 __ jalr(T1); |
1337 AddCurrentDescriptor(RawPcDescriptors::kOther, | 1337 AddCurrentDescriptor(RawPcDescriptors::kOther, |
1338 Isolate::kNoDeoptId, token_pos); | 1338 Isolate::kNoDeoptId, token_pos); |
1339 RecordSafepoint(locs); | 1339 RecordSafepoint(locs); |
1340 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); | 1340 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id); |
| 1341 if (is_optimizing()) { |
| 1342 AddDeoptIndexAtCall(deopt_id_after, token_pos); |
| 1343 } else { |
| 1344 // Add deoptimization continuation point after the call and before the |
| 1345 // arguments are removed. |
| 1346 AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos); |
| 1347 } |
1341 __ Drop(argument_count); | 1348 __ Drop(argument_count); |
1342 } | 1349 } |
1343 | 1350 |
1344 | 1351 |
1345 void FlowGraphCompiler::EmitUnoptimizedStaticCall( | 1352 void FlowGraphCompiler::EmitUnoptimizedStaticCall( |
1346 intptr_t argument_count, | 1353 intptr_t argument_count, |
1347 intptr_t deopt_id, | 1354 intptr_t deopt_id, |
1348 intptr_t token_pos, | 1355 intptr_t token_pos, |
1349 LocationSummary* locs, | 1356 LocationSummary* locs, |
1350 const ICData& ic_data) { | 1357 const ICData& ic_data) { |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1846 __ AddImmediate(SP, kDoubleSize); | 1853 __ AddImmediate(SP, kDoubleSize); |
1847 } | 1854 } |
1848 | 1855 |
1849 | 1856 |
1850 #undef __ | 1857 #undef __ |
1851 | 1858 |
1852 | 1859 |
1853 } // namespace dart | 1860 } // namespace dart |
1854 | 1861 |
1855 #endif // defined TARGET_ARCH_MIPS | 1862 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |