Commit 33baade2 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[csa][cleanup] Remove unused IsValid(SmiIndex)

Bug: v8:7703
Change-Id: Ia4df2637873df5dc7b4beb6aaa781c7b4d32a54c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2292249Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68820}
parent c7e26aca
......@@ -547,24 +547,6 @@ TNode<Float64T> CodeStubAssembler::Float64Trunc(SloppyTNode<Float64T> x) {
return TNode<Float64T>::UncheckedCast(var_x.value());
}
TNode<BoolT> CodeStubAssembler::IsValidSmi(TNode<Smi> smi) {
if (SmiValuesAre32Bits() && kSystemPointerSize == kInt64Size) {
// Check that the Smi value is zero in the lower bits.
TNode<IntPtrT> value = BitcastTaggedToWordForTagAndSmiBits(smi);
return Word32Equal(Int32Constant(0), TruncateIntPtrToInt32(value));
}
return Int32TrueConstant();
}
TNode<BoolT> CodeStubAssembler::IsValidSmiIndex(TNode<Smi> smi) {
if (COMPRESS_POINTERS_BOOL) {
return WordEqual(
BitcastTaggedToWordForTagAndSmiBits(smi),
BitcastTaggedToWordForTagAndSmiBits(NormalizeSmiIndex(smi)));
}
return Int32TrueConstant();
}
template <>
TNode<Smi> CodeStubAssembler::TaggedToParameter(TNode<Smi> value) {
return value;
......
......@@ -401,11 +401,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
TNode<Smi> TaggedIndexToSmi(TNode<TaggedIndex> value);
TNode<TaggedIndex> SmiToTaggedIndex(TNode<Smi> value);
// Pointer compression specific. Returns true if the upper 32 bits of a Smi
// contain the sign of a lower 32 bits (i.e. not corrupted) so that the Smi
// can be directly used as an index in element offset computation.
TNode<BoolT> IsValidSmiIndex(TNode<Smi> smi);
// Pointer compression specific. Ensures that the upper 32 bits of a Smi
// contain the sign of a lower 32 bits so that the Smi can be directly used
// as an index in element offset computation.
......@@ -644,10 +639,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
BitcastTaggedToWordForTagAndSmiBits(b))); \
} else { \
DCHECK(SmiValuesAre31Bits()); \
if (kSystemPointerSize == kInt64Size) { \
CSA_ASSERT(this, IsValidSmi(a)); \
CSA_ASSERT(this, IsValidSmi(b)); \
} \
return BitcastWordToTaggedSigned(ChangeInt32ToIntPtr(Int32OpName( \
TruncateIntPtrToInt32(BitcastTaggedToWordForTagAndSmiBits(a)), \
TruncateIntPtrToInt32(BitcastTaggedToWordForTagAndSmiBits(b))))); \
......@@ -725,10 +716,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
} else { \
DCHECK_EQ(kTaggedSize, kInt32Size); \
DCHECK(SmiValuesAre31Bits()); \
if (kSystemPointerSize == kInt64Size) { \
CSA_ASSERT(this, IsValidSmi(a)); \
CSA_ASSERT(this, IsValidSmi(b)); \
} \
return Int32OpName( \
TruncateIntPtrToInt32(BitcastTaggedToWordForTagAndSmiBits(a)), \
TruncateIntPtrToInt32(BitcastTaggedToWordForTagAndSmiBits(b))); \
......@@ -3804,8 +3791,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
base::Optional<TNode<AllocationSite>> allocation_site,
TNode<IntPtrT> size_in_bytes);
TNode<BoolT> IsValidSmi(TNode<Smi> smi);
TNode<IntPtrT> SmiShiftBitsConstant() {
return IntPtrConstant(kSmiShiftSize + kSmiTagSize);
}
......
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