| 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_H_ | 5 #ifndef V8_TRANSITIONS_H_ |
| 6 #define V8_TRANSITIONS_H_ | 6 #define V8_TRANSITIONS_H_ |
| 7 | 7 |
| 8 #include "src/checks.h" | 8 #include "src/checks.h" |
| 9 #include "src/elements-kind.h" | 9 #include "src/elements-kind.h" |
| 10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 if (proto_transitions->length() == 0) return 0; | 112 if (proto_transitions->length() == 0) return 0; |
| 113 Object* raw = proto_transitions->get(kProtoTransitionNumberOfEntriesOffset); | 113 Object* raw = proto_transitions->get(kProtoTransitionNumberOfEntriesOffset); |
| 114 return Smi::cast(raw)->value(); | 114 return Smi::cast(raw)->value(); |
| 115 } | 115 } |
| 116 static int NumberOfPrototypeTransitionsForTest(Map* map); | 116 static int NumberOfPrototypeTransitionsForTest(Map* map); |
| 117 | 117 |
| 118 static void SetNumberOfPrototypeTransitions(FixedArray* proto_transitions, | 118 static void SetNumberOfPrototypeTransitions(FixedArray* proto_transitions, |
| 119 int value); | 119 int value); |
| 120 | 120 |
| 121 inline FixedArray* GetPrototypeTransitions(); | 121 inline FixedArray* GetPrototypeTransitions(); |
| 122 inline void SetPrototypeTransitions( | 122 inline void SetPrototypeTransitions(FixedArray* prototype_transitions); |
| 123 FixedArray* prototype_transitions, | |
| 124 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); | |
| 125 inline Object** GetPrototypeTransitionsSlot(); | 123 inline Object** GetPrototypeTransitionsSlot(); |
| 126 inline bool HasPrototypeTransitions(); | 124 inline bool HasPrototypeTransitions(); |
| 127 | 125 |
| 128 // ===== ITERATION ===== | 126 // ===== ITERATION ===== |
| 129 | 127 |
| 130 typedef void (*TraverseCallback)(Map* map, void* data); | 128 typedef void (*TraverseCallback)(Map* map, void* data); |
| 131 | 129 |
| 132 // Traverse the transition tree in postorder. | 130 // Traverse the transition tree in postorder. |
| 133 static void TraverseTransitionTree(Map* map, TraverseCallback callback, | 131 static void TraverseTransitionTree(Map* map, TraverseCallback callback, |
| 134 void* data) { | 132 void* data) { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 static void ZapTransitionArray(TransitionArray* transitions); | 317 static void ZapTransitionArray(TransitionArray* transitions); |
| 320 | 318 |
| 321 DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); | 319 DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); |
| 322 }; | 320 }; |
| 323 | 321 |
| 324 | 322 |
| 325 } // namespace internal | 323 } // namespace internal |
| 326 } // namespace v8 | 324 } // namespace v8 |
| 327 | 325 |
| 328 #endif // V8_TRANSITIONS_H_ | 326 #endif // V8_TRANSITIONS_H_ |
| OLD | NEW |