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

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

Issue 2683733002: Revert of Reland: [Parse] ParseInfo owns the parsing Zone. (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
« 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;
41 std::unique_ptr<ParseInfo> info; 42 std::unique_ptr<ParseInfo> info;
42 std::unique_ptr<Parser> parser; 43 std::unique_ptr<Parser> parser;
43 44
44 // Prevent copying. 45 // Prevent copying.
45 StreamedSource(const StreamedSource&) = delete; 46 StreamedSource(const StreamedSource&) = delete;
46 StreamedSource& operator=(const StreamedSource&) = delete; 47 StreamedSource& operator=(const StreamedSource&) = delete;
47 }; 48 };
48 49
49 50
50 class BackgroundParsingTask : public ScriptCompiler::ScriptStreamingTask { 51 class BackgroundParsingTask : public ScriptCompiler::ScriptStreamingTask {
51 public: 52 public:
52 BackgroundParsingTask(StreamedSource* source, 53 BackgroundParsingTask(StreamedSource* source,
53 ScriptCompiler::CompileOptions options, int stack_size, 54 ScriptCompiler::CompileOptions options, int stack_size,
54 Isolate* isolate); 55 Isolate* isolate);
55 56
56 virtual void Run(); 57 virtual void Run();
57 58
58 private: 59 private:
59 StreamedSource* source_; // Not owned. 60 StreamedSource* source_; // Not owned.
60 int stack_size_; 61 int stack_size_;
61 ScriptData* script_data_; 62 ScriptData* script_data_;
62 }; 63 };
63 } // namespace internal 64 } // namespace internal
64 } // namespace v8 65 } // namespace v8
65 66
66 #endif // V8_BACKGROUND_PARSING_TASK_H_ 67 #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