Reland "[csa][cleanup] Remove ParameterMode/TNodify IntPtrOrSmiConstant"

This is a reland of 0fe7a6cf62

Original change's description:
> [csa][cleanup] Remove ParameterMode/TNodify IntPtrOrSmiConstant
> 
> Bug: v8:9708, v8:6949
> Change-Id: I0a17eab689d8297218af92658bf5e63d34c94dfc
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2356387
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69435}

Bug: v8:9708
Bug: v8:6949
Change-Id: Ic91d1249cf3178165f2c378122e5700a0f36feb5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2361465
Auto-Submit: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69452}
This commit is contained in:
Santiago Aboy Solanes 2020-08-14 19:27:22 +01:00 committed by Commit Bot
parent 2f45e41aef
commit 8e8b2772a5
2 changed files with 2 additions and 15 deletions

View File

@ -287,15 +287,6 @@ TNode<RawPtrT> CodeStubAssembler::IntPtrOrSmiConstant<RawPtrT>(int value) {
return ReinterpretCast<RawPtrT>(IntPtrConstant(value));
}
Node* CodeStubAssembler::IntPtrOrSmiConstant(int value, ParameterMode mode) {
if (mode == SMI_PARAMETERS) {
return SmiConstant(value);
} else {
DCHECK_EQ(INTPTR_PARAMETERS, mode);
return IntPtrConstant(value);
}
}
bool CodeStubAssembler::TryGetIntPtrOrSmiConstantValue(Node* maybe_constant,
int* value,
ParameterMode mode) {
@ -3646,7 +3637,6 @@ TNode<JSArray> CodeStubAssembler::AllocateJSArray(
AllocationFlags allocation_flags) {
CSA_SLOW_ASSERT(this, TaggedIsPositiveSmi(length));
ParameterMode capacity_mode = INTPTR_PARAMETERS;
TNode<JSArray> array;
TNode<FixedArrayBase> elements;
@ -3659,9 +3649,8 @@ TNode<JSArray> CodeStubAssembler::AllocateJSArray(
BIND(&nonempty);
{
FillFixedArrayWithValue(kind, elements,
IntPtrOrSmiConstant(0, capacity_mode), capacity,
RootIndex::kTheHoleValue, capacity_mode);
FillFixedArrayWithValue(kind, elements, IntPtrConstant(0), capacity,
RootIndex::kTheHoleValue, INTPTR_PARAMETERS);
Goto(&out);
}

View File

@ -572,8 +572,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
template <typename TIndex>
TNode<TIndex> IntPtrOrSmiConstant(int value);
// TODO(v8:9708): remove once all uses are ported.
Node* IntPtrOrSmiConstant(int value, ParameterMode mode);
bool TryGetIntPtrOrSmiConstantValue(Node* maybe_constant, int* value,
ParameterMode mode);