Commit 1ac263b1 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[cleanup] Rename FastArray* to ArrayPrototype*

Rename FastArray{Push,Pop,Shift,Slice} to
ArrayPrototype{Push,Pop,Shift,Slice}.

Bug: v8:7127, v8:7204, v8:7205
Change-Id: I409fcb4b088f1acece7c6520690f419cad36e78c
Reviewed-on: https://chromium-review.googlesource.com/846982Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50334}
parent ce8f5141
......@@ -1686,12 +1686,14 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
false);
SimpleInstallFunction(proto, "findIndex",
Builtins::kArrayPrototypeFindIndex, 1, false);
SimpleInstallFunction(proto, "pop", Builtins::kFastArrayPop, 0, false);
SimpleInstallFunction(proto, "push", Builtins::kFastArrayPush, 1, false);
SimpleInstallFunction(proto, "shift", Builtins::kFastArrayShift, 0, false);
SimpleInstallFunction(proto, "pop", Builtins::kArrayPrototypePop, 0, false);
SimpleInstallFunction(proto, "push", Builtins::kArrayPrototypePush, 1,
false);
SimpleInstallFunction(proto, "shift", Builtins::kArrayPrototypeShift, 0,
false);
SimpleInstallFunction(proto, "unshift", Builtins::kArrayUnshift, 1, false);
if (FLAG_enable_experimental_builtins) {
SimpleInstallFunction(proto, "slice", Builtins::kFastArraySlice, 2,
SimpleInstallFunction(proto, "slice", Builtins::kArrayPrototypeSlice, 2,
false);
} else {
SimpleInstallFunction(proto, "slice", Builtins::kArraySlice, 2, false);
......
......@@ -898,7 +898,7 @@ class ArrayBuiltinCodeStubAssembler : public CodeStubAssembler {
ElementsKind source_elements_kind_ = ElementsKind::NO_ELEMENTS;
};
TF_BUILTIN(FastArrayPop, CodeStubAssembler) {
TF_BUILTIN(ArrayPrototypePop, CodeStubAssembler) {
Node* argc = Parameter(BuiltinDescriptor::kArgumentsCount);
Node* context = Parameter(BuiltinDescriptor::kContext);
CSA_ASSERT(this, IsUndefined(Parameter(BuiltinDescriptor::kNewTarget)));
......@@ -996,7 +996,7 @@ TF_BUILTIN(FastArrayPop, CodeStubAssembler) {
}
}
TF_BUILTIN(FastArrayPush, CodeStubAssembler) {
TF_BUILTIN(ArrayPrototypePush, CodeStubAssembler) {
TVARIABLE(IntPtrT, arg_index);
Label default_label(this, &arg_index);
Label smi_transition(this);
......@@ -1125,9 +1125,10 @@ TF_BUILTIN(FastArrayPush, CodeStubAssembler) {
}
}
class FastArraySliceCodeStubAssembler : public CodeStubAssembler {
class ArrayPrototypeSliceCodeStubAssembler : public CodeStubAssembler {
public:
explicit FastArraySliceCodeStubAssembler(compiler::CodeAssemblerState* state)
explicit ArrayPrototypeSliceCodeStubAssembler(
compiler::CodeAssemblerState* state)
: CodeStubAssembler(state) {}
Node* HandleFastSlice(Node* context, Node* array, Node* from, Node* count,
......@@ -1283,7 +1284,7 @@ class FastArraySliceCodeStubAssembler : public CodeStubAssembler {
}
};
TF_BUILTIN(FastArraySlice, FastArraySliceCodeStubAssembler) {
TF_BUILTIN(ArrayPrototypeSlice, ArrayPrototypeSliceCodeStubAssembler) {
Node* const argc =
ChangeInt32ToIntPtr(Parameter(BuiltinDescriptor::kArgumentsCount));
TNode<Context> context = CAST(Parameter(BuiltinDescriptor::kContext));
......@@ -1458,7 +1459,7 @@ TF_BUILTIN(FastArraySlice, FastArraySliceCodeStubAssembler) {
args.PopAndReturn(a);
}
TF_BUILTIN(FastArrayShift, CodeStubAssembler) {
TF_BUILTIN(ArrayPrototypeShift, CodeStubAssembler) {
Node* argc = Parameter(BuiltinDescriptor::kArgumentsCount);
Node* context = Parameter(BuiltinDescriptor::kContext);
CSA_ASSERT(this, IsUndefined(Parameter(BuiltinDescriptor::kNewTarget)));
......
......@@ -251,16 +251,16 @@ namespace internal {
TFJ(ArrayIndexOf, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
/* ES6 #sec-array.prototype.pop */ \
CPP(ArrayPop) \
TFJ(FastArrayPop, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
TFJ(ArrayPrototypePop, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
/* ES6 #sec-array.prototype.push */ \
CPP(ArrayPush) \
TFJ(FastArrayPush, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
TFJ(ArrayPrototypePush, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
/* ES6 #sec-array.prototype.shift */ \
CPP(ArrayShift) \
TFJ(FastArrayShift, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
TFJ(ArrayPrototypeShift, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
/* ES6 #sec-array.prototype.slice */ \
CPP(ArraySlice) \
TFJ(FastArraySlice, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
TFJ(ArrayPrototypeSlice, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
/* ES6 #sec-array.prototype.splice */ \
CPP(ArraySplice) \
/* ES6 #sec-array.prototype.unshift */ \
......
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