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 19 matching lines...) Expand all Loading... |
30 } | 30 } |
31 | 31 |
32 | 32 |
33 FixedArray* TransitionArray::GetPrototypeTransitions() { | 33 FixedArray* TransitionArray::GetPrototypeTransitions() { |
34 DCHECK(HasPrototypeTransitions()); // Callers must check first. | 34 DCHECK(HasPrototypeTransitions()); // Callers must check first. |
35 Object* prototype_transitions = get(kPrototypeTransitionsIndex); | 35 Object* prototype_transitions = get(kPrototypeTransitionsIndex); |
36 return FixedArray::cast(prototype_transitions); | 36 return FixedArray::cast(prototype_transitions); |
37 } | 37 } |
38 | 38 |
39 | 39 |
40 void TransitionArray::SetPrototypeTransitions(FixedArray* transitions, | 40 void TransitionArray::SetPrototypeTransitions(FixedArray* transitions) { |
41 WriteBarrierMode mode) { | |
42 DCHECK(transitions->IsFixedArray()); | 41 DCHECK(transitions->IsFixedArray()); |
43 set(kPrototypeTransitionsIndex, transitions, mode); | 42 set(kPrototypeTransitionsIndex, transitions); |
44 } | 43 } |
45 | 44 |
46 | 45 |
47 Object** TransitionArray::GetPrototypeTransitionsSlot() { | 46 Object** TransitionArray::GetPrototypeTransitionsSlot() { |
48 return RawFieldOfElementAt(kPrototypeTransitionsIndex); | 47 return RawFieldOfElementAt(kPrototypeTransitionsIndex); |
49 } | 48 } |
50 | 49 |
51 | 50 |
52 Object** TransitionArray::GetKeySlot(int transition_number) { | 51 Object** TransitionArray::GetKeySlot(int transition_number) { |
53 DCHECK(transition_number < number_of_transitions()); | 52 DCHECK(transition_number < number_of_transitions()); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 175 |
177 void TransitionArray::SetNumberOfTransitions(int number_of_transitions) { | 176 void TransitionArray::SetNumberOfTransitions(int number_of_transitions) { |
178 DCHECK(number_of_transitions <= Capacity(this)); | 177 DCHECK(number_of_transitions <= Capacity(this)); |
179 set(kTransitionLengthIndex, Smi::FromInt(number_of_transitions)); | 178 set(kTransitionLengthIndex, Smi::FromInt(number_of_transitions)); |
180 } | 179 } |
181 | 180 |
182 } // namespace internal | 181 } // namespace internal |
183 } // namespace v8 | 182 } // namespace v8 |
184 | 183 |
185 #endif // V8_TRANSITIONS_INL_H_ | 184 #endif // V8_TRANSITIONS_INL_H_ |
OLD | NEW |