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

Unified Diff: src/compilation-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/compilation-info.h ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compilation-info.cc
diff --git a/src/compilation-info.cc b/src/compilation-info.cc
index f0930f395ec74489a3598e78497e8d44cc73d5d4..f9b51b569d9027309e74e24171c5e7c5ae60eecb 100644
--- a/src/compilation-info.cc
+++ b/src/compilation-info.cc
@@ -107,7 +107,6 @@ CompilationInfo::~CompilationInfo() {
shared_info()->DisableOptimization(bailout_reason());
}
dependencies()->Rollback();
- delete deferred_handles_;
}
int CompilationInfo::num_parameters() const {
@@ -131,8 +130,21 @@ bool CompilationInfo::ShouldSelfOptimize() {
!shared_info()->optimization_disabled();
}
+void CompilationInfo::set_deferred_handles(
+ std::shared_ptr<DeferredHandles> deferred_handles) {
+ DCHECK(deferred_handles_.get() == nullptr);
+ deferred_handles_.swap(deferred_handles);
+}
+
+void CompilationInfo::set_deferred_handles(DeferredHandles* deferred_handles) {
+ DCHECK(deferred_handles_.get() == nullptr);
+ deferred_handles_.reset(deferred_handles);
+}
+
void CompilationInfo::ReopenHandlesInNewHandleScope() {
- closure_ = Handle<JSFunction>(*closure_);
+ if (!closure_.is_null()) {
+ closure_ = Handle<JSFunction>(*closure_);
+ }
}
bool CompilationInfo::has_simple_parameters() {
« no previous file with comments | « src/compilation-info.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698