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) { ...@@ -1009,8 +1009,8 @@ TF_BUILTIN(ArrayPrototypePop, CodeStubAssembler) {
{ {
Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset, Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset,
MachineType::TaggedPointer()); MachineType::TaggedPointer());
TailCallStub(CodeFactory::ArrayPop(isolate()), context, target, TailCallBuiltin(Builtins::kArrayPop, context, target, UndefinedConstant(),
UndefinedConstant(), argc); argc);
} }
} }
...@@ -1141,8 +1141,8 @@ TF_BUILTIN(ArrayPrototypePush, CodeStubAssembler) { ...@@ -1141,8 +1141,8 @@ TF_BUILTIN(ArrayPrototypePush, CodeStubAssembler) {
{ {
Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset, Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset,
MachineType::TaggedPointer()); MachineType::TaggedPointer());
TailCallStub(CodeFactory::ArrayPush(isolate()), context, target, TailCallBuiltin(Builtins::kArrayPush, context, target, UndefinedConstant(),
UndefinedConstant(), argc); argc);
} }
} }
...@@ -1183,8 +1183,8 @@ class ArrayPrototypeSliceCodeStubAssembler : public CodeStubAssembler { ...@@ -1183,8 +1183,8 @@ class ArrayPrototypeSliceCodeStubAssembler : public CodeStubAssembler {
CSA_ASSERT(this, SmiGreaterThanOrEqual(CAST(from), SmiConstant(0))); CSA_ASSERT(this, SmiGreaterThanOrEqual(CAST(from), SmiConstant(0)));
result.Bind(CallStub(CodeFactory::ExtractFastJSArray(isolate()), context, result.Bind(CallBuiltin(Builtins::kExtractFastJSArray, context, array, from,
array, from, count)); count));
Goto(&done); Goto(&done);
BIND(&try_fast_arguments); BIND(&try_fast_arguments);
...@@ -1339,7 +1339,7 @@ TF_BUILTIN(ArrayPrototypeSlice, ArrayPrototypeSliceCodeStubAssembler) { ...@@ -1339,7 +1339,7 @@ TF_BUILTIN(ArrayPrototypeSlice, ArrayPrototypeSliceCodeStubAssembler) {
BIND(&clone); BIND(&clone);
args.PopAndReturn( args.PopAndReturn(
CallStub(CodeFactory::CloneFastJSArray(isolate()), context, receiver)); CallBuiltin(Builtins::kCloneFastJSArray, context, receiver));
BIND(&check_arguments_length); BIND(&check_arguments_length);
...@@ -1638,8 +1638,8 @@ TF_BUILTIN(ArrayPrototypeShift, CodeStubAssembler) { ...@@ -1638,8 +1638,8 @@ TF_BUILTIN(ArrayPrototypeShift, CodeStubAssembler) {
{ {
Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset, Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset,
MachineType::TaggedPointer()); MachineType::TaggedPointer());
TailCallStub(CodeFactory::ArrayShift(isolate()), context, target, TailCallBuiltin(Builtins::kArrayShift, context, target, UndefinedConstant(),
UndefinedConstant(), argc); argc);
} }
} }
......
...@@ -186,8 +186,8 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) { ...@@ -186,8 +186,8 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
BIND(&slow); BIND(&slow);
Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset, Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset,
MachineType::TaggedPointer()); MachineType::TaggedPointer());
TailCallStub(CodeFactory::FunctionPrototypeBind(isolate()), context, target, TailCallBuiltin(Builtins::kFunctionPrototypeBind, context, target, new_target,
new_target, argc); argc);
} }
// ES6 #sec-function.prototype-@@hasinstance // ES6 #sec-function.prototype-@@hasinstance
......
...@@ -437,38 +437,5 @@ Callable CodeFactory::InternalArraySingleArgumentConstructor( ...@@ -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 internal
} // namespace v8 } // namespace v8
...@@ -102,13 +102,6 @@ class V8_EXPORT_PRIVATE CodeFactory final { ...@@ -102,13 +102,6 @@ class V8_EXPORT_PRIVATE CodeFactory final {
ElementsKind kind); ElementsKind kind);
static Callable InternalArraySingleArgumentConstructor(Isolate* isolate, static Callable InternalArraySingleArgumentConstructor(Isolate* isolate,
ElementsKind kind); 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 } // 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