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

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

Issue 1470773003: Optimize ClearNonLiveReferences: do not compact prototype transitions in GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 5 years, 1 month 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.cc ('k') | no next file » | 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 c7625888b1103fc9640db86771534046d636f9f1..08097c33ae51cd43c99843b0942f21d874edca8f 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -2620,12 +2620,6 @@ TEST(InstanceOfStubWriteBarrier) {
}
-static int NumberOfProtoTransitions(Map* map) {
- return TransitionArray::NumberOfPrototypeTransitions(
- TransitionArray::GetPrototypeTransitions(map));
-}
-
-
TEST(PrototypeTransitionClearing) {
if (FLAG_never_compact) return;
CcTest::InitializeVM();
@@ -2639,7 +2633,8 @@ TEST(PrototypeTransitionClearing) {
v8::Utils::OpenHandle(*v8::Local<v8::Object>::Cast(
CcTest::global()->Get(ctx, v8_str("base")).ToLocalChecked()));
- int initialTransitions = NumberOfProtoTransitions(baseObject->map());
+ int initialTransitions =
+ TransitionArray::NumberOfPrototypeTransitionsForTest(baseObject->map());
CompileRun(
"var live = [];"
@@ -2651,12 +2646,14 @@ TEST(PrototypeTransitionClearing) {
"}");
// Verify that only dead prototype transitions are cleared.
- CHECK_EQ(initialTransitions + 10,
- NumberOfProtoTransitions(baseObject->map()));
+ CHECK_EQ(
+ initialTransitions + 10,
+ TransitionArray::NumberOfPrototypeTransitionsForTest(baseObject->map()));
CcTest::heap()->CollectAllGarbage();
const int transitions = 10 - 3;
- CHECK_EQ(initialTransitions + transitions,
- NumberOfProtoTransitions(baseObject->map()));
+ CHECK_EQ(
+ initialTransitions + transitions,
+ TransitionArray::NumberOfPrototypeTransitionsForTest(baseObject->map()));
// Verify that prototype transitions array was compacted.
FixedArray* trans =
« no previous file with comments | « src/transitions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698