Commit f55286c6 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

Remove obsolete {JavaScriptFrame::GetArgumentsLength}.

R=jarin@chromium.org

Change-Id: I07bde35a44734b49e143a6dafa17dd7c20587412
Reviewed-on: https://chromium-review.googlesource.com/795950Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49710}
parent efed6ba9
...@@ -965,16 +965,6 @@ bool JavaScriptFrame::HasInlinedFrames() const { ...@@ -965,16 +965,6 @@ bool JavaScriptFrame::HasInlinedFrames() const {
} }
int JavaScriptFrame::GetArgumentsLength() const {
// If there is an arguments adaptor frame get the arguments length from it.
if (has_adapted_arguments()) {
return ArgumentsAdaptorFrame::GetLength(caller_fp());
} else {
return GetNumberOfIncomingArguments();
}
}
Code* JavaScriptFrame::unchecked_code() const { Code* JavaScriptFrame::unchecked_code() const {
return function()->code(); return function()->code();
} }
...@@ -1659,11 +1649,6 @@ int ArgumentsAdaptorFrame::GetNumberOfIncomingArguments() const { ...@@ -1659,11 +1649,6 @@ int ArgumentsAdaptorFrame::GetNumberOfIncomingArguments() const {
return Smi::ToInt(GetExpression(0)); return Smi::ToInt(GetExpression(0));
} }
int ArgumentsAdaptorFrame::GetLength(Address fp) {
const int offset = ArgumentsAdaptorFrameConstants::kLengthOffset;
return Smi::ToInt(Memory::Object_at(fp + offset));
}
Code* ArgumentsAdaptorFrame::unchecked_code() const { Code* ArgumentsAdaptorFrame::unchecked_code() const {
return isolate()->builtins()->builtin( return isolate()->builtins()->builtin(
Builtins::kArgumentsAdaptorTrampoline); Builtins::kArgumentsAdaptorTrampoline);
......
...@@ -709,7 +709,6 @@ class JavaScriptFrame : public StandardFrame { ...@@ -709,7 +709,6 @@ class JavaScriptFrame : public StandardFrame {
// actual passed arguments are available in an arguments adaptor // actual passed arguments are available in an arguments adaptor
// frame below it on the stack. // frame below it on the stack.
inline bool has_adapted_arguments() const; inline bool has_adapted_arguments() const;
int GetArgumentsLength() const;
// Garbage collection support. // Garbage collection support.
void Iterate(RootVisitor* v) const override; void Iterate(RootVisitor* v) const override;
...@@ -899,8 +898,6 @@ class ArgumentsAdaptorFrame: public JavaScriptFrame { ...@@ -899,8 +898,6 @@ class ArgumentsAdaptorFrame: public JavaScriptFrame {
void Print(StringStream* accumulator, PrintMode mode, void Print(StringStream* accumulator, PrintMode mode,
int index) const override; int index) const override;
static int GetLength(Address fp);
protected: protected:
inline explicit ArgumentsAdaptorFrame(StackFrameIteratorBase* iterator); inline explicit ArgumentsAdaptorFrame(StackFrameIteratorBase* iterator);
......
...@@ -595,11 +595,14 @@ RUNTIME_FUNCTION(Runtime_NewSloppyArguments) { ...@@ -595,11 +595,14 @@ RUNTIME_FUNCTION(Runtime_NewSloppyArguments) {
iterator.Advance(); iterator.Advance();
JavaScriptFrame* function_frame = JavaScriptFrame::cast(iterator.frame()); JavaScriptFrame* function_frame = JavaScriptFrame::cast(iterator.frame());
DCHECK(function_frame->is_java_script()); DCHECK(function_frame->is_java_script());
int argc = function_frame->GetArgumentsLength(); int argc = function_frame->ComputeParametersCount();
Address fp = function_frame->fp(); Address fp = function_frame->fp();
if (function_frame->has_adapted_arguments()) { if (function_frame->has_adapted_arguments()) {
iterator.Advance(); iterator.Advance();
fp = iterator.frame()->fp(); ArgumentsAdaptorFrame* adaptor_frame =
ArgumentsAdaptorFrame::cast(iterator.frame());
argc = adaptor_frame->ComputeParametersCount();
fp = adaptor_frame->fp();
} }
Object** parameters = reinterpret_cast<Object**>( Object** parameters = reinterpret_cast<Object**>(
......
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