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/dart_entry.h" | 9 #include "vm/dart_entry.h" |
10 #include "vm/flow_graph_allocator.h" | 10 #include "vm/flow_graph_allocator.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 return externalizable ? EffectSet::Externalization() : EffectSet::None(); | 126 return externalizable ? EffectSet::Externalization() : EffectSet::None(); |
127 } | 127 } |
128 | 128 |
129 | 129 |
130 bool CheckClassInstr::IsNullCheck() const { | 130 bool CheckClassInstr::IsNullCheck() const { |
131 if (unary_checks().NumberOfChecks() != 1) { | 131 if (unary_checks().NumberOfChecks() != 1) { |
132 return false; | 132 return false; |
133 } | 133 } |
134 CompileType* in_type = value()->Type(); | 134 CompileType* in_type = value()->Type(); |
135 const intptr_t cid = unary_checks().GetCidAt(0); | 135 const intptr_t cid = unary_checks().GetCidAt(0); |
| 136 // Performance check: use CheckSmiInstr instead. |
| 137 ASSERT(cid != kSmiCid); |
136 return in_type->is_nullable() && (in_type->ToNullableCid() == cid); | 138 return in_type->is_nullable() && (in_type->ToNullableCid() == cid); |
137 } | 139 } |
138 | 140 |
139 | 141 |
140 bool GuardFieldInstr::AttributesEqual(Instruction* other) const { | 142 bool GuardFieldInstr::AttributesEqual(Instruction* other) const { |
141 return field().raw() == other->AsGuardField()->field().raw(); | 143 return field().raw() == other->AsGuardField()->field().raw(); |
142 } | 144 } |
143 | 145 |
144 | 146 |
145 bool AssertAssignableInstr::AttributesEqual(Instruction* other) const { | 147 bool AssertAssignableInstr::AttributesEqual(Instruction* other) const { |
(...skipping 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2599 default: | 2601 default: |
2600 UNREACHABLE(); | 2602 UNREACHABLE(); |
2601 } | 2603 } |
2602 return kPowRuntimeEntry; | 2604 return kPowRuntimeEntry; |
2603 } | 2605 } |
2604 | 2606 |
2605 | 2607 |
2606 #undef __ | 2608 #undef __ |
2607 | 2609 |
2608 } // namespace dart | 2610 } // namespace dart |
OLD | NEW |