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

Unified Diff: test/cctest/test-heap.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 | « src/transitions-inl.h ('k') | test/cctest/test-migrations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index b5a86746ee3e71006e9d1be233ae82d3fdacc597..d7c24156a3d2aed5fad23b591898cf7e510f4902 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -2141,12 +2141,6 @@
}
-static int NumberOfProtoTransitions(Map* map) {
- return TransitionArray::NumberOfPrototypeTransitions(
- TransitionArray::GetPrototypeTransitions(map));
-}
-
-
TEST(PrototypeTransitionClearing) {
if (FLAG_never_compact) return;
CcTest::InitializeVM();
@@ -2159,7 +2153,7 @@
v8::Utils::OpenHandle(
*v8::Handle<v8::Object>::Cast(
CcTest::global()->Get(v8_str("base"))));
- int initialTransitions = NumberOfProtoTransitions(baseObject->map());
+ int initialTransitions = baseObject->map()->NumberOfProtoTransitions();
CompileRun(
"var live = [];"
@@ -2172,17 +2166,16 @@
// Verify that only dead prototype transitions are cleared.
CHECK_EQ(initialTransitions + 10,
- NumberOfProtoTransitions(baseObject->map()));
+ baseObject->map()->NumberOfProtoTransitions());
CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
const int transitions = 10 - 3;
CHECK_EQ(initialTransitions + transitions,
- NumberOfProtoTransitions(baseObject->map()));
+ baseObject->map()->NumberOfProtoTransitions());
// Verify that prototype transitions array was compacted.
- FixedArray* trans =
- TransitionArray::GetPrototypeTransitions(baseObject->map());
+ FixedArray* trans = baseObject->map()->GetPrototypeTransitions();
for (int i = initialTransitions; i < initialTransitions + transitions; i++) {
- int j = TransitionArray::kProtoTransitionHeaderSize + i;
+ int j = Map::kProtoTransitionHeaderSize + i;
CHECK(trans->get(j)->IsMap());
}
@@ -2200,7 +2193,7 @@
i::FLAG_always_compact = true;
Handle<Map> map(baseObject->map());
CHECK(!space->LastPage()->Contains(
- TransitionArray::GetPrototypeTransitions(*map)->address()));
+ map->GetPrototypeTransitions()->address()));
CHECK(space->LastPage()->Contains(prototype->address()));
}
@@ -2883,7 +2876,7 @@
static int CountMapTransitions(Map* map) {
- return TransitionArray::NumberOfTransitions(map->raw_transitions());
+ return map->transitions()->number_of_transitions();
}
@@ -3062,7 +3055,7 @@
CompileRun("o = new F;"
"root = new F");
root = GetByName("root");
- DCHECK(TransitionArray::IsSimpleTransition(root->map()->raw_transitions()));
+ DCHECK(root->map()->transitions()->IsSimpleTransition());
AddPropertyTo(2, root, "happy");
// Count number of live transitions after marking. Note that one transition
« no previous file with comments | « src/transitions-inl.h ('k') | test/cctest/test-migrations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698