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

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

Issue 11434082: Adapt code flushing tests to new code aging. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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 | « no previous file | 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 f5bac2c5def2edcc1246805cdcdb82c79c17cccb..dc5247d19709ceb93d759af578a722c84cd1cf86 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -1116,8 +1116,10 @@ TEST(TestCodeFlushingIncrementalScavenge) {
// Bump the code age so that flushing is triggered while the function
// object is still located in new-space.
const int kAgingThreshold = 6;
- function->shared()->set_code_age(kAgingThreshold);
- function2->shared()->set_code_age(kAgingThreshold);
+ for (int i = 0; i < kAgingThreshold; i++) {
+ function->shared()->code()->MakeOlder(static_cast<MarkingParity>(i % 2));
+ function2->shared()->code()->MakeOlder(static_cast<MarkingParity>(i % 2));
+ }
// Simulate incremental marking so that the functions are enqueued as
// code flushing candidates. Then kill one of the functions. Finally
@@ -1166,7 +1168,9 @@ TEST(TestCodeFlushingIncrementalAbort) {
// Bump the code age so that flushing is triggered.
const int kAgingThreshold = 6;
- function->shared()->set_code_age(kAgingThreshold);
+ for (int i = 0; i < kAgingThreshold; i++) {
+ function->shared()->code()->MakeOlder(static_cast<MarkingParity>(i % 2));
+ }
// Simulate incremental marking so that the function is enqueued as
// code flushing candidate.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698