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

Side by Side Diff: src/background-parsing-task.cc

Issue 2306413002: Fully deserialize the scope chain after parsing, not before (Closed)
Patch Set: updates Created 4 years, 3 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/ast/scopes.cc ('k') | src/compiler-dispatcher/compiler-dispatcher-job.cc » ('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 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 #include "src/background-parsing-task.h" 5 #include "src/background-parsing-task.h"
6 6
7 #include "src/debug/debug.h" 7 #include "src/debug/debug.h"
8 #include "src/parsing/parser.h" 8 #include "src/parsing/parser.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // Parse eagerly with ignition since we will compile eagerly. 43 // Parse eagerly with ignition since we will compile eagerly.
44 info->set_allow_lazy_parsing(!(i::FLAG_ignition && i::FLAG_ignition_eager)); 44 info->set_allow_lazy_parsing(!(i::FLAG_ignition && i::FLAG_ignition_eager));
45 45
46 if (options == ScriptCompiler::kProduceParserCache || 46 if (options == ScriptCompiler::kProduceParserCache ||
47 options == ScriptCompiler::kProduceCodeCache) { 47 options == ScriptCompiler::kProduceCodeCache) {
48 source_->info->set_cached_data(&script_data_); 48 source_->info->set_cached_data(&script_data_);
49 } 49 }
50 // Parser needs to stay alive for finalizing the parsing on the main 50 // Parser needs to stay alive for finalizing the parsing on the main
51 // thread. 51 // thread.
52 source_->parser.reset(new Parser(source_->info.get())); 52 source_->parser.reset(new Parser(source_->info.get()));
53 source_->parser->DeserializeScopeChain( 53 source_->parser->DeserializeScopeChain(source_->info.get(),
54 source_->info.get(), Handle<Context>::null(), 54 MaybeHandle<Context>());
55 Scope::DeserializationMode::kDeserializeOffHeap);
56 } 55 }
57 56
58 57
59 void BackgroundParsingTask::Run() { 58 void BackgroundParsingTask::Run() {
60 DisallowHeapAllocation no_allocation; 59 DisallowHeapAllocation no_allocation;
61 DisallowHandleAllocation no_handles; 60 DisallowHandleAllocation no_handles;
62 DisallowHandleDereference no_deref; 61 DisallowHandleDereference no_deref;
63 62
64 // Reset the stack limit of the parser to reflect correctly that we're on a 63 // Reset the stack limit of the parser to reflect correctly that we're on a
65 // background thread. 64 // background thread.
(...skipping 12 matching lines...) Expand all
78 script_data_->data(), script_data_->length(), 77 script_data_->data(), script_data_->length(),
79 ScriptCompiler::CachedData::BufferOwned)); 78 ScriptCompiler::CachedData::BufferOwned));
80 script_data_->ReleaseDataOwnership(); 79 script_data_->ReleaseDataOwnership();
81 delete script_data_; 80 delete script_data_;
82 script_data_ = nullptr; 81 script_data_ = nullptr;
83 } 82 }
84 source_->info->set_isolate(isolate); 83 source_->info->set_isolate(isolate);
85 } 84 }
86 } // namespace internal 85 } // namespace internal
87 } // namespace v8 86 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/scopes.cc ('k') | src/compiler-dispatcher/compiler-dispatcher-job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698