| 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/checks.h" | 8 #include "src/checks.h" |
| 9 #include "src/ostreams.h" | |
| 10 | 9 |
| 11 namespace v8 { | 10 namespace v8 { |
| 12 namespace internal { | 11 namespace internal { |
| 13 | 12 |
| 14 enum ElementsKind { | 13 enum ElementsKind { |
| 15 // The "fast" kind for elements that only contain SMI values. Must be first | 14 // The "fast" kind for elements that only contain SMI values. Must be first |
| 16 // to make it possible to efficiently check maps for this kind. | 15 // to make it possible to efficiently check maps for this kind. |
| 17 FAST_SMI_ELEMENTS, | 16 FAST_SMI_ELEMENTS, |
| 18 FAST_HOLEY_SMI_ELEMENTS, | 17 FAST_HOLEY_SMI_ELEMENTS, |
| 19 | 18 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 bool allow_only_packed) { | 243 bool allow_only_packed) { |
| 245 return IsFastElementsKind(elements_kind) && | 244 return IsFastElementsKind(elements_kind) && |
| 246 (elements_kind != TERMINAL_FAST_ELEMENTS_KIND && | 245 (elements_kind != TERMINAL_FAST_ELEMENTS_KIND && |
| 247 (!allow_only_packed || elements_kind != FAST_ELEMENTS)); | 246 (!allow_only_packed || elements_kind != FAST_ELEMENTS)); |
| 248 } | 247 } |
| 249 | 248 |
| 250 | 249 |
| 251 } } // namespace v8::internal | 250 } } // namespace v8::internal |
| 252 | 251 |
| 253 #endif // V8_ELEMENTS_KIND_H_ | 252 #endif // V8_ELEMENTS_KIND_H_ |
| OLD | NEW |