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/elements.h" | 8 #include "src/elements.h" |
9 #include "src/objects.h" | 9 #include "src/objects.h" |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 STATIC_ASSERT(FAST_SMI_ELEMENTS + kFastElementsKindPackedToHoley == | 95 STATIC_ASSERT(FAST_SMI_ELEMENTS + kFastElementsKindPackedToHoley == |
96 FAST_HOLEY_SMI_ELEMENTS); | 96 FAST_HOLEY_SMI_ELEMENTS); |
97 STATIC_ASSERT(FAST_DOUBLE_ELEMENTS + kFastElementsKindPackedToHoley == | 97 STATIC_ASSERT(FAST_DOUBLE_ELEMENTS + kFastElementsKindPackedToHoley == |
98 FAST_HOLEY_DOUBLE_ELEMENTS); | 98 FAST_HOLEY_DOUBLE_ELEMENTS); |
99 STATIC_ASSERT(FAST_ELEMENTS + kFastElementsKindPackedToHoley == | 99 STATIC_ASSERT(FAST_ELEMENTS + kFastElementsKindPackedToHoley == |
100 FAST_HOLEY_ELEMENTS); | 100 FAST_HOLEY_ELEMENTS); |
101 } | 101 } |
102 }; | 102 }; |
103 | 103 |
104 | 104 |
105 static LazyInstance<ElementsKind*, | 105 static base::LazyInstance<ElementsKind*, |
Jakob Kummerow
2014/06/05 11:49:06
IWYU?
| |
106 InitializeFastElementsKindSequence>::type | 106 InitializeFastElementsKindSequence>::type |
107 fast_elements_kind_sequence = LAZY_INSTANCE_INITIALIZER; | 107 fast_elements_kind_sequence = LAZY_INSTANCE_INITIALIZER; |
108 | 108 |
109 | 109 |
110 ElementsKind GetFastElementsKindFromSequenceIndex(int sequence_number) { | 110 ElementsKind GetFastElementsKindFromSequenceIndex(int sequence_number) { |
111 ASSERT(sequence_number >= 0 && | 111 ASSERT(sequence_number >= 0 && |
112 sequence_number < kFastElementsKindCount); | 112 sequence_number < kFastElementsKindCount); |
113 return fast_elements_kind_sequence.Get()[sequence_number]; | 113 return fast_elements_kind_sequence.Get()[sequence_number]; |
114 } | 114 } |
115 | 115 |
116 | 116 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 return false; | 201 return false; |
202 default: | 202 default: |
203 return false; | 203 return false; |
204 } | 204 } |
205 } | 205 } |
206 return false; | 206 return false; |
207 } | 207 } |
208 | 208 |
209 | 209 |
210 } } // namespace v8::internal | 210 } } // namespace v8::internal |
OLD | NEW |