| Index: src/transitions.cc
|
| diff --git a/src/transitions.cc b/src/transitions.cc
|
| index fc24b288677f62d78dab2aed40786ed4c001e62e..e63769e4af9640f1330e87fe4e701bf153a15d36 100644
|
| --- a/src/transitions.cc
|
| +++ b/src/transitions.cc
|
| @@ -159,20 +159,21 @@ void TransitionArray::Insert(Handle<Map> map, Handle<Name> name,
|
| // static
|
| Map* TransitionArray::SearchTransition(Map* map, PropertyKind kind, Name* name,
|
| PropertyAttributes attributes) {
|
| + DCHECK(name->IsUniqueName());
|
| Object* raw_transitions = map->raw_transitions();
|
| if (IsSimpleTransition(raw_transitions)) {
|
| Map* target = GetSimpleTransition(raw_transitions);
|
| Name* key = GetSimpleTransitionKey(target);
|
| - if (!key->Equals(name)) return NULL;
|
| + if (key != name) return nullptr;
|
| PropertyDetails details = GetSimpleTargetDetails(target);
|
| - if (details.attributes() != attributes) return NULL;
|
| - if (details.kind() != kind) return NULL;
|
| + if (details.attributes() != attributes) return nullptr;
|
| + if (details.kind() != kind) return nullptr;
|
| return target;
|
| }
|
| if (IsFullTransitionArray(raw_transitions)) {
|
| TransitionArray* transitions = TransitionArray::cast(raw_transitions);
|
| int transition = transitions->Search(kind, name, attributes);
|
| - if (transition == kNotFound) return NULL;
|
| + if (transition == kNotFound) return nullptr;
|
| return transitions->GetTarget(transition);
|
| }
|
| return NULL;
|
| @@ -195,6 +196,7 @@ Map* TransitionArray::SearchSpecial(Map* map, Symbol* name) {
|
| // static
|
| Handle<Map> TransitionArray::FindTransitionToField(Handle<Map> map,
|
| Handle<Name> name) {
|
| + DCHECK(name->IsUniqueName());
|
| DisallowHeapAllocation no_gc;
|
| Map* target = SearchTransition(*map, kData, *name, NONE);
|
| if (target == NULL) return Handle<Map>::null();
|
| @@ -545,9 +547,7 @@ int TransitionArray::Search(PropertyKind kind, Name* name,
|
| PropertyAttributes attributes,
|
| int* out_insertion_index) {
|
| int transition = SearchName(name, out_insertion_index);
|
| - if (transition == kNotFound) {
|
| - return kNotFound;
|
| - }
|
| + if (transition == kNotFound) return kNotFound;
|
| return SearchDetails(transition, kind, attributes, out_insertion_index);
|
| }
|
| } // namespace internal
|
|
|