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

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

Issue 2448323004: [Interpreter] Don't require a CanonicalHandleScope for parse / renumbering (Closed)
Patch Set: Created 4 years, 1 month 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.cc ('k') | src/interpreter/bytecode-generator.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/compilation-info.h" 8 #include "src/compilation-info.h"
9 #include "src/compiler-dispatcher/compiler-dispatcher-tracer.h" 9 #include "src/compiler-dispatcher/compiler-dispatcher-tracer.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 Handle<Script> script(Script::cast(shared_->script()), isolate_); 143 Handle<Script> script(Script::cast(shared_->script()), isolate_);
144 144
145 parse_info_->set_script(script); 145 parse_info_->set_script(script);
146 Handle<ScopeInfo> outer_scope_info( 146 Handle<ScopeInfo> outer_scope_info(
147 handle(ScopeInfo::cast(shared_->outer_scope_info()))); 147 handle(ScopeInfo::cast(shared_->outer_scope_info())));
148 if (outer_scope_info->length() > 0) { 148 if (outer_scope_info->length() > 0) {
149 parse_info_->set_outer_scope_info(outer_scope_info); 149 parse_info_->set_outer_scope_info(outer_scope_info);
150 } 150 }
151 parse_info_->set_shared_info(shared_); 151 parse_info_->set_shared_info(shared_);
152 152
153 { 153 // Do the parsing tasks which need to be done on the main thread. This
154 // Create a canonical handle scope if compiling ignition bytecode. This is 154 // will also handle parse errors.
155 // required by the constant array builder to de-duplicate objects without 155 parser_->Internalize(isolate_, script, parse_info_->literal() == nullptr);
156 // dereferencing handles.
157 std::unique_ptr<CanonicalHandleScope> canonical;
158 if (FLAG_ignition) canonical.reset(new CanonicalHandleScope(isolate_));
159
160 // Do the parsing tasks which need to be done on the main thread. This
161 // will also handle parse errors.
162 parser_->Internalize(isolate_, script, parse_info_->literal() == nullptr);
163 }
164 parser_->HandleSourceURLComments(isolate_, script); 156 parser_->HandleSourceURLComments(isolate_, script);
165 157
166 parse_info_->set_character_stream(nullptr); 158 parse_info_->set_character_stream(nullptr);
167 parse_info_->set_unicode_cache(nullptr); 159 parse_info_->set_unicode_cache(nullptr);
168 parser_.reset(); 160 parser_.reset();
169 unicode_cache_.reset(); 161 unicode_cache_.reset();
170 character_stream_.reset(); 162 character_stream_.reset();
171 } 163 }
172 handles_from_parsing_.reset(scope.Detach()); 164 handles_from_parsing_.reset(scope.Detach());
173 165
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 if (!source_.is_null()) { 251 if (!source_.is_null()) {
260 i::GlobalHandles::Destroy(Handle<Object>::cast(source_).location()); 252 i::GlobalHandles::Destroy(Handle<Object>::cast(source_).location());
261 source_ = Handle<String>::null(); 253 source_ = Handle<String>::null();
262 } 254 }
263 255
264 status_ = CompileJobStatus::kInitial; 256 status_ = CompileJobStatus::kInitial;
265 } 257 }
266 258
267 } // namespace internal 259 } // namespace internal
268 } // namespace v8 260 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698