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_TRANSITIONS_INL_H_ | 5 #ifndef V8_TRANSITIONS_INL_H_ |
6 #define V8_TRANSITIONS_INL_H_ | 6 #define V8_TRANSITIONS_INL_H_ |
7 | 7 |
8 #include "src/transitions.h" | 8 #include "src/transitions.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 | 108 |
109 #ifdef DEBUG | 109 #ifdef DEBUG |
110 bool TransitionArray::IsSpecialTransition(Name* name) { | 110 bool TransitionArray::IsSpecialTransition(Name* name) { |
111 if (!name->IsSymbol()) return false; | 111 if (!name->IsSymbol()) return false; |
112 Heap* heap = name->GetHeap(); | 112 Heap* heap = name->GetHeap(); |
113 return name == heap->nonextensible_symbol() || | 113 return name == heap->nonextensible_symbol() || |
114 name == heap->sealed_symbol() || name == heap->frozen_symbol() || | 114 name == heap->sealed_symbol() || name == heap->frozen_symbol() || |
115 name == heap->elements_transition_symbol() || | 115 name == heap->elements_transition_symbol() || |
116 name == heap->strict_function_transition_symbol() || | 116 name == heap->strict_function_transition_symbol() || |
117 name == heap->strong_function_transition_symbol() || | |
118 name == heap->observed_symbol(); | 117 name == heap->observed_symbol(); |
119 } | 118 } |
120 #endif | 119 #endif |
121 | 120 |
122 | 121 |
123 int TransitionArray::CompareKeys(Name* key1, uint32_t hash1, PropertyKind kind1, | 122 int TransitionArray::CompareKeys(Name* key1, uint32_t hash1, PropertyKind kind1, |
124 PropertyAttributes attributes1, Name* key2, | 123 PropertyAttributes attributes1, Name* key2, |
125 uint32_t hash2, PropertyKind kind2, | 124 uint32_t hash2, PropertyKind kind2, |
126 PropertyAttributes attributes2) { | 125 PropertyAttributes attributes2) { |
127 int cmp = CompareNames(key1, hash1, key2, hash2); | 126 int cmp = CompareNames(key1, hash1, key2, hash2); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 176 |
178 void TransitionArray::SetNumberOfTransitions(int number_of_transitions) { | 177 void TransitionArray::SetNumberOfTransitions(int number_of_transitions) { |
179 DCHECK(number_of_transitions <= Capacity(this)); | 178 DCHECK(number_of_transitions <= Capacity(this)); |
180 set(kTransitionLengthIndex, Smi::FromInt(number_of_transitions)); | 179 set(kTransitionLengthIndex, Smi::FromInt(number_of_transitions)); |
181 } | 180 } |
182 | 181 |
183 } // namespace internal | 182 } // namespace internal |
184 } // namespace v8 | 183 } // namespace v8 |
185 | 184 |
186 #endif // V8_TRANSITIONS_INL_H_ | 185 #endif // V8_TRANSITIONS_INL_H_ |
OLD | NEW |