[csa][cleanup] TNodify LoadAndUntagToWord32(Fixed)ArrayElement

Also remove ParameterMode

Bug: v8:9708, v8:6949
Change-Id: Iaf51004472a4aef0acf29d01497b1047247dc83d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349301
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69342}
This commit is contained in:
Santiago Aboy Solanes 2020-08-11 15:42:29 +01:00 committed by Commit Bot
parent 7e9322335e
commit f6af044d34
2 changed files with 12 additions and 21 deletions

View File

@ -2372,9 +2372,8 @@ template TNode<MaybeObject> CodeStubAssembler::LoadFeedbackVectorSlot(
template <typename Array>
TNode<Int32T> CodeStubAssembler::LoadAndUntagToWord32ArrayElement(
TNode<Array> object, int array_header_size, Node* index_node,
int additional_offset, ParameterMode parameter_mode) {
CSA_SLOW_ASSERT(this, MatchesParameterMode(index_node, parameter_mode));
TNode<Array> object, int array_header_size, TNode<IntPtrT> index,
int additional_offset) {
DCHECK(IsAligned(additional_offset, kTaggedSize));
int endian_correction = 0;
#if V8_TARGET_LITTLE_ENDIAN
@ -2382,8 +2381,8 @@ TNode<Int32T> CodeStubAssembler::LoadAndUntagToWord32ArrayElement(
#endif
int32_t header_size = array_header_size + additional_offset - kHeapObjectTag +
endian_correction;
TNode<IntPtrT> offset = ElementOffsetFromIndex(index_node, HOLEY_ELEMENTS,
parameter_mode, header_size);
TNode<IntPtrT> offset =
ElementOffsetFromIndex(index, HOLEY_ELEMENTS, header_size);
CSA_ASSERT(this, IsOffsetInBounds(offset, LoadArrayLength(object),
array_header_size + endian_correction));
if (SmiValuesAre32Bits()) {
@ -2394,12 +2393,10 @@ TNode<Int32T> CodeStubAssembler::LoadAndUntagToWord32ArrayElement(
}
TNode<Int32T> CodeStubAssembler::LoadAndUntagToWord32FixedArrayElement(
TNode<FixedArray> object, Node* index_node, int additional_offset,
ParameterMode parameter_mode) {
TNode<FixedArray> object, TNode<IntPtrT> index, int additional_offset) {
CSA_SLOW_ASSERT(this, IsFixedArraySubclass(object));
return LoadAndUntagToWord32ArrayElement(object, FixedArray::kHeaderSize,
index_node, additional_offset,
parameter_mode);
index, additional_offset);
}
TNode<MaybeObject> CodeStubAssembler::LoadWeakFixedArrayElement(

View File

@ -1367,21 +1367,15 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
// Array is any array-like type that has a fixed header followed by
// tagged elements.
template <typename Array>
TNode<Int32T> LoadAndUntagToWord32ArrayElement(
TNode<Array> array, int array_header_size, Node* index,
int additional_offset = 0,
ParameterMode parameter_mode = INTPTR_PARAMETERS);
TNode<Int32T> LoadAndUntagToWord32ArrayElement(TNode<Array> array,
int array_header_size,
TNode<IntPtrT> index,
int additional_offset = 0);
// Load an array element from a FixedArray, untag it and return it as Word32.
TNode<Int32T> LoadAndUntagToWord32FixedArrayElement(
TNode<FixedArray> object, Node* index, int additional_offset = 0,
ParameterMode parameter_mode = INTPTR_PARAMETERS);
TNode<Int32T> LoadAndUntagToWord32FixedArrayElement(
TNode<FixedArray> object, int index, int additional_offset = 0) {
return LoadAndUntagToWord32FixedArrayElement(
object, IntPtrConstant(index), additional_offset, INTPTR_PARAMETERS);
}
TNode<FixedArray> object, TNode<IntPtrT> index,
int additional_offset = 0);
// Load an array element from a WeakFixedArray.
TNode<MaybeObject> LoadWeakFixedArrayElement(TNode<WeakFixedArray> object,