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

Side by Side Diff: src/background-parsing-task.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/ast/scopes.cc ('k') | src/compiler-dispatcher/compiler-dispatcher-job.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 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 #include "src/debug/debug.h" 6 #include "src/debug/debug.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // background thread. 54 // background thread.
55 uintptr_t stack_limit = 55 uintptr_t stack_limit =
56 reinterpret_cast<uintptr_t>(&stack_limit) - stack_size_ * KB; 56 reinterpret_cast<uintptr_t>(&stack_limit) - stack_size_ * KB;
57 source_->parser->set_stack_limit(stack_limit); 57 source_->parser->set_stack_limit(stack_limit);
58 58
59 // Nullify the Isolate temporarily so that the background parser doesn't 59 // Nullify the Isolate temporarily so that the background parser doesn't
60 // accidentally use it. 60 // accidentally use it.
61 Isolate* isolate = source_->info->isolate(); 61 Isolate* isolate = source_->info->isolate();
62 source_->info->set_isolate(nullptr); 62 source_->info->set_isolate(nullptr);
63 63
64 source_->parser->DeserializeScopeChain(
65 source_->info.get(), Handle<Context>::null(),
66 Scope::DeserializationMode::kDeserializeOffHeap);
64 source_->parser->ParseOnBackground(source_->info.get()); 67 source_->parser->ParseOnBackground(source_->info.get());
65 68
66 if (script_data_ != nullptr) { 69 if (script_data_ != nullptr) {
67 source_->cached_data.reset(new ScriptCompiler::CachedData( 70 source_->cached_data.reset(new ScriptCompiler::CachedData(
68 script_data_->data(), script_data_->length(), 71 script_data_->data(), script_data_->length(),
69 ScriptCompiler::CachedData::BufferOwned)); 72 ScriptCompiler::CachedData::BufferOwned));
70 script_data_->ReleaseDataOwnership(); 73 script_data_->ReleaseDataOwnership();
71 delete script_data_; 74 delete script_data_;
72 script_data_ = nullptr; 75 script_data_ = nullptr;
73 } 76 }
74 source_->info->set_isolate(isolate); 77 source_->info->set_isolate(isolate);
75 } 78 }
76 } // namespace internal 79 } // namespace internal
77 } // namespace v8 80 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/scopes.cc ('k') | src/compiler-dispatcher/compiler-dispatcher-job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698