Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 41fe7b155136aa3759f679181bcdf982b1ea11ff..43d23545efb1bcd6441a9fd39f1c77047974fce0 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -2629,15 +2629,9 @@ void Map::LookupDescriptor(JSObject* holder, |
void Map::LookupTransition(JSObject* holder, |
Name* name, |
LookupResult* result) { |
- if (HasTransitionArray()) { |
- TransitionArray* transition_array = transitions(); |
- int number = transition_array->Search(name); |
- if (number != TransitionArray::kNotFound) { |
- return result->TransitionResult( |
- holder, transition_array->GetTarget(number)); |
- } |
- } |
- result->NotFound(); |
+ int transition_index = this->SearchTransition(name); |
+ if (transition_index == TransitionArray::kNotFound) return result->NotFound(); |
+ result->TransitionResult(holder, this->GetTransition(transition_index)); |
} |
@@ -4904,6 +4898,12 @@ Map* Map::GetTransition(int transition_index) { |
} |
+int Map::SearchTransition(Name* name) { |
+ if (HasTransitionArray()) return transitions()->Search(name); |
+ return TransitionArray::kNotFound; |
+} |
+ |
+ |
MaybeObject* Map::set_elements_transition_map(Map* transitioned_map) { |
TransitionArray* transitions; |
MaybeObject* maybe_transitions = AddTransition( |