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

Unified Diff: src/compiler.cc

Issue 1863333004: [turbofan] Deprecate CompilationInfo::has_scope predicate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/compiler.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index b2b917ccb6b2766ec96c75c9bb84ff92932222c1..7977bd04d3da23c6ef018fd343906bd241a27e86 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -115,11 +115,6 @@ bool CompilationInfo::has_context() const {
}
-bool CompilationInfo::has_scope() const {
- return parse_info_ && parse_info_->scope() != nullptr;
-}
-
-
CompilationInfo::CompilationInfo(ParseInfo* parse_info)
: CompilationInfo(parse_info, nullptr, Code::ComputeFlags(Code::FUNCTION),
BASE, parse_info->isolate(), parse_info->zone()) {
@@ -181,7 +176,7 @@ CompilationInfo::~CompilationInfo() {
int CompilationInfo::num_parameters() const {
- return has_scope() ? scope()->num_parameters() : parameter_count_;
+ return !IsStub() ? scope()->num_parameters() : parameter_count_;
}
@@ -193,11 +188,6 @@ int CompilationInfo::num_parameters_including_this() const {
bool CompilationInfo::is_this_defined() const { return !IsStub(); }
-int CompilationInfo::num_heap_slots() const {
- return has_scope() ? scope()->num_heap_slots() : 0;
-}
-
-
// Primitive functions are unlikely to be picked up by the stack-walking
// profiler, so they trigger their own optimization when they're called
// for the SharedFunctionInfo::kCallsUntilPrimitiveOptimization-th time.
@@ -1397,7 +1387,7 @@ bool Compiler::CompileDebugCode(Handle<SharedFunctionInfo> shared) {
// be generated lazily once deopt is triggered.
bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) {
DCHECK_NOT_NULL(info->literal());
- DCHECK(info->has_scope());
+ DCHECK_NOT_NULL(info->scope());
Handle<SharedFunctionInfo> shared = info->shared_info();
if (!shared->has_deoptimization_support()) {
// TODO(titzer): just reuse the ParseInfo for the unoptimized compile.
« no previous file with comments | « src/compiler.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698