Commit 3e7fa30b authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC/s390: [builtins] Remove InternalArray and reduce InternalPackedArray constructors.

Port 640d3adf

Original Commit Message:

    InternalPackedArray now only has one constructor variant that expects no
    arguments (Chrome's only usage of InternalPackedArray). As such, these TFC
    builtins are no longer used and were removed:
    - InternalArrayNoArgumentConstructor_Holey
    - InternalArraySingleArgumentConstructor_Packed
    - InternalArraySingleArgumentConstructor_Holey

    On x64.release, this reduces builtins size by ~1.2KB.

R=peter.wm.wong@gmail.com, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I46d86178c33e47acf2fb75fd3de743686641caa1
Reviewed-on: https://chromium-review.googlesource.com/c/1393825Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58509}
parent 3136b4f5
......@@ -2927,19 +2927,6 @@ void Builtins::Generate_MathPowInternal(MacroAssembler* masm) {
__ Ret();
}
namespace {
void GenerateInternalArrayConstructorCase(MacroAssembler* masm) {
__ CmpP(r2, Operand(0));
__ Assert(eq, AbortReason::kWrongNumberOfArgumentsForInternalPackedArray);
__ Jump(
BUILTIN_CODE(masm->isolate(), InternalArrayNoArgumentConstructor_Packed),
RelocInfo::CODE_TARGET, lt);
}
} // namespace
void Builtins::Generate_InternalArrayConstructorImpl(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- r2 : argc
......@@ -2959,21 +2946,21 @@ void Builtins::Generate_InternalArrayConstructorImpl(MacroAssembler* masm) {
__ Assert(ne, AbortReason::kUnexpectedInitialMapForArrayFunction, cr0);
__ CompareObjectType(r5, r5, r6, MAP_TYPE);
__ Assert(eq, AbortReason::kUnexpectedInitialMapForArrayFunction);
}
// Figure out the right elements kind
__ LoadP(r5, FieldMemOperand(r3, JSFunction::kPrototypeOrInitialMapOffset));
// Load the map's "bit field 2" into |result|.
__ LoadlB(r5, FieldMemOperand(r5, Map::kBitField2Offset));
// Retrieve elements_kind from bit field 2.
__ DecodeField<Map::ElementsKindBits>(r5);
// Figure out the right elements kind
__ LoadP(r5, FieldMemOperand(r3, JSFunction::kPrototypeOrInitialMapOffset));
// Load the map's "bit field 2" into |result|.
__ LoadlB(r5, FieldMemOperand(r5, Map::kBitField2Offset));
// Retrieve elements_kind from bit field 2.
__ DecodeField<Map::ElementsKindBits>(r5);
if (FLAG_debug_code) {
__ CmpP(r5, Operand(PACKED_ELEMENTS));
__ Assert(eq, AbortReason::kInvalidElementsKindForInternalPackedArray);
}
GenerateInternalArrayConstructorCase(masm);
__ Jump(
BUILTIN_CODE(masm->isolate(), InternalArrayNoArgumentConstructor_Packed),
RelocInfo::CODE_TARGET);
}
namespace {
......
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