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

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

Issue 2687973003: Revert of [Compiler] Enable handles created during parsing and scope analysis to be deferred. (Closed)
Patch Set: 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;
24 class FunctionLiteral; 23 class FunctionLiteral;
25 class Isolate; 24 class Isolate;
26 class ParseInfo; 25 class ParseInfo;
27 class Parser; 26 class Parser;
28 class SharedFunctionInfo; 27 class SharedFunctionInfo;
29 class String; 28 class String;
30 class UnicodeCache; 29 class UnicodeCache;
31 class Utf16CharacterStream; 30 class Utf16CharacterStream;
32 31
33 enum class CompileJobStatus { 32 enum class CompileJobStatus {
(...skipping 10 matching lines...) Expand all
44 43
45 class V8_EXPORT_PRIVATE CompilerDispatcherJob { 44 class V8_EXPORT_PRIVATE CompilerDispatcherJob {
46 public: 45 public:
47 // Creates a CompilerDispatcherJob in the initial state. 46 // Creates a CompilerDispatcherJob in the initial state.
48 CompilerDispatcherJob(Isolate* isolate, CompilerDispatcherTracer* tracer, 47 CompilerDispatcherJob(Isolate* isolate, CompilerDispatcherTracer* tracer,
49 Handle<SharedFunctionInfo> shared, 48 Handle<SharedFunctionInfo> shared,
50 size_t max_stack_size); 49 size_t max_stack_size);
51 // Creates a CompilerDispatcherJob in the analyzed state. 50 // Creates a CompilerDispatcherJob in the analyzed state.
52 CompilerDispatcherJob(Isolate* isolate, CompilerDispatcherTracer* tracer, 51 CompilerDispatcherJob(Isolate* isolate, CompilerDispatcherTracer* tracer,
53 Handle<SharedFunctionInfo> shared, 52 Handle<SharedFunctionInfo> shared,
54 FunctionLiteral* literal, 53 FunctionLiteral* literal, size_t max_stack_size);
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);
59 ~CompilerDispatcherJob(); 54 ~CompilerDispatcherJob();
60 55
61 CompileJobStatus status() const { return status_; } 56 CompileJobStatus status() const { return status_; }
62 57
63 // Returns true if this CompilerDispatcherJob was created for the given 58 // Returns true if this CompilerDispatcherJob was created for the given
64 // function. 59 // function.
65 bool IsAssociatedWith(Handle<SharedFunctionInfo> shared) const; 60 bool IsAssociatedWith(Handle<SharedFunctionInfo> shared) const;
66 61
67 // Transition from kInitial to kReadyToParse. 62 // Transition from kInitial to kReadyToParse.
68 void PrepareToParseOnMainThread(); 63 void PrepareToParseOnMainThread();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 Handle<String> source_; // Global handle. 104 Handle<String> source_; // Global handle.
110 Handle<String> wrapper_; // Global handle. 105 Handle<String> wrapper_; // Global handle.
111 std::unique_ptr<v8::String::ExternalStringResourceBase> source_wrapper_; 106 std::unique_ptr<v8::String::ExternalStringResourceBase> source_wrapper_;
112 size_t max_stack_size_; 107 size_t max_stack_size_;
113 108
114 // Members required for parsing. 109 // Members required for parsing.
115 std::unique_ptr<UnicodeCache> unicode_cache_; 110 std::unique_ptr<UnicodeCache> unicode_cache_;
116 std::unique_ptr<Utf16CharacterStream> character_stream_; 111 std::unique_ptr<Utf16CharacterStream> character_stream_;
117 std::unique_ptr<ParseInfo> parse_info_; 112 std::unique_ptr<ParseInfo> parse_info_;
118 std::unique_ptr<Parser> parser_; 113 std::unique_ptr<Parser> parser_;
119 114 std::unique_ptr<DeferredHandles> handles_from_parsing_;
120 // Members required for compiling a parsed function.
121 std::shared_ptr<Zone> parse_zone_;
122 115
123 // Members required for compiling. 116 // Members required for compiling.
124 std::unique_ptr<CompilationInfo> compile_info_; 117 std::unique_ptr<CompilationInfo> compile_info_;
125 std::unique_ptr<CompilationJob> compile_job_; 118 std::unique_ptr<CompilationJob> compile_job_;
126 119
127 bool trace_compiler_dispatcher_jobs_; 120 bool trace_compiler_dispatcher_jobs_;
128 121
129 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherJob); 122 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherJob);
130 }; 123 };
131 124
132 } // namespace internal 125 } // namespace internal
133 } // namespace v8 126 } // namespace v8
134 127
135 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_JOB_H_ 128 #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