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

Unified Diff: test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc

Issue 2611313002: [complier] Enable parallel eager inner function compilation with compiler dispatcher. (Closed)
Patch Set: Rebase Created 3 years, 11 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/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc
diff --git a/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc b/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc
index ca9f44725b88b2468fc54ebd7ea1fd30d29f13e9..538a5ebb120d8d9c68a1cdcc038bc461442835b8 100644
--- a/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc
+++ b/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc
@@ -112,7 +112,9 @@ TEST_F(CompilerDispatcherJobTest, StateTransitions) {
job->Parse();
ASSERT_TRUE(job->status() == CompileJobStatus::kParsed);
ASSERT_TRUE(job->FinalizeParsingOnMainThread());
- ASSERT_TRUE(job->status() == CompileJobStatus::kReadyToAnalyse);
+ ASSERT_TRUE(job->status() == CompileJobStatus::kReadyToAnalyze);
+ ASSERT_TRUE(job->AnalyzeOnMainThread());
+ ASSERT_TRUE(job->status() == CompileJobStatus::kAnalyzed);
ASSERT_TRUE(job->PrepareToCompileOnMainThread());
ASSERT_TRUE(job->status() == CompileJobStatus::kReadyToCompile);
job->Compile();
@@ -153,6 +155,7 @@ TEST_F(CompilerDispatcherJobTest, ScopeChain) {
job->PrepareToParseOnMainThread();
job->Parse();
ASSERT_TRUE(job->FinalizeParsingOnMainThread());
+ ASSERT_TRUE(job->AnalyzeOnMainThread());
ASSERT_TRUE(job->PrepareToCompileOnMainThread());
ASSERT_TRUE(job->status() == CompileJobStatus::kReadyToCompile);
@@ -189,6 +192,7 @@ TEST_F(CompilerDispatcherJobTest, CompileAndRun) {
job->PrepareToParseOnMainThread();
job->Parse();
job->FinalizeParsingOnMainThread();
+ job->AnalyzeOnMainThread();
job->PrepareToCompileOnMainThread();
job->Compile();
ASSERT_TRUE(job->FinalizeCompilingOnMainThread());
@@ -201,7 +205,7 @@ TEST_F(CompilerDispatcherJobTest, CompileAndRun) {
ASSERT_TRUE(job->status() == CompileJobStatus::kInitial);
}
-TEST_F(CompilerDispatcherJobTest, CompileFailureToPrepare) {
+TEST_F(CompilerDispatcherJobTest, CompileFailureToAnalyse) {
std::string raw_script("() { var a = ");
for (int i = 0; i < 100000; i++) {
raw_script += "'x' + ";
@@ -215,7 +219,7 @@ TEST_F(CompilerDispatcherJobTest, CompileFailureToPrepare) {
job->PrepareToParseOnMainThread();
job->Parse();
job->FinalizeParsingOnMainThread();
- ASSERT_FALSE(job->PrepareToCompileOnMainThread());
+ ASSERT_FALSE(job->AnalyzeOnMainThread());
ASSERT_TRUE(job->status() == CompileJobStatus::kFailed);
ASSERT_TRUE(i_isolate()->has_pending_exception());
@@ -238,6 +242,7 @@ TEST_F(CompilerDispatcherJobTest, CompileFailureToFinalize) {
job->PrepareToParseOnMainThread();
job->Parse();
job->FinalizeParsingOnMainThread();
+ job->AnalyzeOnMainThread();
job->PrepareToCompileOnMainThread();
job->Compile();
ASSERT_FALSE(job->FinalizeCompilingOnMainThread());
@@ -282,6 +287,7 @@ TEST_F(CompilerDispatcherJobTest, CompileOnBackgroundThread) {
job->PrepareToParseOnMainThread();
job->Parse();
job->FinalizeParsingOnMainThread();
+ job->AnalyzeOnMainThread();
job->PrepareToCompileOnMainThread();
base::Semaphore semaphore(0);
@@ -314,6 +320,7 @@ TEST_F(CompilerDispatcherJobTest, LazyInnerFunctions) {
job->PrepareToParseOnMainThread();
job->Parse();
ASSERT_TRUE(job->FinalizeParsingOnMainThread());
+ ASSERT_TRUE(job->AnalyzeOnMainThread());
ASSERT_TRUE(job->PrepareToCompileOnMainThread());
job->Compile();
ASSERT_TRUE(job->FinalizeCompilingOnMainThread());
« no previous file with comments | « test/mjsunit/regress/regress-618657.js ('k') | test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698