| 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 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1547 const Array& argument_names, | 1547 const Array& argument_names, |
| 1548 Label* deopt, | 1548 Label* deopt, |
| 1549 intptr_t deopt_id, | 1549 intptr_t deopt_id, |
| 1550 intptr_t token_index, | 1550 intptr_t token_index, |
| 1551 LocationSummary* locs) { | 1551 LocationSummary* locs) { |
| 1552 ASSERT(is_optimizing()); | 1552 ASSERT(is_optimizing()); |
| 1553 ASSERT(!ic_data.IsNull() && (ic_data.NumberOfUsedChecks() > 0)); | 1553 ASSERT(!ic_data.IsNull() && (ic_data.NumberOfUsedChecks() > 0)); |
| 1554 Label match_found; | 1554 Label match_found; |
| 1555 const intptr_t len = ic_data.NumberOfChecks(); | 1555 const intptr_t len = ic_data.NumberOfChecks(); |
| 1556 GrowableArray<CidTarget> sorted(len); | 1556 GrowableArray<CidTarget> sorted(len); |
| 1557 SortICDataByCount(ic_data, &sorted); | 1557 SortICDataByCount(ic_data, &sorted, /* drop_smi = */ false); |
| 1558 ASSERT(class_id_reg != EDX); | 1558 ASSERT(class_id_reg != EDX); |
| 1559 ASSERT(len > 0); // Why bother otherwise. | 1559 ASSERT(len > 0); // Why bother otherwise. |
| 1560 const Array& arguments_descriptor = | 1560 const Array& arguments_descriptor = |
| 1561 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, | 1561 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, |
| 1562 argument_names)); | 1562 argument_names)); |
| 1563 StubCode* stub_code = isolate()->stub_code(); | 1563 StubCode* stub_code = isolate()->stub_code(); |
| 1564 | 1564 |
| 1565 __ LoadObject(EDX, arguments_descriptor); | 1565 __ LoadObject(EDX, arguments_descriptor); |
| 1566 for (intptr_t i = 0; i < len; i++) { | 1566 for (intptr_t i = 0; i < len; i++) { |
| 1567 const bool is_last_check = (i == (len - 1)); | 1567 const bool is_last_check = (i == (len - 1)); |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1851 __ movups(reg, Address(ESP, 0)); | 1851 __ movups(reg, Address(ESP, 0)); |
| 1852 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1852 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1853 } | 1853 } |
| 1854 | 1854 |
| 1855 | 1855 |
| 1856 #undef __ | 1856 #undef __ |
| 1857 | 1857 |
| 1858 } // namespace dart | 1858 } // namespace dart |
| 1859 | 1859 |
| 1860 #endif // defined TARGET_ARCH_IA32 | 1860 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |