From e16e6ceee2fdd957583216e97d8dc5da906ae7e8 Mon Sep 17 00:00:00 2001 From: Michael Starzinger Date: Tue, 13 Feb 2018 15:21:01 +0100 Subject: [PATCH] [compiler] Remove obsolete {CompilationInfo::parameter_count}. R=bmeurer@chromium.org Change-Id: If92f245852183c85772f25a2e48893a5cfc59dc8 Reviewed-on: https://chromium-review.googlesource.com/916282 Reviewed-by: Benedikt Meurer Commit-Queue: Michael Starzinger Cr-Commit-Position: refs/heads/master@{#51285} --- src/compilation-info.cc | 9 ++++----- src/compilation-info.h | 9 --------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/compilation-info.cc b/src/compilation-info.cc index 108b89b40f..5f5d63bc36 100644 --- a/src/compilation-info.cc +++ b/src/compilation-info.cc @@ -80,7 +80,6 @@ CompilationInfo::CompilationInfo(Vector debug_name, deferred_handles_(nullptr), dependencies_(nullptr), bailout_reason_(BailoutReason::kNoReason), - parameter_count_(0), optimization_id_(-1), debug_name_(debug_name) {} @@ -99,15 +98,15 @@ DeclarationScope* CompilationInfo::scope() const { } int CompilationInfo::num_parameters() const { - return !IsStub() ? scope()->num_parameters() : parameter_count_; + DCHECK(!IsStub()); + return scope()->num_parameters(); } int CompilationInfo::num_parameters_including_this() const { - return num_parameters() + (is_this_defined() ? 1 : 0); + DCHECK(!IsStub()); + return scope()->num_parameters() + 1; } -bool CompilationInfo::is_this_defined() const { return !IsStub(); } - void CompilationInfo::set_deferred_handles( std::shared_ptr deferred_handles) { DCHECK_NULL(deferred_handles_); diff --git a/src/compilation-info.h b/src/compilation-info.h index ebafb645bf..76a71b9eaf 100644 --- a/src/compilation-info.h +++ b/src/compilation-info.h @@ -111,12 +111,6 @@ class V8_EXPORT_PRIVATE CompilationInfo final { JavaScriptFrame* osr_frame() const { return osr_frame_; } int num_parameters() const; int num_parameters_including_this() const; - bool is_this_defined() const; - - void set_parameter_count(int parameter_count) { - DCHECK(IsStub()); - parameter_count_ = parameter_count; - } bool has_bytecode_array() const { return !bytecode_array_.is_null(); } Handle bytecode_array() const { return bytecode_array_; } @@ -354,9 +348,6 @@ class V8_EXPORT_PRIVATE CompilationInfo final { InlinedFunctionList inlined_functions_; - // Number of parameters used for compilation of stubs that require arguments. - int parameter_count_; - int optimization_id_; // The current OSR frame for specialization or {nullptr}.