Commit 7a5d72d3 authored by Francis McCabe's avatar Francis McCabe Committed by Commit Bot

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

This reverts commit 0fe7a6cf.

Reason for revert: Causing tree to fail: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20debug/31566

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}

TBR=rmcilroy@chromium.org,solanes@chromium.org

Change-Id: Ie816bffee696bb03cf26e195405f0fe8509dd0f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9708
Bug: v8:6949
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2360048Reviewed-by: 's avatarFrancis McCabe <fgm@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69437}
parent 4ca68db1
......@@ -287,6 +287,15 @@ 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) {
......@@ -3637,6 +3646,7 @@ TNode<JSArray> CodeStubAssembler::AllocateJSArray(
AllocationFlags allocation_flags) {
CSA_SLOW_ASSERT(this, TaggedIsPositiveSmi(length));
ParameterMode capacity_mode = INTPTR_PARAMETERS;
TNode<JSArray> array;
TNode<FixedArrayBase> elements;
......@@ -3649,8 +3659,9 @@ TNode<JSArray> CodeStubAssembler::AllocateJSArray(
BIND(&nonempty);
{
FillFixedArrayWithValue(kind, elements, IntPtrConstant(0), capacity,
RootIndex::kTheHoleValue, INTPTR_PARAMETERS);
FillFixedArrayWithValue(kind, elements,
IntPtrOrSmiConstant(0, capacity_mode), capacity,
RootIndex::kTheHoleValue, capacity_mode);
Goto(&out);
}
......
......@@ -572,6 +572,8 @@ 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);
......
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