| OLD | NEW | 
|---|
| 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 "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
| 32   std::unique_ptr<ScriptCompiler::CachedData> cached_data; | 32   std::unique_ptr<ScriptCompiler::CachedData> cached_data; | 
| 33 | 33 | 
| 34   // Data needed for parsing, and data needed to to be passed between thread | 34   // Data needed for parsing, and data needed to to be passed between thread | 
| 35   // between parsing and compilation. These need to be initialized before the | 35   // between parsing and compilation. These need to be initialized before the | 
| 36   // compilation starts. | 36   // compilation starts. | 
| 37   UnicodeCache unicode_cache; | 37   UnicodeCache unicode_cache; | 
| 38   std::unique_ptr<Zone> zone; | 38   std::unique_ptr<Zone> zone; | 
| 39   std::unique_ptr<ParseInfo> info; | 39   std::unique_ptr<ParseInfo> info; | 
| 40   std::unique_ptr<Parser> parser; | 40   std::unique_ptr<Parser> parser; | 
| 41 | 41 | 
| 42  private: | 42   // Prevent copying. | 
| 43   // Prevent copying. Not implemented. | 43   StreamedSource(const StreamedSource&) = delete; | 
| 44   StreamedSource(const StreamedSource&); | 44   StreamedSource& operator=(const StreamedSource&) = delete; | 
| 45   StreamedSource& operator=(const StreamedSource&); |  | 
| 46 }; | 45 }; | 
| 47 | 46 | 
| 48 | 47 | 
| 49 class BackgroundParsingTask : public ScriptCompiler::ScriptStreamingTask { | 48 class BackgroundParsingTask : public ScriptCompiler::ScriptStreamingTask { | 
| 50  public: | 49  public: | 
| 51   BackgroundParsingTask(StreamedSource* source, | 50   BackgroundParsingTask(StreamedSource* source, | 
| 52                         ScriptCompiler::CompileOptions options, int stack_size, | 51                         ScriptCompiler::CompileOptions options, int stack_size, | 
| 53                         Isolate* isolate); | 52                         Isolate* isolate); | 
| 54 | 53 | 
| 55   virtual void Run(); | 54   virtual void Run(); | 
| 56 | 55 | 
| 57  private: | 56  private: | 
| 58   StreamedSource* source_;  // Not owned. | 57   StreamedSource* source_;  // Not owned. | 
| 59   int stack_size_; | 58   int stack_size_; | 
| 60   ScriptData* script_data_; | 59   ScriptData* script_data_; | 
| 61 }; | 60 }; | 
| 62 }  // namespace internal | 61 }  // namespace internal | 
| 63 }  // namespace v8 | 62 }  // namespace v8 | 
| 64 | 63 | 
| 65 #endif  // V8_BACKGROUND_PARSING_TASK_H_ | 64 #endif  // V8_BACKGROUND_PARSING_TASK_H_ | 
| OLD | NEW | 
|---|