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 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1504 SortICDataByCount(ic_data, &sorted); | 1504 SortICDataByCount(ic_data, &sorted); |
1505 ASSERT(class_id_reg != R4); | 1505 ASSERT(class_id_reg != R4); |
1506 ASSERT(len > 0); // Why bother otherwise. | 1506 ASSERT(len > 0); // Why bother otherwise. |
1507 const Array& arguments_descriptor = | 1507 const Array& arguments_descriptor = |
1508 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, | 1508 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, |
1509 argument_names)); | 1509 argument_names)); |
1510 __ LoadObject(R4, arguments_descriptor); | 1510 __ LoadObject(R4, arguments_descriptor); |
1511 for (intptr_t i = 0; i < len; i++) { | 1511 for (intptr_t i = 0; i < len; i++) { |
1512 const bool is_last_check = (i == (len - 1)); | 1512 const bool is_last_check = (i == (len - 1)); |
1513 Label next_test; | 1513 Label next_test; |
1514 assembler()->CompareImmediate(class_id_reg, sorted[i].cid); | 1514 __ CompareImmediate(class_id_reg, sorted[i].cid); |
1515 if (is_last_check) { | 1515 if (is_last_check) { |
1516 assembler()->b(deopt, NE); | 1516 __ b(deopt, NE); |
1517 } else { | 1517 } else { |
1518 assembler()->b(&next_test, NE); | 1518 __ b(&next_test, NE); |
1519 } | 1519 } |
1520 // Do not use the code from the function, but let the code be patched so | 1520 // Do not use the code from the function, but let the code be patched so |
1521 // that we can record the outgoing edges to other code. | 1521 // that we can record the outgoing edges to other code. |
1522 GenerateDartCall(deopt_id, | 1522 GenerateDartCall(deopt_id, |
1523 token_index, | 1523 token_index, |
1524 &StubCode::CallStaticFunctionLabel(), | 1524 &StubCode::CallStaticFunctionLabel(), |
1525 PcDescriptors::kOptStaticCall, | 1525 PcDescriptors::kOptStaticCall, |
1526 locs); | 1526 locs); |
1527 const Function& function = *sorted[i].target; | 1527 const Function& function = *sorted[i].target; |
1528 AddStaticCallTarget(function); | 1528 AddStaticCallTarget(function); |
1529 __ Drop(argument_count); | 1529 __ Drop(argument_count); |
1530 if (!is_last_check) { | 1530 if (!is_last_check) { |
1531 assembler()->b(&match_found); | 1531 __ b(&match_found); |
1532 } | 1532 } |
1533 assembler()->Bind(&next_test); | 1533 __ Bind(&next_test); |
1534 } | 1534 } |
1535 assembler()->Bind(&match_found); | 1535 __ Bind(&match_found); |
1536 } | |
1537 | |
1538 | |
1539 Address FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid, | |
1540 intptr_t index_scale, | |
1541 Register array, | |
1542 intptr_t index) { | |
1543 UNREACHABLE(); | |
1544 return FieldAddress(array, index); | |
1545 } | |
1546 | |
1547 | |
1548 Address FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid, | |
1549 intptr_t index_scale, | |
1550 Register array, | |
1551 Register index) { | |
1552 UNREACHABLE(); | |
1553 return FieldAddress(array, index); | |
1554 } | |
1555 | |
1556 | |
1557 Address FlowGraphCompiler::ExternalElementAddressForIntIndex( | |
1558 intptr_t index_scale, | |
1559 Register array, | |
1560 intptr_t index) { | |
1561 UNREACHABLE(); | |
1562 return FieldAddress(array, index); | |
1563 } | |
1564 | |
1565 | |
1566 Address FlowGraphCompiler::ExternalElementAddressForRegIndex( | |
1567 intptr_t index_scale, | |
1568 Register array, | |
1569 Register index) { | |
1570 UNREACHABLE(); | |
1571 return FieldAddress(array, index); | |
1572 } | 1536 } |
1573 | 1537 |
1574 | 1538 |
1575 #undef __ | 1539 #undef __ |
1576 #define __ compiler_->assembler()-> | 1540 #define __ compiler_->assembler()-> |
1577 | 1541 |
1578 | 1542 |
1579 void ParallelMoveResolver::EmitMove(int index) { | 1543 void ParallelMoveResolver::EmitMove(int index) { |
1580 MoveOperands* move = moves_[index]; | 1544 MoveOperands* move = moves_[index]; |
1581 const Location source = move->src(); | 1545 const Location source = move->src(); |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1817 DRegister dreg = EvenDRegisterOf(reg); | 1781 DRegister dreg = EvenDRegisterOf(reg); |
1818 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); | 1782 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); |
1819 } | 1783 } |
1820 | 1784 |
1821 | 1785 |
1822 #undef __ | 1786 #undef __ |
1823 | 1787 |
1824 } // namespace dart | 1788 } // namespace dart |
1825 | 1789 |
1826 #endif // defined TARGET_ARCH_ARM | 1790 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |