| 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 #include "src/elements-kind.h" | 5 #include "src/elements-kind.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/base/lazy-instance.h" | 8 #include "src/base/lazy-instance.h" |
| 9 #include "src/elements.h" | 9 #include "src/elements.h" |
| 10 #include "src/objects.h" | 10 #include "src/objects.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 case FAST_HOLEY_DOUBLE_ELEMENTS: | 30 case FAST_HOLEY_DOUBLE_ELEMENTS: |
| 31 case FLOAT64_ELEMENTS: | 31 case FLOAT64_ELEMENTS: |
| 32 return 3; | 32 return 3; |
| 33 case FAST_SMI_ELEMENTS: | 33 case FAST_SMI_ELEMENTS: |
| 34 case FAST_ELEMENTS: | 34 case FAST_ELEMENTS: |
| 35 case FAST_HOLEY_SMI_ELEMENTS: | 35 case FAST_HOLEY_SMI_ELEMENTS: |
| 36 case FAST_HOLEY_ELEMENTS: | 36 case FAST_HOLEY_ELEMENTS: |
| 37 case DICTIONARY_ELEMENTS: | 37 case DICTIONARY_ELEMENTS: |
| 38 case FAST_SLOPPY_ARGUMENTS_ELEMENTS: | 38 case FAST_SLOPPY_ARGUMENTS_ELEMENTS: |
| 39 case SLOW_SLOPPY_ARGUMENTS_ELEMENTS: | 39 case SLOW_SLOPPY_ARGUMENTS_ELEMENTS: |
| 40 case FAST_STRING_WRAPPER_ELEMENTS: |
| 41 case SLOW_STRING_WRAPPER_ELEMENTS: |
| 40 return kPointerSizeLog2; | 42 return kPointerSizeLog2; |
| 43 case NO_ELEMENTS: |
| 44 UNREACHABLE(); |
| 45 return 0; |
| 41 } | 46 } |
| 42 UNREACHABLE(); | 47 UNREACHABLE(); |
| 43 return 0; | 48 return 0; |
| 44 } | 49 } |
| 45 | 50 |
| 46 | 51 |
| 47 int GetDefaultHeaderSizeForElementsKind(ElementsKind elements_kind) { | 52 int GetDefaultHeaderSizeForElementsKind(ElementsKind elements_kind) { |
| 48 STATIC_ASSERT(FixedArray::kHeaderSize == FixedDoubleArray::kHeaderSize); | 53 STATIC_ASSERT(FixedArray::kHeaderSize == FixedDoubleArray::kHeaderSize); |
| 49 | 54 |
| 50 if (IsFixedTypedArrayElementsKind(elements_kind)) { | 55 if (IsFixedTypedArrayElementsKind(elements_kind)) { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 default: | 152 default: |
| 148 return false; | 153 return false; |
| 149 } | 154 } |
| 150 } | 155 } |
| 151 return false; | 156 return false; |
| 152 } | 157 } |
| 153 | 158 |
| 154 | 159 |
| 155 } // namespace internal | 160 } // namespace internal |
| 156 } // namespace v8 | 161 } // namespace v8 |
| OLD | NEW |