| Index: src/compiler-dispatcher/compiler-dispatcher-job.cc
|
| diff --git a/src/compiler-dispatcher/compiler-dispatcher-job.cc b/src/compiler-dispatcher/compiler-dispatcher-job.cc
|
| index 557203628330c4033cb9f547f84f324e704e8626..59dc58583f1440ec122d7cd6a3239a4ad56809cd 100644
|
| --- a/src/compiler-dispatcher/compiler-dispatcher-job.cc
|
| +++ b/src/compiler-dispatcher/compiler-dispatcher-job.cc
|
| @@ -7,6 +7,9 @@
|
| #include "src/global-handles.h"
|
| #include "src/isolate.h"
|
| #include "src/objects-inl.h"
|
| +#include "src/parsing/parser.h"
|
| +#include "src/unicode-cache.h"
|
| +#include "src/zone.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -18,8 +21,22 @@ CompilerDispatcherJob::CompilerDispatcherJob(Isolate* isolate,
|
| isolate_->global_handles()->Create(*function))) {}
|
|
|
| CompilerDispatcherJob::~CompilerDispatcherJob() {
|
| + DCHECK(ThreadId::Current().Equals(isolate_->thread_id()));
|
| i::GlobalHandles::Destroy(Handle<Object>::cast(function_).location());
|
| }
|
|
|
| +void CompilerDispatcherJob::PrepareToParseOnMainThread() {
|
| + DCHECK(ThreadId::Current().Equals(isolate_->thread_id()));
|
| + DCHECK(status_ == CompileJobStatus::kInitial);
|
| + unicode_cache_.reset(new UnicodeCache());
|
| + zone_.reset(new Zone(isolate_->allocator()));
|
| + parse_info_.reset(new ParseInfo(zone_.get()));
|
| + parse_info_->set_isolate(isolate_);
|
| + // TODO(jochen): We need to hook up a fake source stream here.
|
| + parse_info_->set_hash_seed(isolate_->heap()->HashSeed());
|
| + parse_info_->set_unicode_cache(unicode_cache_.get());
|
| + status_ = CompileJobStatus::kReadyToParse;
|
| +}
|
| +
|
| } // namespace internal
|
| } // namespace v8
|
|
|