| 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/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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // TODO(fschneider): Make sure ic_data are sorted to hit more cases. | 96 // TODO(fschneider): Make sure ic_data are sorted to hit more cases. |
| 97 if (unary_checks().GetReceiverClassIdAt(i) != | 97 if (unary_checks().GetReceiverClassIdAt(i) != |
| 98 other_check->unary_checks().GetReceiverClassIdAt(i)) { | 98 other_check->unary_checks().GetReceiverClassIdAt(i)) { |
| 99 return false; | 99 return false; |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 return true; | 102 return true; |
| 103 } | 103 } |
| 104 | 104 |
| 105 | 105 |
| 106 bool CheckClassInstr::AffectedBySideEffect() const { |
| 107 // The class-id of string objects is not invariant: Externalization of strings |
| 108 // via the API can change the class-id. |
| 109 return unary_checks().HasReceiverClassId(kOneByteStringCid) |
| 110 || unary_checks().HasReceiverClassId(kTwoByteStringCid); |
| 111 } |
| 112 |
| 113 |
| 106 bool CheckArrayBoundInstr::AttributesEqual(Instruction* other) const { | 114 bool CheckArrayBoundInstr::AttributesEqual(Instruction* other) const { |
| 107 CheckArrayBoundInstr* other_check = other->AsCheckArrayBound(); | 115 CheckArrayBoundInstr* other_check = other->AsCheckArrayBound(); |
| 108 ASSERT(other_check != NULL); | 116 ASSERT(other_check != NULL); |
| 109 return array_type() == other_check->array_type(); | 117 return array_type() == other_check->array_type(); |
| 110 } | 118 } |
| 111 | 119 |
| 112 | 120 |
| 113 bool AssertAssignableInstr::AttributesEqual(Instruction* other) const { | 121 bool AssertAssignableInstr::AttributesEqual(Instruction* other) const { |
| 114 AssertAssignableInstr* other_assert = other->AsAssertAssignable(); | 122 AssertAssignableInstr* other_assert = other->AsAssertAssignable(); |
| 115 ASSERT(other_assert != NULL); | 123 ASSERT(other_assert != NULL); |
| (...skipping 2574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2690 return ByteArray::length_offset(); | 2698 return ByteArray::length_offset(); |
| 2691 default: | 2699 default: |
| 2692 UNREACHABLE(); | 2700 UNREACHABLE(); |
| 2693 return -1; | 2701 return -1; |
| 2694 } | 2702 } |
| 2695 } | 2703 } |
| 2696 | 2704 |
| 2697 #undef __ | 2705 #undef __ |
| 2698 | 2706 |
| 2699 } // namespace dart | 2707 } // namespace dart |
| OLD | NEW |