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

Side by Side Diff: src/compiler-dispatcher/compiler-dispatcher-job.cc

Issue 2198043002: Add a mode to completely deserialize scope chains (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 4 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/compiler-dispatcher/compiler-dispatcher-job.h ('k') | src/parsing/parser.h » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #include "src/compiler-dispatcher/compiler-dispatcher-job.h" 5 #include "src/compiler-dispatcher/compiler-dispatcher-job.h"
6 6
7 #include "src/assert-scope.h" 7 #include "src/assert-scope.h"
8 #include "src/global-handles.h" 8 #include "src/global-handles.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 source_ = Handle<String>::cast(isolate_->global_handles()->Create(*source)); 62 source_ = Handle<String>::cast(isolate_->global_handles()->Create(*source));
63 character_stream_.reset(new GenericStringUtf16CharacterStream( 63 character_stream_.reset(new GenericStringUtf16CharacterStream(
64 source_, shared->start_position(), shared->end_position())); 64 source_, shared->start_position(), shared->end_position()));
65 } 65 }
66 parse_info_.reset(new ParseInfo(zone_.get())); 66 parse_info_.reset(new ParseInfo(zone_.get()));
67 parse_info_->set_isolate(isolate_); 67 parse_info_->set_isolate(isolate_);
68 parse_info_->set_character_stream(character_stream_.get()); 68 parse_info_->set_character_stream(character_stream_.get());
69 parse_info_->set_hash_seed(isolate_->heap()->HashSeed()); 69 parse_info_->set_hash_seed(isolate_->heap()->HashSeed());
70 parse_info_->set_unicode_cache(unicode_cache_.get()); 70 parse_info_->set_unicode_cache(unicode_cache_.get());
71 parser_.reset(new Parser(parse_info_.get())); 71 parser_.reset(new Parser(parse_info_.get()));
72 parser_->DeserializeScopeChain(
73 parse_info_.get(), handle(function_->context(), isolate_),
74 Scope::DeserializationMode::kDeserializeOffHeap);
72 status_ = CompileJobStatus::kReadyToParse; 75 status_ = CompileJobStatus::kReadyToParse;
73 } 76 }
74 77
75 void CompilerDispatcherJob::Parse() { 78 void CompilerDispatcherJob::Parse() {
76 DCHECK(can_parse_on_background_thread_ || 79 DCHECK(can_parse_on_background_thread_ ||
77 ThreadId::Current().Equals(isolate_->thread_id())); 80 ThreadId::Current().Equals(isolate_->thread_id()));
78 DCHECK(status() == CompileJobStatus::kReadyToParse); 81 DCHECK(status() == CompileJobStatus::kReadyToParse);
79 82
80 DisallowHeapAllocation no_allocation; 83 DisallowHeapAllocation no_allocation;
81 DisallowHandleAllocation no_handles; 84 DisallowHandleAllocation no_handles;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 169
167 parse_info_->set_character_stream(nullptr); 170 parse_info_->set_character_stream(nullptr);
168 parse_info_->set_unicode_cache(nullptr); 171 parse_info_->set_unicode_cache(nullptr);
169 parser_.reset(); 172 parser_.reset();
170 unicode_cache_.reset(); 173 unicode_cache_.reset();
171 character_stream_.reset(); 174 character_stream_.reset();
172 } 175 }
173 176
174 } // namespace internal 177 } // namespace internal
175 } // namespace v8 178 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher-job.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698