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

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

Issue 2650883002: Reland: [Compiler] Enable handles created during parsing and scope analysis to be deferred. (Closed)
Patch Set: Remove unused variable Created 3 years, 10 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
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> 8 #include <memory>
9 9
10 #include "include/v8.h" 10 #include "include/v8.h"
11 #include "src/base/macros.h" 11 #include "src/base/macros.h"
12 #include "src/globals.h" 12 #include "src/globals.h"
13 #include "src/handles.h" 13 #include "src/handles.h"
14 #include "testing/gtest/include/gtest/gtest_prod.h" 14 #include "testing/gtest/include/gtest/gtest_prod.h"
15 15
16 namespace v8 { 16 namespace v8 {
17 namespace internal { 17 namespace internal {
18 18
19 class AstValueFactory; 19 class AstValueFactory;
20 class CompilerDispatcherTracer; 20 class CompilerDispatcherTracer;
21 class CompilationInfo; 21 class CompilationInfo;
22 class CompilationJob; 22 class CompilationJob;
23 class DeferredHandles;
23 class FunctionLiteral; 24 class FunctionLiteral;
24 class Isolate; 25 class Isolate;
25 class ParseInfo; 26 class ParseInfo;
26 class Parser; 27 class Parser;
27 class SharedFunctionInfo; 28 class SharedFunctionInfo;
28 class String; 29 class String;
29 class UnicodeCache; 30 class UnicodeCache;
30 class Utf16CharacterStream; 31 class Utf16CharacterStream;
31 32
32 enum class CompileJobStatus { 33 enum class CompileJobStatus {
(...skipping 10 matching lines...) Expand all
43 44
44 class V8_EXPORT_PRIVATE CompilerDispatcherJob { 45 class V8_EXPORT_PRIVATE CompilerDispatcherJob {
45 public: 46 public:
46 // Creates a CompilerDispatcherJob in the initial state. 47 // Creates a CompilerDispatcherJob in the initial state.
47 CompilerDispatcherJob(Isolate* isolate, CompilerDispatcherTracer* tracer, 48 CompilerDispatcherJob(Isolate* isolate, CompilerDispatcherTracer* tracer,
48 Handle<SharedFunctionInfo> shared, 49 Handle<SharedFunctionInfo> shared,
49 size_t max_stack_size); 50 size_t max_stack_size);
50 // Creates a CompilerDispatcherJob in the analyzed state. 51 // Creates a CompilerDispatcherJob in the analyzed state.
51 CompilerDispatcherJob(Isolate* isolate, CompilerDispatcherTracer* tracer, 52 CompilerDispatcherJob(Isolate* isolate, CompilerDispatcherTracer* tracer,
52 Handle<SharedFunctionInfo> shared, 53 Handle<SharedFunctionInfo> shared,
53 FunctionLiteral* literal, size_t max_stack_size); 54 FunctionLiteral* literal,
55 std::shared_ptr<Zone> parse_zone,
56 std::shared_ptr<DeferredHandles> parse_handles,
57 std::shared_ptr<DeferredHandles> compile_handles,
58 size_t max_stack_size);
54 ~CompilerDispatcherJob(); 59 ~CompilerDispatcherJob();
55 60
56 CompileJobStatus status() const { return status_; } 61 CompileJobStatus status() const { return status_; }
57 62
58 // Returns true if this CompilerDispatcherJob was created for the given 63 // Returns true if this CompilerDispatcherJob was created for the given
59 // function. 64 // function.
60 bool IsAssociatedWith(Handle<SharedFunctionInfo> shared) const; 65 bool IsAssociatedWith(Handle<SharedFunctionInfo> shared) const;
61 66
62 // Transition from kInitial to kReadyToParse. 67 // Transition from kInitial to kReadyToParse.
63 void PrepareToParseOnMainThread(); 68 void PrepareToParseOnMainThread();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 Handle<String> source_; // Global handle. 109 Handle<String> source_; // Global handle.
105 Handle<String> wrapper_; // Global handle. 110 Handle<String> wrapper_; // Global handle.
106 std::unique_ptr<v8::String::ExternalStringResourceBase> source_wrapper_; 111 std::unique_ptr<v8::String::ExternalStringResourceBase> source_wrapper_;
107 size_t max_stack_size_; 112 size_t max_stack_size_;
108 113
109 // Members required for parsing. 114 // Members required for parsing.
110 std::unique_ptr<UnicodeCache> unicode_cache_; 115 std::unique_ptr<UnicodeCache> unicode_cache_;
111 std::unique_ptr<Utf16CharacterStream> character_stream_; 116 std::unique_ptr<Utf16CharacterStream> character_stream_;
112 std::unique_ptr<ParseInfo> parse_info_; 117 std::unique_ptr<ParseInfo> parse_info_;
113 std::unique_ptr<Parser> parser_; 118 std::unique_ptr<Parser> parser_;
114 std::unique_ptr<DeferredHandles> handles_from_parsing_; 119
120 // Members required for compiling a parsed function.
121 std::shared_ptr<Zone> parse_zone_;
115 122
116 // Members required for compiling. 123 // Members required for compiling.
117 std::unique_ptr<CompilationInfo> compile_info_; 124 std::unique_ptr<CompilationInfo> compile_info_;
118 std::unique_ptr<CompilationJob> compile_job_; 125 std::unique_ptr<CompilationJob> compile_job_;
119 126
120 bool trace_compiler_dispatcher_jobs_; 127 bool trace_compiler_dispatcher_jobs_;
121 128
122 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherJob); 129 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherJob);
123 }; 130 };
124 131
125 } // namespace internal 132 } // namespace internal
126 } // namespace v8 133 } // namespace v8
127 134
128 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_ 135 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_
OLDNEW
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher.cc ('k') | src/compiler-dispatcher/compiler-dispatcher-job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698