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 {
}
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 {
return function()->code();
}
......@@ -1659,11 +1649,6 @@ int ArgumentsAdaptorFrame::GetNumberOfIncomingArguments() const {
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 {
return isolate()->builtins()->builtin(
Builtins::kArgumentsAdaptorTrampoline);
......
......@@ -709,7 +709,6 @@ class JavaScriptFrame : public StandardFrame {
// actual passed arguments are available in an arguments adaptor
// frame below it on the stack.
inline bool has_adapted_arguments() const;
int GetArgumentsLength() const;
// Garbage collection support.
void Iterate(RootVisitor* v) const override;
......@@ -899,8 +898,6 @@ class ArgumentsAdaptorFrame: public JavaScriptFrame {
void Print(StringStream* accumulator, PrintMode mode,
int index) const override;
static int GetLength(Address fp);
protected:
inline explicit ArgumentsAdaptorFrame(StackFrameIteratorBase* iterator);
......
......@@ -595,11 +595,14 @@ RUNTIME_FUNCTION(Runtime_NewSloppyArguments) {
iterator.Advance();
JavaScriptFrame* function_frame = JavaScriptFrame::cast(iterator.frame());
DCHECK(function_frame->is_java_script());
int argc = function_frame->GetArgumentsLength();
int argc = function_frame->ComputeParametersCount();
Address fp = function_frame->fp();
if (function_frame->has_adapted_arguments()) {
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**>(
......
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