Commit ee17d001 authored by Victor Gomes's avatar Victor Gomes Committed by Commit Bot

[cleanup] Remove parameters accessors from CommonFrame

Change-Id: Ic54046824d4f3c98caa8381d2ece46c9985a2b98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2475734Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70565}
parent 56b55f3f
...@@ -54,14 +54,10 @@ JavaScriptFrame* FrameInspector::javascript_frame() { ...@@ -54,14 +54,10 @@ JavaScriptFrame* FrameInspector::javascript_frame() {
: JavaScriptFrame::cast(frame_); : JavaScriptFrame::cast(frame_);
} }
int FrameInspector::GetParametersCount() {
if (is_optimized_) return deoptimized_frame_->parameters_count();
return frame_->ComputeParametersCount();
}
Handle<Object> FrameInspector::GetParameter(int index) { Handle<Object> FrameInspector::GetParameter(int index) {
if (is_optimized_) return deoptimized_frame_->GetParameter(index); if (is_optimized_) return deoptimized_frame_->GetParameter(index);
return handle(frame_->GetParameter(index), isolate_); DCHECK(IsJavaScript());
return handle(javascript_frame()->GetParameter(index), isolate_);
} }
Handle<Object> FrameInspector::GetExpression(int index) { Handle<Object> FrameInspector::GetExpression(int index) {
......
...@@ -25,7 +25,6 @@ class FrameInspector { ...@@ -25,7 +25,6 @@ class FrameInspector {
~FrameInspector(); ~FrameInspector();
int GetParametersCount();
Handle<JSFunction> GetFunction() const { return function_; } Handle<JSFunction> GetFunction() const { return function_; }
Handle<Script> GetScript() { return script_; } Handle<Script> GetScript() { return script_; }
Handle<Object> GetParameter(int index); Handle<Object> GetParameter(int index);
......
...@@ -879,13 +879,6 @@ int CommonFrame::ComputeExpressionsCount() const { ...@@ -879,13 +879,6 @@ int CommonFrame::ComputeExpressionsCount() const {
return static_cast<int>((base - limit) / kSystemPointerSize); return static_cast<int>((base - limit) / kSystemPointerSize);
} }
Object CommonFrame::GetParameter(int index) const {
// CommonFrame does not define any parameters.
UNREACHABLE();
}
int CommonFrame::ComputeParametersCount() const { return 0; }
void CommonFrame::ComputeCallerState(State* state) const { void CommonFrame::ComputeCallerState(State* state) const {
state->sp = caller_sp(); state->sp = caller_sp();
state->fp = caller_fp(); state->fp = caller_fp();
...@@ -897,8 +890,6 @@ void CommonFrame::ComputeCallerState(State* state) const { ...@@ -897,8 +890,6 @@ void CommonFrame::ComputeCallerState(State* state) const {
reinterpret_cast<Address*>(ComputeConstantPoolAddress(fp())); reinterpret_cast<Address*>(ComputeConstantPoolAddress(fp()));
} }
bool CommonFrame::IsConstructor() const { return false; }
void CommonFrame::Summarize(std::vector<FrameSummary>* functions) const { void CommonFrame::Summarize(std::vector<FrameSummary>* functions) const {
// This should only be called on frames which override this method. // This should only be called on frames which override this method.
UNREACHABLE(); UNREACHABLE();
......
...@@ -485,14 +485,6 @@ class CommonFrame : public StackFrame { ...@@ -485,14 +485,6 @@ class CommonFrame : public StackFrame {
Address GetCallerStackPointer() const override; Address GetCallerStackPointer() const override;
// Access the parameters.
virtual Object GetParameter(int index) const;
virtual int ComputeParametersCount() const;
Handle<FixedArray> GetParameters() const;
// Check if this frame is a constructor frame invoked through 'new'.
virtual bool IsConstructor() const;
// Build a list with summaries for this frame including all inlined frames. // Build a list with summaries for this frame including all inlined frames.
// The functions are ordered bottom-to-top (i.e. summaries.last() is the // The functions are ordered bottom-to-top (i.e. summaries.last() is the
// top-most activation; caller comes before callee). // top-most activation; caller comes before callee).
...@@ -569,8 +561,8 @@ class JavaScriptFrame : public CommonFrame { ...@@ -569,8 +561,8 @@ class JavaScriptFrame : public CommonFrame {
// Access the parameters. // Access the parameters.
inline Address GetParameterSlot(int index) const; inline Address GetParameterSlot(int index) const;
Object GetParameter(int index) const override; Object GetParameter(int index) const;
int ComputeParametersCount() const override; virtual int ComputeParametersCount() const;
#ifdef V8_NO_ARGUMENTS_ADAPTOR #ifdef V8_NO_ARGUMENTS_ADAPTOR
int GetActualArgumentCount() const; int GetActualArgumentCount() const;
#endif #endif
...@@ -580,7 +572,7 @@ class JavaScriptFrame : public CommonFrame { ...@@ -580,7 +572,7 @@ class JavaScriptFrame : public CommonFrame {
void SetParameterValue(int index, Object value) const; void SetParameterValue(int index, Object value) const;
// Check if this frame is a constructor frame invoked through 'new'. // Check if this frame is a constructor frame invoked through 'new'.
bool IsConstructor() const override; bool IsConstructor() const;
// Determines whether this frame includes inlined activations. To get details // Determines whether this frame includes inlined activations. To get details
// about the inlined frames use {GetFunctions} and {Summarize}. // about the inlined frames use {GetFunctions} and {Summarize}.
...@@ -755,7 +747,7 @@ class BuiltinExitFrame : public ExitFrame { ...@@ -755,7 +747,7 @@ class BuiltinExitFrame : public ExitFrame {
JSFunction function() const; JSFunction function() const;
Object receiver() const; Object receiver() const;
bool IsConstructor() const override; bool IsConstructor() const;
void Print(StringStream* accumulator, PrintMode mode, void Print(StringStream* accumulator, PrintMode mode,
int index) const override; int index) const override;
...@@ -764,8 +756,8 @@ class BuiltinExitFrame : public ExitFrame { ...@@ -764,8 +756,8 @@ class BuiltinExitFrame : public ExitFrame {
inline explicit BuiltinExitFrame(StackFrameIteratorBase* iterator); inline explicit BuiltinExitFrame(StackFrameIteratorBase* iterator);
private: private:
Object GetParameter(int i) const override; Object GetParameter(int i) const;
int ComputeParametersCount() const override; int ComputeParametersCount() const;
inline Object receiver_slot_object() const; inline Object receiver_slot_object() const;
inline Object argc_slot_object() const; inline Object argc_slot_object() const;
...@@ -917,7 +909,7 @@ class BuiltinFrame final : public TypedFrame { ...@@ -917,7 +909,7 @@ class BuiltinFrame final : public TypedFrame {
DCHECK(frame->is_builtin()); DCHECK(frame->is_builtin());
return static_cast<BuiltinFrame*>(frame); return static_cast<BuiltinFrame*>(frame);
} }
int ComputeParametersCount() const override; int ComputeParametersCount() const;
protected: protected:
inline explicit BuiltinFrame(StackFrameIteratorBase* iterator); inline explicit BuiltinFrame(StackFrameIteratorBase* iterator);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment