Chromium Code Reviews| Index: src/transitions.h |
| diff --git a/src/transitions.h b/src/transitions.h |
| index c5f9a30018a16cf02006c49a9cedb644ac3e7986..05b03d199d9a321199948da8cc8f93fc555748af 100644 |
| --- a/src/transitions.h |
| +++ b/src/transitions.h |
| @@ -98,9 +98,17 @@ class TransitionArray: public FixedArray { |
| static Handle<TransitionArray> Insert(Handle<Map> map, Handle<Name> name, |
| Handle<Map> target, |
| SimpleTransitionFlag flag); |
| + // Search a transition for a given type, property name and attributes. |
| + int Search(PropertyType type, Name* name, PropertyAttributes attributes, |
| + int* out_insertion_index = NULL); |
| + |
| + // Search a non-property transition (like elements kind, observe or frozen |
| + // transitions). |
| + inline int SearchSpecial(Symbol* symbol, int* out_insertion_index = NULL) { |
| + return SearchName(symbol, out_insertion_index); |
| + } |
| - // Search a transition for a given property name. |
| - inline int Search(Name* name, int* out_insertion_index = NULL); |
| + static inline PropertyDetails GetTargetDetails(Name* name, Map* target); |
| // Allocates a TransitionArray. |
| static Handle<TransitionArray> Allocate(Isolate* isolate, |
| @@ -167,6 +175,10 @@ class TransitionArray: public FixedArray { |
| bool IsSortedNoDuplicates(int valid_entries = -1); |
| bool IsConsistentWithBackPointers(Map* current_map); |
| bool IsEqualTo(TransitionArray* other); |
| + |
| + // Returns true for a non-property transitions like elements kind, observed |
| + // or frozen transitions. |
| + static inline bool IsSpecialTransition(Name* name); |
| #endif |
| // The maximum number of transitions we want in a transition array (should |
| @@ -202,6 +214,31 @@ class TransitionArray: public FixedArray { |
| Handle<Map> target, |
| SimpleTransitionFlag flag); |
| + // Search a first transition for a given property name. |
| + inline int SearchName(Name* name, int* out_insertion_index = NULL); |
| + int SearchDetails(int transition, PropertyType type, |
| + PropertyAttributes attributes, int* out_insertion_index); |
| + |
| + // Compares two sets of keys, returns -1 if set1 is "less" than set2, |
| + // 0 if set1 equal to set2 and 1 otherwise. |
|
Toon Verwaest
2014/11/04 10:50:50
Sets? It just compares 2 keys with extra info than
Igor Sheludko
2014/11/04 16:44:16
Done.
|
| + static inline int CompareKeys(Name* key1, uint32_t hash1, |
| + bool is_data_property1, |
| + PropertyAttributes attributes1, Name* key2, |
| + uint32_t hash2, bool is_data_property2, |
| + PropertyAttributes attributes2); |
| + |
| + // Compares keys, returns -1 if key1 is "less" than key2, |
| + // 0 if key1 equal to key2 and 1 otherwise. |
| + static inline int CompareNames(Name* key1, uint32_t hash1, Name* key2, |
| + uint32_t hash2); |
| + |
| + // Compares two sets of details, returns -1 if set1 is "less" than set2, |
| + // 0 if set1 equal to set2 and 1 otherwise. |
| + static inline int CompareDetails(bool is_data_property1, |
| + PropertyAttributes attributes1, |
| + bool is_data_property2, |
| + PropertyAttributes attributes2); |
| + |
| inline void NoIncrementalWriteBarrierSet(int transition_number, |
| Name* key, |
| Map* target); |