diff --git a/src/transitions-inl.h b/src/transitions-inl.h index 3f8272ff9b..b34c894417 100644 --- a/src/transitions-inl.h +++ b/src/transitions-inl.h @@ -98,6 +98,17 @@ PropertyDetails TransitionsAccessor::GetTargetDetails(Name* name, Map* target) { return descriptors->GetDetails(descriptor); } +// static +PropertyDetails TransitionsAccessor::GetSimpleTargetDetails(Map* transition) { + return transition->GetLastDescriptorDetails(); +} + +// static +Name* TransitionsAccessor::GetSimpleTransitionKey(Map* transition) { + int descriptor = transition->LastAdded(); + return transition->instance_descriptors()->GetKey(descriptor); +} + // static Map* TransitionsAccessor::GetTargetFromRaw(MaybeObject raw) { return Map::cast(raw->GetHeapObjectAssumeWeak()); @@ -146,6 +157,15 @@ bool TransitionArray::GetTargetIfExists(int transition_number, Isolate* isolate, return true; } +int TransitionArray::SearchNameForTesting(Name* name, + int* out_insertion_index) { + return SearchName(name, out_insertion_index); +} + +int TransitionArray::SearchSpecial(Symbol* symbol, int* out_insertion_index) { + return SearchName(symbol, out_insertion_index); +} + int TransitionArray::SearchName(Name* name, int* out_insertion_index) { DCHECK(name->IsUniqueName()); return internal::Search(this, name, number_of_entries(), @@ -200,6 +220,14 @@ void TransitionArray::Set(int transition_number, Name* key, WeakFixedArray::Set(ToTargetIndex(transition_number), target); } +Name* TransitionArray::GetSortedKey(int transition_number) { + return GetKey(transition_number); +} + +int TransitionArray::number_of_entries() const { + return number_of_transitions(); +} + int TransitionArray::Capacity() { if (length() <= kFirstIndex) return 0; return (length() - kFirstIndex) / kEntrySize; diff --git a/src/transitions.h b/src/transitions.h index dcb31dc966..197f4bddb5 100644 --- a/src/transitions.h +++ b/src/transitions.h @@ -145,14 +145,9 @@ class TransitionsAccessor { friend class MarkCompactCollector; // For HasSimpleTransitionTo. friend class TransitionArray; - static inline PropertyDetails GetSimpleTargetDetails(Map* transition) { - return transition->GetLastDescriptorDetails(); - } + static inline PropertyDetails GetSimpleTargetDetails(Map* transition); - static inline Name* GetSimpleTransitionKey(Map* transition) { - int descriptor = transition->LastAdded(); - return transition->instance_descriptors()->GetKey(descriptor); - } + static inline Name* GetSimpleTransitionKey(Map* transition); static inline Map* GetTargetFromRaw(MaybeObject raw); @@ -224,12 +219,11 @@ class TransitionArray : public WeakFixedArray { Map** target); // Required for templatized Search interface. - static const int kNotFound = -1; - Name* GetSortedKey(int transition_number) { - return GetKey(transition_number); - } + static constexpr int kNotFound = -1; + + inline Name* GetSortedKey(int transition_number); int GetSortedKeyIndex(int transition_number) { return transition_number; } - inline int number_of_entries() const { return number_of_transitions(); } + inline int number_of_entries() const; #ifdef DEBUG bool IsSortedNoDuplicates(int valid_entries = -1); #endif @@ -261,9 +255,7 @@ class TransitionArray : public WeakFixedArray { } inline int SearchNameForTesting(Name* name, - int* out_insertion_index = nullptr) { - return SearchName(name, out_insertion_index); - } + int* out_insertion_index = nullptr); private: friend class Factory; @@ -303,9 +295,7 @@ class TransitionArray : public WeakFixedArray { // Search a non-property transition (like elements kind, observe or frozen // transitions). - inline int SearchSpecial(Symbol* symbol, int* out_insertion_index = nullptr) { - return SearchName(symbol, out_insertion_index); - } + inline int SearchSpecial(Symbol* symbol, int* out_insertion_index = nullptr); // Search a first transition for a given property name. inline int SearchName(Name* name, int* out_insertion_index = nullptr); int SearchDetails(int transition, PropertyKind kind, diff --git a/tools/generate-header-include-checks.py b/tools/generate-header-include-checks.py index a76be5be1c..e83648304b 100755 --- a/tools/generate-header-include-checks.py +++ b/tools/generate-header-include-checks.py @@ -28,8 +28,6 @@ OUT_DIR = os.path.join(V8_DIR, 'check-header-includes') AUTO_EXCLUDE = [ # flag-definitions.h needs a mode set for being included. 'src/flag-definitions.h', - # blacklist of headers we need to fix (https://crbug.com/v8/7965). - 'src/transitions.h', ] AUTO_EXCLUDE_PATTERNS = [ 'src/base/atomicops_internals_.*',