Commit 65edd994 authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[runtime] Remove unused NewSloppyArguments function

Only the NewSloppyArguments_Generic variant is used, so delete the
unused NewSloppyArguments function and rename the other one to the now
available name.

Change-Id: Ifb90a03bd112f78b4d95f7afc3b299c9634e9acc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2128051
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66935}
parent 1627e584
...@@ -412,7 +412,7 @@ void JSGenericLowering::LowerJSCreateArguments(Node* node) { ...@@ -412,7 +412,7 @@ void JSGenericLowering::LowerJSCreateArguments(Node* node) {
CreateArgumentsType const type = CreateArgumentsTypeOf(node->op()); CreateArgumentsType const type = CreateArgumentsTypeOf(node->op());
switch (type) { switch (type) {
case CreateArgumentsType::kMappedArguments: case CreateArgumentsType::kMappedArguments:
ReplaceWithRuntimeCall(node, Runtime::kNewSloppyArguments_Generic); ReplaceWithRuntimeCall(node, Runtime::kNewSloppyArguments);
break; break;
case CreateArgumentsType::kUnmappedArguments: case CreateArgumentsType::kUnmappedArguments:
ReplaceWithRuntimeCall(node, Runtime::kNewStrictArguments); ReplaceWithRuntimeCall(node, Runtime::kNewStrictArguments);
......
...@@ -2811,7 +2811,7 @@ IGNITION_HANDLER(CreateMappedArguments, InterpreterAssembler) { ...@@ -2811,7 +2811,7 @@ IGNITION_HANDLER(CreateMappedArguments, InterpreterAssembler) {
BIND(&if_duplicate_parameters); BIND(&if_duplicate_parameters);
{ {
TNode<Object> result = TNode<Object> result =
CallRuntime(Runtime::kNewSloppyArguments_Generic, context, closure); CallRuntime(Runtime::kNewSloppyArguments, context, closure);
SetAccumulator(result); SetAccumulator(result);
Dispatch(); Dispatch();
} }
......
...@@ -487,8 +487,7 @@ class ParameterArguments { ...@@ -487,8 +487,7 @@ class ParameterArguments {
} // namespace } // namespace
RUNTIME_FUNCTION(Runtime_NewSloppyArguments) {
RUNTIME_FUNCTION(Runtime_NewSloppyArguments_Generic) {
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(1, args.length()); DCHECK_EQ(1, args.length());
CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0); CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0);
...@@ -501,7 +500,6 @@ RUNTIME_FUNCTION(Runtime_NewSloppyArguments_Generic) { ...@@ -501,7 +500,6 @@ RUNTIME_FUNCTION(Runtime_NewSloppyArguments_Generic) {
return *NewSloppyArguments(isolate, callee, argument_getter, argument_count); return *NewSloppyArguments(isolate, callee, argument_getter, argument_count);
} }
RUNTIME_FUNCTION(Runtime_NewStrictArguments) { RUNTIME_FUNCTION(Runtime_NewStrictArguments) {
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(1, args.length()); DCHECK_EQ(1, args.length());
...@@ -552,37 +550,6 @@ RUNTIME_FUNCTION(Runtime_NewRestParameter) { ...@@ -552,37 +550,6 @@ RUNTIME_FUNCTION(Runtime_NewRestParameter) {
return *result; return *result;
} }
RUNTIME_FUNCTION(Runtime_NewSloppyArguments) {
HandleScope scope(isolate);
DCHECK_EQ(1, args.length());
CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0);
StackFrameIterator iterator(isolate);
// Stub/interpreter handler frame
iterator.Advance();
DCHECK(iterator.frame()->type() == StackFrame::STUB);
// Function frame
iterator.Advance();
JavaScriptFrame* function_frame = JavaScriptFrame::cast(iterator.frame());
DCHECK(function_frame->is_java_script());
int argc = function_frame->ComputeParametersCount();
Address fp = function_frame->fp();
if (function_frame->has_adapted_arguments()) {
iterator.Advance();
ArgumentsAdaptorFrame* adaptor_frame =
ArgumentsAdaptorFrame::cast(iterator.frame());
argc = adaptor_frame->ComputeParametersCount();
fp = adaptor_frame->fp();
}
Address parameters =
fp + argc * kSystemPointerSize + StandardFrameConstants::kCallerSPOffset;
ParameterArguments argument_getter(parameters);
return *NewSloppyArguments(isolate, callee, argument_getter, argc);
}
RUNTIME_FUNCTION(Runtime_NewArgumentsElements) { RUNTIME_FUNCTION(Runtime_NewArgumentsElements) {
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(3, args.length()); DCHECK_EQ(3, args.length());
......
...@@ -403,8 +403,7 @@ namespace internal { ...@@ -403,8 +403,7 @@ namespace internal {
F(NewClosure_Tenured, 2, 1) \ F(NewClosure_Tenured, 2, 1) \
F(NewFunctionContext, 1, 1) \ F(NewFunctionContext, 1, 1) \
F(NewRestParameter, 1, 1) \ F(NewRestParameter, 1, 1) \
F(NewSloppyArguments, 3, 1) \ F(NewSloppyArguments, 1, 1) \
F(NewSloppyArguments_Generic, 1, 1) \
F(NewStrictArguments, 1, 1) \ F(NewStrictArguments, 1, 1) \
F(PushBlockContext, 1, 1) \ F(PushBlockContext, 1, 1) \
F(PushCatchContext, 2, 1) \ F(PushCatchContext, 2, 1) \
......
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