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

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

Issue 2534763003: [Interpreter] Add bytecode aging and use it enable CompilationCache for bytecode (Closed)
Patch Set: Created 4 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
« src/objects.cc ('K') | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/heap/test-heap.cc
diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc
index 73770a7e3b438edc125fc590804f7589d4ba0dd4..769b64af899a0d735eccfbc4a88486559dd67d4b 100644
--- a/test/cctest/heap/test-heap.cc
+++ b/test/cctest/heap/test-heap.cc
@@ -1619,7 +1619,6 @@ TEST(TestUseOfIncrementalBarrierOnCompileLazy) {
TEST(CompilationCacheCachingBehavior) {
// If we do not flush code, or have the compilation cache turned off, this
// test is invalid.
- i::FLAG_allow_natives_syntax = true;
if (!FLAG_flush_code || !FLAG_compilation_cache) {
return;
}
@@ -1663,13 +1662,17 @@ TEST(CompilationCacheCachingBehavior) {
}
// Progress code age until it's old and ready for GC.
- while (!info.ToHandleChecked()->code()->IsOld()) {
+ const int kAgingThreshold = 6;
+ for (int i = 0; i < kAgingThreshold; i++) {
// To guarantee progress, we have to MakeOlder with different parities.
// We can't just use NO_MARKING_PARITY, since e.g. kExecutedOnceCodeAge is
// always NO_MARKING_PARITY and the code age only progresses if the parity
// is different.
info.ToHandleChecked()->code()->MakeOlder(ODD_MARKING_PARITY);
info.ToHandleChecked()->code()->MakeOlder(EVEN_MARKING_PARITY);
+ if (info.ToHandleChecked()->HasBytecodeArray()) {
+ info.ToHandleChecked()->bytecode_array()->MakeOlder();
+ }
}
CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
« src/objects.cc ('K') | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698