Commit fc98eff9 authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[cleanup] Remove some unneeded CodeFactory helpers for builtins

We can just call these builtins from CSA with the CallBuiltin helper
which calls Builtins::CallableFor.

Bug: v8:7754

Change-Id: I11cc9db37aba1b81dc4000600fed84fa84b6ff39
Reviewed-on: https://chromium-review.googlesource.com/1110130
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53957}
parent b40b0bd2
......@@ -1009,8 +1009,8 @@ TF_BUILTIN(ArrayPrototypePop, CodeStubAssembler) {
{
Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset,
MachineType::TaggedPointer());
TailCallStub(CodeFactory::ArrayPop(isolate()), context, target,
UndefinedConstant(), argc);
TailCallBuiltin(Builtins::kArrayPop, context, target, UndefinedConstant(),
argc);
}
}
......@@ -1141,8 +1141,8 @@ TF_BUILTIN(ArrayPrototypePush, CodeStubAssembler) {
{
Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset,
MachineType::TaggedPointer());
TailCallStub(CodeFactory::ArrayPush(isolate()), context, target,
UndefinedConstant(), argc);
TailCallBuiltin(Builtins::kArrayPush, context, target, UndefinedConstant(),
argc);
}
}
......@@ -1183,8 +1183,8 @@ class ArrayPrototypeSliceCodeStubAssembler : public CodeStubAssembler {
CSA_ASSERT(this, SmiGreaterThanOrEqual(CAST(from), SmiConstant(0)));
result.Bind(CallStub(CodeFactory::ExtractFastJSArray(isolate()), context,
array, from, count));
result.Bind(CallBuiltin(Builtins::kExtractFastJSArray, context, array, from,
count));
Goto(&done);
BIND(&try_fast_arguments);
......@@ -1339,7 +1339,7 @@ TF_BUILTIN(ArrayPrototypeSlice, ArrayPrototypeSliceCodeStubAssembler) {
BIND(&clone);
args.PopAndReturn(
CallStub(CodeFactory::CloneFastJSArray(isolate()), context, receiver));
CallBuiltin(Builtins::kCloneFastJSArray, context, receiver));
BIND(&check_arguments_length);
......@@ -1638,8 +1638,8 @@ TF_BUILTIN(ArrayPrototypeShift, CodeStubAssembler) {
{
Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset,
MachineType::TaggedPointer());
TailCallStub(CodeFactory::ArrayShift(isolate()), context, target,
UndefinedConstant(), argc);
TailCallBuiltin(Builtins::kArrayShift, context, target, UndefinedConstant(),
argc);
}
}
......
......@@ -186,8 +186,8 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
BIND(&slow);
Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset,
MachineType::TaggedPointer());
TailCallStub(CodeFactory::FunctionPrototypeBind(isolate()), context, target,
new_target, argc);
TailCallBuiltin(Builtins::kFunctionPrototypeBind, context, target, new_target,
argc);
}
// ES6 #sec-function.prototype-@@hasinstance
......
......@@ -437,38 +437,5 @@ Callable CodeFactory::InternalArraySingleArgumentConstructor(
}
}
// static
Callable CodeFactory::ArrayPop(Isolate* isolate) {
return Callable(BUILTIN_CODE(isolate, ArrayPop), JSTrampolineDescriptor{});
}
// static
Callable CodeFactory::ArrayShift(Isolate* isolate) {
return Callable(BUILTIN_CODE(isolate, ArrayShift), JSTrampolineDescriptor{});
}
// static
Callable CodeFactory::ExtractFastJSArray(Isolate* isolate) {
return Callable(BUILTIN_CODE(isolate, ExtractFastJSArray),
ExtractFastJSArrayDescriptor{});
}
// static
Callable CodeFactory::CloneFastJSArray(Isolate* isolate) {
return Callable(BUILTIN_CODE(isolate, CloneFastJSArray),
CloneFastJSArrayDescriptor{});
}
// static
Callable CodeFactory::ArrayPush(Isolate* isolate) {
return Callable(BUILTIN_CODE(isolate, ArrayPush), JSTrampolineDescriptor{});
}
// static
Callable CodeFactory::FunctionPrototypeBind(Isolate* isolate) {
return Callable(BUILTIN_CODE(isolate, FunctionPrototypeBind),
JSTrampolineDescriptor{});
}
} // namespace internal
} // namespace v8
......@@ -102,13 +102,6 @@ class V8_EXPORT_PRIVATE CodeFactory final {
ElementsKind kind);
static Callable InternalArraySingleArgumentConstructor(Isolate* isolate,
ElementsKind kind);
static Callable ArrayPop(Isolate* isolate);
static Callable ArrayPush(Isolate* isolate);
static Callable ArrayShift(Isolate* isolate);
static Callable ExtractFastJSArray(Isolate* isolate);
static Callable CloneFastJSArray(Isolate* isolate);
static Callable FunctionPrototypeBind(Isolate* isolate);
};
} // namespace internal
......
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