| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/flow_graph_allocator.h" | 9 #include "vm/flow_graph_allocator.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 } | 823 } |
| 824 | 824 |
| 825 | 825 |
| 826 // Only known == targets return a Boolean. | 826 // Only known == targets return a Boolean. |
| 827 RawAbstractType* EqualityCompareComp::CompileType() const { | 827 RawAbstractType* EqualityCompareComp::CompileType() const { |
| 828 if ((receiver_class_id() == kSmiCid) || | 828 if ((receiver_class_id() == kSmiCid) || |
| 829 (receiver_class_id() == kDoubleCid) || | 829 (receiver_class_id() == kDoubleCid) || |
| 830 (receiver_class_id() == kNumberCid)) { | 830 (receiver_class_id() == kNumberCid)) { |
| 831 return Type::BoolType(); | 831 return Type::BoolType(); |
| 832 } | 832 } |
| 833 if (HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid)) { | |
| 834 return Type::BoolType(); | |
| 835 } | |
| 836 return Type::DynamicType(); | 833 return Type::DynamicType(); |
| 837 } | 834 } |
| 838 | 835 |
| 839 | 836 |
| 840 intptr_t EqualityCompareComp::ResultCid() const { | 837 intptr_t EqualityCompareComp::ResultCid() const { |
| 841 if ((receiver_class_id() == kSmiCid) || | 838 if ((receiver_class_id() == kSmiCid) || |
| 842 (receiver_class_id() == kDoubleCid) || | 839 (receiver_class_id() == kDoubleCid) || |
| 843 (receiver_class_id() == kNumberCid)) { | 840 (receiver_class_id() == kNumberCid)) { |
| 844 // Known/library equalities that are guaranteed to return Boolean. | 841 // Known/library equalities that are guaranteed to return Boolean. |
| 845 return kBoolCid; | 842 return kBoolCid; |
| 846 } | 843 } |
| 847 if (HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid)) { | |
| 848 return kBoolCid; | |
| 849 } | |
| 850 return kDynamicCid; | 844 return kDynamicCid; |
| 851 } | 845 } |
| 852 | 846 |
| 853 | 847 |
| 854 RawAbstractType* RelationalOpComp::CompileType() const { | 848 RawAbstractType* RelationalOpComp::CompileType() const { |
| 855 if ((operands_class_id() == kSmiCid) || | 849 if ((operands_class_id() == kSmiCid) || |
| 856 (operands_class_id() == kDoubleCid) || | 850 (operands_class_id() == kDoubleCid) || |
| 857 (operands_class_id() == kNumberCid)) { | 851 (operands_class_id() == kNumberCid)) { |
| 858 // Known/library relational ops that are guaranteed to return Boolean. | 852 // Known/library relational ops that are guaranteed to return Boolean. |
| 859 return Type::BoolType(); | 853 return Type::BoolType(); |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 use->AddToEnvUseList(); | 1574 use->AddToEnvUseList(); |
| 1581 } | 1575 } |
| 1582 } | 1576 } |
| 1583 instr->set_env(copy); | 1577 instr->set_env(copy); |
| 1584 } | 1578 } |
| 1585 | 1579 |
| 1586 | 1580 |
| 1587 #undef __ | 1581 #undef __ |
| 1588 | 1582 |
| 1589 } // namespace dart | 1583 } // namespace dart |
| OLD | NEW |