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

Unified Diff: test/cctest/test-migrations.cc

Issue 982143002: Revert of Simplify and compact transitions storage (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « test/cctest/test-heap.cc ('k') | test/cctest/test-transitions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-migrations.cc
diff --git a/test/cctest/test-migrations.cc b/test/cctest/test-migrations.cc
index 3be173453a5b407b6614af55f0dd348594df0030..c7aaf29d6643e420254aeefa6d4df871ed6ca99e 100644
--- a/test/cctest/test-migrations.cc
+++ b/test/cctest/test-migrations.cc
@@ -342,10 +342,9 @@
SetDataField(property_index, attributes, representation, heap_type);
Handle<String> name = MakeName("prop", property_index);
- Map* target =
- TransitionArray::SearchTransition(*map, kData, *name, attributes);
- CHECK(target != NULL);
- return handle(target);
+ int t = map->SearchTransition(kData, *name, attributes);
+ CHECK_NE(TransitionArray::kNotFound, t);
+ return handle(map->GetTransition(t));
}
Handle<Map> AddAccessorConstant(Handle<Map> map,
@@ -1478,10 +1477,9 @@
}
Handle<String> name = MakeName("prop", i);
- Map* target =
- TransitionArray::SearchTransition(*map2, kData, *name, NONE);
- CHECK(target != NULL);
- map2 = handle(target);
+ int t = map2->SearchTransition(kData, *name, NONE);
+ CHECK_NE(TransitionArray::kNotFound, t);
+ map2 = handle(map2->GetTransition(t));
}
map2 = Map::ReconfigureProperty(map2, kSplitProp, kData, NONE,
@@ -1501,12 +1499,12 @@
// Fill in transition tree of |map2| so that it can't have more transitions.
for (int i = 0; i < TransitionArray::kMaxNumberOfTransitions; i++) {
- CHECK(TransitionArray::CanHaveMoreTransitions(map2));
+ CHECK(map2->CanHaveMoreTransitions());
Handle<String> name = MakeName("foo", i);
Map::CopyWithField(map2, name, any_type, NONE, Representation::Smi(),
INSERT_TRANSITION).ToHandleChecked();
}
- CHECK(!TransitionArray::CanHaveMoreTransitions(map2));
+ CHECK(!map2->CanHaveMoreTransitions());
// Try to update |map|, since there is no place for propX transition at |map2|
// |map| should become "copy-generalized".
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/cctest/test-transitions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698