| Index: src/compiler-dispatcher/compiler-dispatcher-job.h
|
| diff --git a/src/compiler-dispatcher/compiler-dispatcher-job.h b/src/compiler-dispatcher/compiler-dispatcher-job.h
|
| index e0a2677f8e51aba4a9f1d53da1fb9f48b1e5e71e..a7f24181a614b874c8a6c2655de9883e1832e793 100644
|
| --- a/src/compiler-dispatcher/compiler-dispatcher-job.h
|
| +++ b/src/compiler-dispatcher/compiler-dispatcher-job.h
|
| @@ -16,9 +16,11 @@
|
| namespace v8 {
|
| namespace internal {
|
|
|
| +class AstValueFactory;
|
| class CompilerDispatcherTracer;
|
| class CompilationInfo;
|
| class CompilationJob;
|
| +class FunctionLiteral;
|
| class Isolate;
|
| class ParseInfo;
|
| class Parser;
|
| @@ -32,7 +34,8 @@ enum class CompileJobStatus {
|
| kInitial,
|
| kReadyToParse,
|
| kParsed,
|
| - kReadyToAnalyse,
|
| + kReadyToAnalyze,
|
| + kAnalyzed,
|
| kReadyToCompile,
|
| kCompiled,
|
| kFailed,
|
| @@ -41,9 +44,14 @@ enum class CompileJobStatus {
|
|
|
| class V8_EXPORT_PRIVATE CompilerDispatcherJob {
|
| public:
|
| + // Creates a CompilerDispatcherJob in the initial state.
|
| CompilerDispatcherJob(Isolate* isolate, CompilerDispatcherTracer* tracer,
|
| Handle<SharedFunctionInfo> shared,
|
| size_t max_stack_size);
|
| + // Creates a CompilerDispatcherJob in the analyzed state.
|
| + CompilerDispatcherJob(Isolate* isolate, CompilerDispatcherTracer* tracer,
|
| + Handle<SharedFunctionInfo> shared,
|
| + FunctionLiteral* literal, size_t max_stack_size);
|
| ~CompilerDispatcherJob();
|
|
|
| CompileJobStatus status() const { return status_; }
|
| @@ -58,11 +66,15 @@ class V8_EXPORT_PRIVATE CompilerDispatcherJob {
|
| // Transition from kReadyToParse to kParsed.
|
| void Parse();
|
|
|
| - // Transition from kParsed to kReadyToAnalyse (or kFailed). Returns false
|
| + // Transition from kParsed to kReadyToAnalyze (or kFailed). Returns false
|
| // when transitioning to kFailed. In that case, an exception is pending.
|
| bool FinalizeParsingOnMainThread();
|
|
|
| - // Transition from kReadyToAnalyse to kReadyToCompile (or kFailed). Returns
|
| + // Transition from kReadyToAnalyze to kAnalyzed (or kFailed). Returns
|
| + // false when transitioning to kFailed. In that case, an exception is pending.
|
| + bool AnalyzeOnMainThread();
|
| +
|
| + // Transition from kAnalyzed to kReadyToCompile (or kFailed). Returns
|
| // false when transitioning to kFailed. In that case, an exception is pending.
|
| bool PrepareToCompileOnMainThread();
|
|
|
| @@ -86,7 +98,7 @@ class V8_EXPORT_PRIVATE CompilerDispatcherJob {
|
| private:
|
| FRIEND_TEST(CompilerDispatcherJobTest, ScopeChain);
|
|
|
| - CompileJobStatus status_ = CompileJobStatus::kInitial;
|
| + CompileJobStatus status_;
|
| Isolate* isolate_;
|
| CompilerDispatcherTracer* tracer_;
|
| Handle<SharedFunctionInfo> shared_; // Global handle.
|
|
|