Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: src/transitions.cc

Issue 801813002: Using PropertyKind in transitions instead of PropertyType. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/transitions.h ('k') | src/transitions-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/transitions.cc
diff --git a/src/transitions.cc b/src/transitions.cc
index df463a305b2405ecaf890992b903eef60f74e3f0..c8c63d7ba2f07abd2b46f0c4d7fe5074bd9f677a 100644
--- a/src/transitions.cc
+++ b/src/transitions.cc
@@ -105,7 +105,7 @@ Handle<TransitionArray> TransitionArray::Insert(Handle<Map> map,
is_special_transition
? map->transitions()->SearchSpecial(Symbol::cast(*name),
&insertion_index)
- : map->transitions()->Search(details.type(), *name,
+ : map->transitions()->Search(details.kind(), *name,
details.attributes(), &insertion_index);
if (index == kNotFound) {
++new_nof;
@@ -157,7 +157,7 @@ Handle<TransitionArray> TransitionArray::Insert(Handle<Map> map,
index = is_special_transition ? map->transitions()->SearchSpecial(
Symbol::cast(*name), &insertion_index)
: map->transitions()->Search(
- details.type(), *name,
+ details.kind(), *name,
details.attributes(), &insertion_index);
if (index == kNotFound) {
++new_nof;
@@ -189,22 +189,18 @@ Handle<TransitionArray> TransitionArray::Insert(Handle<Map> map,
}
-int TransitionArray::SearchDetails(int transition, PropertyType type,
+int TransitionArray::SearchDetails(int transition, PropertyKind kind,
PropertyAttributes attributes,
int* out_insertion_index) {
int nof_transitions = number_of_transitions();
DCHECK(transition < nof_transitions);
Name* key = GetKey(transition);
- bool is_data = type == FIELD || type == CONSTANT;
for (; transition < nof_transitions && GetKey(transition) == key;
transition++) {
Map* target = GetTarget(transition);
PropertyDetails target_details = GetTargetDetails(key, target);
- bool target_is_data =
- target_details.type() == FIELD || target_details.type() == CONSTANT;
-
- int cmp = CompareDetails(is_data, attributes, target_is_data,
+ int cmp = CompareDetails(kind, attributes, target_details.kind(),
target_details.attributes());
if (cmp == 0) {
return transition;
@@ -217,13 +213,13 @@ int TransitionArray::SearchDetails(int transition, PropertyType type,
}
-int TransitionArray::Search(PropertyType type, Name* name,
+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;
}
- return SearchDetails(transition, type, attributes, out_insertion_index);
+ return SearchDetails(transition, kind, attributes, out_insertion_index);
}
} } // namespace v8::internal
« no previous file with comments | « src/transitions.h ('k') | src/transitions-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698