| 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 30 matching lines...) Expand all  Loading... | 
|   41   int GetSortedKeyIndex(int transition_number) { return transition_number; } |   41   int GetSortedKeyIndex(int transition_number) { return transition_number; } | 
|   42  |   42  | 
|   43   Name* GetSortedKey(int transition_number) { |   43   Name* GetSortedKey(int transition_number) { | 
|   44     return GetKey(transition_number); |   44     return GetKey(transition_number); | 
|   45   } |   45   } | 
|   46  |   46  | 
|   47   inline Map* GetTarget(int transition_number); |   47   inline Map* GetTarget(int transition_number); | 
|   48   inline void SetTarget(int transition_number, Map* target); |   48   inline void SetTarget(int transition_number, Map* target); | 
|   49  |   49  | 
|   50   inline PropertyDetails GetTargetDetails(int transition_number); |   50   inline PropertyDetails GetTargetDetails(int transition_number); | 
 |   51   inline Object* GetTargetValue(int transition_number); | 
|   51  |   52  | 
|   52   inline bool HasElementsTransition(); |   53   inline bool HasElementsTransition(); | 
|   53  |   54  | 
|   54   inline Object* back_pointer_storage(); |   55   inline Object* back_pointer_storage(); | 
|   55   inline void set_back_pointer_storage( |   56   inline void set_back_pointer_storage( | 
|   56       Object* back_pointer, |   57       Object* back_pointer, | 
|   57       WriteBarrierMode mode = UPDATE_WRITE_BARRIER); |   58       WriteBarrierMode mode = UPDATE_WRITE_BARRIER); | 
|   58  |   59  | 
|   59   inline FixedArray* GetPrototypeTransitions(); |   60   inline FixedArray* GetPrototypeTransitions(); | 
|   60   inline void SetPrototypeTransitions( |   61   inline void SetPrototypeTransitions( | 
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  132   // Layout for the full transition array header. |  133   // Layout for the full transition array header. | 
|  133   static const int kPrototypeTransitionsOffset = kBackPointerStorageOffset + |  134   static const int kPrototypeTransitionsOffset = kBackPointerStorageOffset + | 
|  134                                                  kPointerSize; |  135                                                  kPointerSize; | 
|  135  |  136  | 
|  136   // Layout of map transition entries in full transition arrays. |  137   // Layout of map transition entries in full transition arrays. | 
|  137   static const int kTransitionKey = 0; |  138   static const int kTransitionKey = 0; | 
|  138   static const int kTransitionTarget = 1; |  139   static const int kTransitionTarget = 1; | 
|  139   static const int kTransitionSize = 2; |  140   static const int kTransitionSize = 2; | 
|  140  |  141  | 
|  141 #ifdef OBJECT_PRINT |  142 #ifdef OBJECT_PRINT | 
 |  143   // For our gdb macros, we should perhaps change these in the future. | 
 |  144   void Print(); | 
 |  145  | 
|  142   // Print all the transitions. |  146   // Print all the transitions. | 
|  143   void PrintTransitions(std::ostream& os);  // NOLINT |  147   void PrintTransitions(std::ostream& os, bool print_header = true);  // NOLINT | 
|  144 #endif |  148 #endif | 
|  145  |  149  | 
|  146 #ifdef DEBUG |  150 #ifdef DEBUG | 
|  147   bool IsSortedNoDuplicates(int valid_entries = -1); |  151   bool IsSortedNoDuplicates(int valid_entries = -1); | 
|  148   bool IsConsistentWithBackPointers(Map* current_map); |  152   bool IsConsistentWithBackPointers(Map* current_map); | 
|  149   bool IsEqualTo(TransitionArray* other); |  153   bool IsEqualTo(TransitionArray* other); | 
|  150 #endif |  154 #endif | 
|  151  |  155  | 
|  152   // The maximum number of transitions we want in a transition array (should |  156   // The maximum number of transitions we want in a transition array (should | 
|  153   // fit in a page). |  157   // fit in a page). | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  185                                                 int origin_transition, |  189                                                 int origin_transition, | 
|  186                                                 int target_transition); |  190                                                 int target_transition); | 
|  187  |  191  | 
|  188   DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); |  192   DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); | 
|  189 }; |  193 }; | 
|  190  |  194  | 
|  191  |  195  | 
|  192 } }  // namespace v8::internal |  196 } }  // namespace v8::internal | 
|  193  |  197  | 
|  194 #endif  // V8_TRANSITIONS_H_ |  198 #endif  // V8_TRANSITIONS_H_ | 
| OLD | NEW |