| 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/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2684 } | 2684 } |
| 2685 | 2685 |
| 2686 | 2686 |
| 2687 | 2687 |
| 2688 ComparisonInstr* TestSmiInstr::CopyWithNewOperands(Value* new_left, | 2688 ComparisonInstr* TestSmiInstr::CopyWithNewOperands(Value* new_left, |
| 2689 Value* new_right) { | 2689 Value* new_right) { |
| 2690 return new TestSmiInstr(token_pos(), kind(), new_left, new_right); | 2690 return new TestSmiInstr(token_pos(), kind(), new_left, new_right); |
| 2691 } | 2691 } |
| 2692 | 2692 |
| 2693 | 2693 |
| 2694 |
| 2695 ComparisonInstr* TestCidsInstr::CopyWithNewOperands(Value* new_left, |
| 2696 Value* new_right) { |
| 2697 return new TestCidsInstr(token_pos(), |
| 2698 kind(), |
| 2699 new_left, |
| 2700 cid_results(), |
| 2701 deopt_id()); |
| 2702 } |
| 2703 |
| 2704 |
| 2705 bool TestCidsInstr::AttributesEqual(Instruction* other) const { |
| 2706 TestCidsInstr* other_instr = other->AsTestCids(); |
| 2707 ASSERT(other != NULL); |
| 2708 if (kind() != other_instr->kind()) { |
| 2709 return false; |
| 2710 } |
| 2711 if (cid_results().length() != other_instr->cid_results().length()) { |
| 2712 return false; |
| 2713 } |
| 2714 for (intptr_t i = 0; i < cid_results().length(); i++) { |
| 2715 if (cid_results()[i] != other_instr->cid_results()[i]) { |
| 2716 return false; |
| 2717 } |
| 2718 } |
| 2719 return true; |
| 2720 } |
| 2721 |
| 2722 |
| 2694 bool IfThenElseInstr::Supports(ComparisonInstr* comparison, | 2723 bool IfThenElseInstr::Supports(ComparisonInstr* comparison, |
| 2695 Value* v1, | 2724 Value* v1, |
| 2696 Value* v2) { | 2725 Value* v2) { |
| 2697 bool is_smi_result = BindsToSmiConstant(v1) && BindsToSmiConstant(v2); | 2726 bool is_smi_result = BindsToSmiConstant(v1) && BindsToSmiConstant(v2); |
| 2698 if (comparison->IsStrictCompare()) { | 2727 if (comparison->IsStrictCompare()) { |
| 2699 // Strict comparison with number checks calls a stub and is not supported | 2728 // Strict comparison with number checks calls a stub and is not supported |
| 2700 // by if-conversion. | 2729 // by if-conversion. |
| 2701 return is_smi_result | 2730 return is_smi_result |
| 2702 && !comparison->AsStrictCompare()->needs_number_check(); | 2731 && !comparison->AsStrictCompare()->needs_number_check(); |
| 2703 } | 2732 } |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3251 case Token::kTRUNCDIV: return 0; | 3280 case Token::kTRUNCDIV: return 0; |
| 3252 case Token::kMOD: return 1; | 3281 case Token::kMOD: return 1; |
| 3253 default: UNIMPLEMENTED(); return -1; | 3282 default: UNIMPLEMENTED(); return -1; |
| 3254 } | 3283 } |
| 3255 } | 3284 } |
| 3256 | 3285 |
| 3257 | 3286 |
| 3258 #undef __ | 3287 #undef __ |
| 3259 | 3288 |
| 3260 } // namespace dart | 3289 } // namespace dart |
| OLD | NEW |