OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_ELEMENTS_KIND_H_ | 5 #ifndef V8_ELEMENTS_KIND_H_ |
6 #define V8_ELEMENTS_KIND_H_ | 6 #define V8_ELEMENTS_KIND_H_ |
7 | 7 |
8 #include "src/base/macros.h" | 8 #include "src/base/macros.h" |
9 #include "src/checks.h" | 9 #include "src/checks.h" |
10 | 10 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 } | 151 } |
152 | 152 |
153 | 153 |
154 inline bool IsHoleyElementsKind(ElementsKind kind) { | 154 inline bool IsHoleyElementsKind(ElementsKind kind) { |
155 return IsFastHoleyElementsKind(kind) || | 155 return IsFastHoleyElementsKind(kind) || |
156 kind == DICTIONARY_ELEMENTS; | 156 kind == DICTIONARY_ELEMENTS; |
157 } | 157 } |
158 | 158 |
159 | 159 |
160 inline bool IsFastPackedElementsKind(ElementsKind kind) { | 160 inline bool IsFastPackedElementsKind(ElementsKind kind) { |
161 return kind == FAST_SMI_ELEMENTS || | 161 return kind == FAST_SMI_ELEMENTS || kind == FAST_DOUBLE_ELEMENTS || |
162 kind == FAST_DOUBLE_ELEMENTS || | 162 kind == FAST_ELEMENTS; |
163 kind == FAST_ELEMENTS; | |
164 } | 163 } |
165 | 164 |
166 | 165 |
167 inline ElementsKind GetPackedElementsKind(ElementsKind holey_kind) { | 166 inline ElementsKind GetPackedElementsKind(ElementsKind holey_kind) { |
168 if (holey_kind == FAST_HOLEY_SMI_ELEMENTS) { | 167 if (holey_kind == FAST_HOLEY_SMI_ELEMENTS) { |
169 return FAST_SMI_ELEMENTS; | 168 return FAST_SMI_ELEMENTS; |
170 } | 169 } |
171 if (holey_kind == FAST_HOLEY_DOUBLE_ELEMENTS) { | 170 if (holey_kind == FAST_HOLEY_DOUBLE_ELEMENTS) { |
172 return FAST_DOUBLE_ELEMENTS; | 171 return FAST_DOUBLE_ELEMENTS; |
173 } | 172 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 213 |
215 inline bool IsTransitionableFastElementsKind(ElementsKind from_kind) { | 214 inline bool IsTransitionableFastElementsKind(ElementsKind from_kind) { |
216 return IsFastElementsKind(from_kind) && | 215 return IsFastElementsKind(from_kind) && |
217 from_kind != TERMINAL_FAST_ELEMENTS_KIND; | 216 from_kind != TERMINAL_FAST_ELEMENTS_KIND; |
218 } | 217 } |
219 | 218 |
220 | 219 |
221 } } // namespace v8::internal | 220 } } // namespace v8::internal |
222 | 221 |
223 #endif // V8_ELEMENTS_KIND_H_ | 222 #endif // V8_ELEMENTS_KIND_H_ |
OLD | NEW |