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

Side by Side Diff: src/compiler-dispatcher/compiler-dispatcher-job.h

Issue 2191443003: Add a prepare to parse step to CompilerDispatcherJob (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler-dispatcher/compiler-dispatcher-job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_ 5 #ifndef V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_
6 #define V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_ 6 #define V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_
7 7
8 #include <memory>
9
8 #include "src/base/macros.h" 10 #include "src/base/macros.h"
9
10 #include "src/handles.h" 11 #include "src/handles.h"
11 12
12 namespace v8 { 13 namespace v8 {
13 namespace internal { 14 namespace internal {
14 15
15 class CompilationInfo; 16 class CompilationInfo;
16 class Isolate; 17 class Isolate;
17 class JSFunction; 18 class JSFunction;
19 class ParseInfo;
20 class UnicodeCache;
21 class Zone;
18 22
19 enum class CompileJobStatus { 23 enum class CompileJobStatus {
20 kInitial, 24 kInitial,
25 kReadyToParse,
21 }; 26 };
22 27
23 class CompilerDispatcherJob { 28 class CompilerDispatcherJob {
24 public: 29 public:
25 CompilerDispatcherJob(Isolate* isolate, Handle<JSFunction> function); 30 CompilerDispatcherJob(Isolate* isolate, Handle<JSFunction> function);
26 ~CompilerDispatcherJob(); 31 ~CompilerDispatcherJob();
27 32
28 CompileJobStatus status() const { return status_; } 33 CompileJobStatus status() const { return status_; }
29 34
35 // Transition from kInitial to kReadyToParse.
36 void PrepareToParseOnMainThread();
37
30 private: 38 private:
31 CompileJobStatus status_ = CompileJobStatus::kInitial; 39 CompileJobStatus status_ = CompileJobStatus::kInitial;
32 Isolate* isolate_; 40 Isolate* isolate_;
33 Handle<JSFunction> function_; // Global handle. 41 Handle<JSFunction> function_; // Global handle.
34 42
43 // Members required for parsing.
44 std::unique_ptr<UnicodeCache> unicode_cache_;
45 std::unique_ptr<Zone> zone_;
46 std::unique_ptr<ParseInfo> parse_info_;
47
35 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherJob); 48 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherJob);
36 }; 49 };
37 50
38 } // namespace internal 51 } // namespace internal
39 } // namespace v8 52 } // namespace v8
40 53
41 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_ 54 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler-dispatcher/compiler-dispatcher-job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698