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

Side by Side Diff: src/background-parsing-task.h

Issue 2632123006: Reland: [Parse] ParseInfo owns the parsing Zone. (Closed)
Patch Set: Rebase 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
« no previous file with comments | « src/asmjs/asm-wasm-builder.cc ('k') | src/background-parsing-task.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_BACKGROUND_PARSING_TASK_H_ 5 #ifndef V8_BACKGROUND_PARSING_TASK_H_
6 #define V8_BACKGROUND_PARSING_TASK_H_ 6 #define V8_BACKGROUND_PARSING_TASK_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "include/v8.h" 10 #include "include/v8.h"
(...skipping 20 matching lines...) Expand all
31 31
32 // Internal implementation of v8::ScriptCompiler::StreamedSource. 32 // Internal implementation of v8::ScriptCompiler::StreamedSource.
33 std::unique_ptr<ScriptCompiler::ExternalSourceStream> source_stream; 33 std::unique_ptr<ScriptCompiler::ExternalSourceStream> source_stream;
34 ScriptCompiler::StreamedSource::Encoding encoding; 34 ScriptCompiler::StreamedSource::Encoding encoding;
35 std::unique_ptr<ScriptCompiler::CachedData> cached_data; 35 std::unique_ptr<ScriptCompiler::CachedData> cached_data;
36 36
37 // Data needed for parsing, and data needed to to be passed between thread 37 // Data needed for parsing, and data needed to to be passed between thread
38 // between parsing and compilation. These need to be initialized before the 38 // between parsing and compilation. These need to be initialized before the
39 // compilation starts. 39 // compilation starts.
40 UnicodeCache unicode_cache; 40 UnicodeCache unicode_cache;
41 std::unique_ptr<Zone> zone;
42 std::unique_ptr<ParseInfo> info; 41 std::unique_ptr<ParseInfo> info;
43 std::unique_ptr<Parser> parser; 42 std::unique_ptr<Parser> parser;
44 43
45 // Prevent copying. 44 // Prevent copying.
46 StreamedSource(const StreamedSource&) = delete; 45 StreamedSource(const StreamedSource&) = delete;
47 StreamedSource& operator=(const StreamedSource&) = delete; 46 StreamedSource& operator=(const StreamedSource&) = delete;
48 }; 47 };
49 48
50 49
51 class BackgroundParsingTask : public ScriptCompiler::ScriptStreamingTask { 50 class BackgroundParsingTask : public ScriptCompiler::ScriptStreamingTask {
52 public: 51 public:
53 BackgroundParsingTask(StreamedSource* source, 52 BackgroundParsingTask(StreamedSource* source,
54 ScriptCompiler::CompileOptions options, int stack_size, 53 ScriptCompiler::CompileOptions options, int stack_size,
55 Isolate* isolate); 54 Isolate* isolate);
56 55
57 virtual void Run(); 56 virtual void Run();
58 57
59 private: 58 private:
60 StreamedSource* source_; // Not owned. 59 StreamedSource* source_; // Not owned.
61 int stack_size_; 60 int stack_size_;
62 ScriptData* script_data_; 61 ScriptData* script_data_;
63 }; 62 };
64 } // namespace internal 63 } // namespace internal
65 } // namespace v8 64 } // namespace v8
66 65
67 #endif // V8_BACKGROUND_PARSING_TASK_H_ 66 #endif // V8_BACKGROUND_PARSING_TASK_H_
OLDNEW
« no previous file with comments | « src/asmjs/asm-wasm-builder.cc ('k') | src/background-parsing-task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698