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

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

Issue 1053063003: Make --always-opt also optimize top-level code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Skip failing tests. Created 5 years, 8 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
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index ba10d7cc799109beeb7e287c204023fa6992707b..a086c3ec617142db00252cb462ba2a06506ac4e3 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -3433,7 +3433,8 @@ TEST(UseAsmUseCount) {
"var foo = 1;\n"
"\"use asm\";\n" // Only the first one counts.
"function bar() { \"use asm\"; var baz = 1; }");
- CHECK_EQ(2, use_counts[v8::Isolate::kUseAsm]);
+ // Optimizing will double-count because the source is parsed twice.
+ CHECK_EQ(i::FLAG_always_opt ? 4 : 2, use_counts[v8::Isolate::kUseAsm]);
}
@@ -3452,7 +3453,8 @@ TEST(UseConstLegacyCount) {
" const z = 1; var baz = 1;\n"
" function q() { const k = 42; }\n"
"}");
- CHECK_EQ(4, use_counts[v8::Isolate::kLegacyConst]);
+ // Optimizing will double-count because the source is parsed twice.
+ CHECK_EQ(i::FLAG_always_opt ? 8 : 4, use_counts[v8::Isolate::kLegacyConst]);
}

Powered by Google App Engine
This is Rietveld 408576698