V8 Project
background-parsing-task.h
Go to the documentation of this file.
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
3 // found in the LICENSE file.
4 
5 #ifndef V8_BACKGROUND_PARSING_TASK_H_
6 #define V8_BACKGROUND_PARSING_TASK_H_
7 
10 #include "src/compiler.h"
11 #include "src/parser.h"
12 #include "src/smart-pointers.h"
13 
14 namespace v8 {
15 namespace internal {
16 
17 class Parser;
18 
19 // Internal representation of v8::ScriptCompiler::StreamedSource. Contains all
20 // data which needs to be transmitted between threads for background parsing,
21 // finalizing it on the main thread, and compiling on the main thread.
27  hash_seed(0),
28  allow_lazy(false) {}
29 
30  // Internal implementation of v8::ScriptCompiler::StreamedSource.
34 
35  // Data needed for parsing, and data needed to to be passed between thread
36  // between parsing and compilation. These need to be initialized before the
37  // compilation starts.
41  bool allow_lazy;
43 
44  private:
45  // Prevent copying. Not implemented.
48 };
49 
50 
52  public:
54  ScriptCompiler::CompileOptions options, int stack_size,
55  Isolate* isolate);
56 
57  virtual void Run();
58 
59  private:
60  StreamedSource* source_; // Not owned.
63 };
64 }
65 } // namespace v8::internal
66 
67 #endif // V8_BACKGROUND_PARSING_TASK_H_
For streaming incomplete script data to V8.
Definition: v8.h:1096
A streaming task which the embedder must run on a background thread to stream scripts into V8.
Definition: v8.h:1153
BackgroundParsingTask(StreamedSource *source, ScriptCompiler::CompileOptions options, int stack_size, Isolate *isolate)
ScriptCompiler::CompileOptions options_
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20
StreamedSource & operator=(const StreamedSource &)
SmartPointer< ScriptCompiler::ExternalSourceStream > source_stream
StreamedSource(ScriptCompiler::ExternalSourceStream *source_stream, ScriptCompiler::StreamedSource::Encoding encoding)
ScriptCompiler::StreamedSource::Encoding encoding
SmartPointer< ScriptCompiler::CachedData > cached_data
SmartPointer< CompilationInfo > info
StreamedSource(const StreamedSource &)