| 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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 } | 782 } |
| 783 | 783 |
| 784 | 784 |
| 785 // Only known == targets return a Boolean. | 785 // Only known == targets return a Boolean. |
| 786 RawAbstractType* EqualityCompareComp::CompileType() const { | 786 RawAbstractType* EqualityCompareComp::CompileType() const { |
| 787 if ((receiver_class_id() == kSmiCid) || | 787 if ((receiver_class_id() == kSmiCid) || |
| 788 (receiver_class_id() == kDoubleCid) || | 788 (receiver_class_id() == kDoubleCid) || |
| 789 (receiver_class_id() == kNumberCid)) { | 789 (receiver_class_id() == kNumberCid)) { |
| 790 return Type::BoolInterface(); | 790 return Type::BoolInterface(); |
| 791 } | 791 } |
| 792 if (HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid)) { | 792 const intptr_t dart_object_cid = |
| 793 Class::Handle(Isolate::Current()->object_store()->object_class()).id(); |
| 794 if (HasICData() && ic_data()->AllTargetsHaveSameOwner(dart_object_cid)) { |
| 793 return Type::BoolInterface(); | 795 return Type::BoolInterface(); |
| 794 } | 796 } |
| 795 return Type::DynamicType(); | 797 return Type::DynamicType(); |
| 796 } | 798 } |
| 797 | 799 |
| 798 | 800 |
| 799 intptr_t EqualityCompareComp::ResultCid() const { | 801 intptr_t EqualityCompareComp::ResultCid() const { |
| 800 if ((receiver_class_id() == kSmiCid) || | 802 if ((receiver_class_id() == kSmiCid) || |
| 801 (receiver_class_id() == kDoubleCid) || | 803 (receiver_class_id() == kDoubleCid) || |
| 802 (receiver_class_id() == kNumberCid)) { | 804 (receiver_class_id() == kNumberCid)) { |
| 803 // Known/library equalities that are guaranteed to return Boolean. | 805 // Known/library equalities that are guaranteed to return Boolean. |
| 804 return kBoolCid; | 806 return kBoolCid; |
| 805 } | 807 } |
| 806 if (HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid)) { | 808 const intptr_t dart_object_cid = |
| 809 Class::Handle(Isolate::Current()->object_store()->object_class()).id(); |
| 810 if (HasICData() && ic_data()->AllTargetsHaveSameOwner(dart_object_cid)) { |
| 807 return kBoolCid; | 811 return kBoolCid; |
| 808 } | 812 } |
| 809 return kDynamicCid; | 813 return kDynamicCid; |
| 810 } | 814 } |
| 811 | 815 |
| 812 | 816 |
| 813 RawAbstractType* RelationalOpComp::CompileType() const { | 817 RawAbstractType* RelationalOpComp::CompileType() const { |
| 814 if ((operands_class_id() == kSmiCid) || | 818 if ((operands_class_id() == kSmiCid) || |
| 815 (operands_class_id() == kDoubleCid) || | 819 (operands_class_id() == kDoubleCid) || |
| 816 (operands_class_id() == kNumberCid)) { | 820 (operands_class_id() == kNumberCid)) { |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1511 fixed_parameter_count_(fixed_parameter_count) { | 1515 fixed_parameter_count_(fixed_parameter_count) { |
| 1512 for (intptr_t i = 0; i < definitions.length(); ++i) { | 1516 for (intptr_t i = 0; i < definitions.length(); ++i) { |
| 1513 values_.Add(UseDefinition(definitions[i])); | 1517 values_.Add(UseDefinition(definitions[i])); |
| 1514 } | 1518 } |
| 1515 } | 1519 } |
| 1516 | 1520 |
| 1517 | 1521 |
| 1518 #undef __ | 1522 #undef __ |
| 1519 | 1523 |
| 1520 } // namespace dart | 1524 } // namespace dart |
| OLD | NEW |