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

Unified Diff: src/objects-debug.cc

Issue 661133002: TransitionArray now uses <is_data_property, name, attributes> tuple as a key, which allows to have … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 2 months 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/objects.cc ('k') | src/objects-inl.h » ('j') | src/transitions-inl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 92bd97a87fcdde55ecb64f79f1469d6c99731f77..5ac554d89699b66470fe6aa10b95a2dbbd2029a6 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -1184,15 +1184,26 @@ bool DescriptorArray::IsSortedNoDuplicates(int valid_entries) {
bool TransitionArray::IsSortedNoDuplicates(int valid_entries) {
DCHECK(valid_entries == -1);
Name* current_key = NULL;
+ bool current_is_data_property = false;
+ PropertyAttributes current_attributes = NONE;
uint32_t current = 0;
for (int i = 0; i < number_of_transitions(); i++) {
Name* key = GetSortedKey(i);
- if (key == current_key) {
+ Map* target = GetTarget(i);
+ PropertyDetails details = GetTargetDetails(key, target);
+ bool is_data_property =
+ details.type() == FIELD || details.type() == CONSTANT;
+ PropertyAttributes attributes = details.attributes();
+
+ if ((key == current_key) && (attributes == current_attributes) &&
+ (is_data_property == current_is_data_property)) {
OFStream os(stdout);
PrintTransitions(os);
return false;
}
current_key = key;
+ current_is_data_property = is_data_property;
+ current_attributes = attributes;
uint32_t hash = GetSortedKey(i)->Hash();
if (hash < current) {
OFStream os(stdout);
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | src/transitions-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698