| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 // be invoked as a normal Dart function. | 1347 // be invoked as a normal Dart function. |
| 1348 __ movl(EAX, FieldAddress(EDI, ECX, TIMES_4, base + kWordSize)); | 1348 __ movl(EAX, FieldAddress(EDI, ECX, TIMES_4, base + kWordSize)); |
| 1349 __ movl(EBX, FieldAddress(EAX, Function::instructions_offset())); | 1349 __ movl(EBX, FieldAddress(EAX, Function::instructions_offset())); |
| 1350 __ LoadObject(ECX, ic_data); | 1350 __ LoadObject(ECX, ic_data); |
| 1351 __ LoadObject(EDX, arguments_descriptor); | 1351 __ LoadObject(EDX, arguments_descriptor); |
| 1352 __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); | 1352 __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); |
| 1353 __ call(EBX); | 1353 __ call(EBX); |
| 1354 AddCurrentDescriptor(RawPcDescriptors::kOther, | 1354 AddCurrentDescriptor(RawPcDescriptors::kOther, |
| 1355 Isolate::kNoDeoptId, token_pos); | 1355 Isolate::kNoDeoptId, token_pos); |
| 1356 RecordSafepoint(locs); | 1356 RecordSafepoint(locs); |
| 1357 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); | 1357 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id); |
| 1358 if (is_optimizing()) { |
| 1359 AddDeoptIndexAtCall(deopt_id_after, token_pos); |
| 1360 } else { |
| 1361 // Add deoptimization continuation point after the call and before the |
| 1362 // arguments are removed. |
| 1363 AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos); |
| 1364 } |
| 1358 __ Drop(argument_count); | 1365 __ Drop(argument_count); |
| 1359 } | 1366 } |
| 1360 | 1367 |
| 1361 | 1368 |
| 1362 void FlowGraphCompiler::EmitOptimizedStaticCall( | 1369 void FlowGraphCompiler::EmitOptimizedStaticCall( |
| 1363 const Function& function, | 1370 const Function& function, |
| 1364 const Array& arguments_descriptor, | 1371 const Array& arguments_descriptor, |
| 1365 intptr_t argument_count, | 1372 intptr_t argument_count, |
| 1366 intptr_t deopt_id, | 1373 intptr_t deopt_id, |
| 1367 intptr_t token_pos, | 1374 intptr_t token_pos, |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 __ movups(reg, Address(ESP, 0)); | 1842 __ movups(reg, Address(ESP, 0)); |
| 1836 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1843 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1837 } | 1844 } |
| 1838 | 1845 |
| 1839 | 1846 |
| 1840 #undef __ | 1847 #undef __ |
| 1841 | 1848 |
| 1842 } // namespace dart | 1849 } // namespace dart |
| 1843 | 1850 |
| 1844 #endif // defined TARGET_ARCH_IA32 | 1851 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |