| 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/aot_optimizer.h" | 5 #include "vm/aot_optimizer.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/branch_optimizer.h" | 8 #include "vm/branch_optimizer.h" |
| 9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 CallTargets* targets = CallTargets::Create(Z, unary_checks); | 1722 CallTargets* targets = CallTargets::Create(Z, unary_checks); |
| 1723 ASSERT(targets->HasSingleTarget()); | 1723 ASSERT(targets->HasSingleTarget()); |
| 1724 const Function& target = targets->FirstTarget(); | 1724 const Function& target = targets->FirstTarget(); |
| 1725 StaticCallInstr* call = StaticCallInstr::FromCall(Z, instr, target); | 1725 StaticCallInstr* call = StaticCallInstr::FromCall(Z, instr, target); |
| 1726 instr->ReplaceWith(call, current_iterator()); | 1726 instr->ReplaceWith(call, current_iterator()); |
| 1727 return; | 1727 return; |
| 1728 } | 1728 } |
| 1729 } | 1729 } |
| 1730 switch (instr->token_kind()) { | 1730 switch (instr->token_kind()) { |
| 1731 case Token::kEQ: | 1731 case Token::kEQ: |
| 1732 case Token::kNE: |
| 1732 case Token::kLT: | 1733 case Token::kLT: |
| 1733 case Token::kLTE: | 1734 case Token::kLTE: |
| 1734 case Token::kGT: | 1735 case Token::kGT: |
| 1735 case Token::kGTE: { | 1736 case Token::kGTE: { |
| 1736 if (HasOnlyTwoOf(*instr->ic_data(), kSmiCid) || | 1737 if (HasOnlyTwoOf(*instr->ic_data(), kSmiCid) || |
| 1737 HasLikelySmiOperand(instr)) { | 1738 HasLikelySmiOperand(instr)) { |
| 1738 ASSERT(receiver_idx == 0); | 1739 ASSERT(receiver_idx == 0); |
| 1739 Definition* left = instr->ArgumentAt(0); | 1740 Definition* left = instr->ArgumentAt(0); |
| 1740 Definition* right = instr->ArgumentAt(1); | 1741 Definition* right = instr->ArgumentAt(1); |
| 1741 CheckedSmiComparisonInstr* smi_op = new (Z) | 1742 CheckedSmiComparisonInstr* smi_op = new (Z) |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2098 FlowGraph::kEffect); | 2099 FlowGraph::kEffect); |
| 2099 current_iterator()->RemoveCurrentFromGraph(); | 2100 current_iterator()->RemoveCurrentFromGraph(); |
| 2100 } | 2101 } |
| 2101 } | 2102 } |
| 2102 } | 2103 } |
| 2103 } | 2104 } |
| 2104 | 2105 |
| 2105 #endif // DART_PRECOMPILER | 2106 #endif // DART_PRECOMPILER |
| 2106 | 2107 |
| 2107 } // namespace dart | 2108 } // namespace dart |
| OLD | NEW |