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

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

Issue 980573002: Simplify and compact transitions storage (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix -Werror=pedantic ( rebase 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 c7aaf29d6643e420254aeefa6d4df871ed6ca99e..3be173453a5b407b6614af55f0dd348594df0030 100644
--- a/test/cctest/test-migrations.cc
+++ b/test/cctest/test-migrations.cc
@@ -342,9 +342,10 @@ class Expectations {
SetDataField(property_index, attributes, representation, heap_type);
Handle<String> name = MakeName("prop", property_index);
- int t = map->SearchTransition(kData, *name, attributes);
- CHECK_NE(TransitionArray::kNotFound, t);
- return handle(map->GetTransition(t));
+ Map* target =
+ TransitionArray::SearchTransition(*map, kData, *name, attributes);
+ CHECK(target != NULL);
+ return handle(target);
}
Handle<Map> AddAccessorConstant(Handle<Map> map,
@@ -1477,9 +1478,10 @@ TEST(ReconfigurePropertySplitMapTransitionsOverflow) {
}
Handle<String> name = MakeName("prop", i);
- int t = map2->SearchTransition(kData, *name, NONE);
- CHECK_NE(TransitionArray::kNotFound, t);
- map2 = handle(map2->GetTransition(t));
+ Map* target =
+ TransitionArray::SearchTransition(*map2, kData, *name, NONE);
+ CHECK(target != NULL);
+ map2 = handle(target);
}
map2 = Map::ReconfigureProperty(map2, kSplitProp, kData, NONE,
@@ -1499,12 +1501,12 @@ TEST(ReconfigurePropertySplitMapTransitionsOverflow) {
// Fill in transition tree of |map2| so that it can't have more transitions.
for (int i = 0; i < TransitionArray::kMaxNumberOfTransitions; i++) {
- CHECK(map2->CanHaveMoreTransitions());
+ CHECK(TransitionArray::CanHaveMoreTransitions(map2));
Handle<String> name = MakeName("foo", i);
Map::CopyWithField(map2, name, any_type, NONE, Representation::Smi(),
INSERT_TRANSITION).ToHandleChecked();
}
- CHECK(!map2->CanHaveMoreTransitions());
+ CHECK(!TransitionArray::CanHaveMoreTransitions(map2));
// 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