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

Unified Diff: src/parsing/parse-info.cc

Issue 2650883002: Reland: [Compiler] Enable handles created during parsing and scope analysis to be deferred. (Closed)
Patch Set: Remove unused variable Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/parse-info.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parse-info.cc
diff --git a/src/parsing/parse-info.cc b/src/parsing/parse-info.cc
index 487c36702c9743ddffef33760c1e381b0e3867a3..d3cf86dbdff8050e527230cdb079d538950e847e 100644
--- a/src/parsing/parse-info.cc
+++ b/src/parsing/parse-info.cc
@@ -4,6 +4,7 @@
#include "src/parsing/parse-info.h"
+#include "src/api.h"
#include "src/ast/ast-value-factory.h"
#include "src/ast/ast.h"
#include "src/heap/heap-inl.h"
@@ -36,7 +37,8 @@ ParseInfo::ParseInfo(AccountingAllocator* zone_allocator)
cached_data_(nullptr),
ast_value_factory_(nullptr),
function_name_(nullptr),
- literal_(nullptr) {}
+ literal_(nullptr),
+ deferred_handles_(nullptr) {}
ParseInfo::ParseInfo(Handle<SharedFunctionInfo> shared)
: ParseInfo(shared->GetIsolate()->allocator()) {
@@ -108,6 +110,17 @@ FunctionKind ParseInfo::function_kind() const {
return SharedFunctionInfo::FunctionKindBits::decode(compiler_hints_);
}
+void ParseInfo::set_deferred_handles(
+ std::shared_ptr<DeferredHandles> deferred_handles) {
+ DCHECK(deferred_handles_.get() == nullptr);
+ deferred_handles_.swap(deferred_handles);
+}
+
+void ParseInfo::set_deferred_handles(DeferredHandles* deferred_handles) {
+ DCHECK(deferred_handles_.get() == nullptr);
+ deferred_handles_.reset(deferred_handles);
+}
+
#ifdef DEBUG
bool ParseInfo::script_is_native() const {
return script_->type() == Script::TYPE_NATIVE;
« no previous file with comments | « src/parsing/parse-info.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698