[csa][cleanup] Remove ParameterMode from UnsafeLoadFixedArrayElement
Also remove a version that was only used once. Bug: v8:9708, v8:6949 Change-Id: Ifd65af3866a3740d8da6d4501445b25a48d7219a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2212264 Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#68006}
This commit is contained in:
parent
3ed3d9c8e0
commit
da783d1ad9
@ -761,7 +761,7 @@ void CollectionsBuiltinsAssembler::FindOrderedHashTableEntry(
|
||||
const TNode<IntPtrT> number_of_buckets =
|
||||
SmiUntag(CAST(UnsafeLoadFixedArrayElement(
|
||||
table, CollectionType::NumberOfBucketsIndex())));
|
||||
const TNode<WordT> bucket =
|
||||
const TNode<IntPtrT> bucket =
|
||||
WordAnd(hash, IntPtrSub(number_of_buckets, IntPtrConstant(1)));
|
||||
const TNode<IntPtrT> first_entry = SmiUntag(CAST(UnsafeLoadFixedArrayElement(
|
||||
table, bucket, CollectionType::HashTableStartIndex() * kTaggedSize)));
|
||||
|
@ -6817,13 +6817,13 @@ TNode<String> CodeStubAssembler::NumberToString(TNode<Number> input,
|
||||
TNode<Word32T> hash = Word32And(SmiToInt32(smi_input.value()), mask);
|
||||
TNode<IntPtrT> entry_index =
|
||||
Signed(ChangeUint32ToWord(Int32Add(hash, hash)));
|
||||
TNode<Object> smi_key = UnsafeLoadFixedArrayElement(
|
||||
number_string_cache, entry_index, 0, INTPTR_PARAMETERS);
|
||||
TNode<Object> smi_key =
|
||||
UnsafeLoadFixedArrayElement(number_string_cache, entry_index);
|
||||
GotoIf(TaggedNotEqual(smi_key, smi_input.value()), bailout);
|
||||
|
||||
// Smi match, return value from cache entry.
|
||||
result = CAST(UnsafeLoadFixedArrayElement(number_string_cache, entry_index,
|
||||
kTaggedSize, INTPTR_PARAMETERS));
|
||||
kTaggedSize));
|
||||
Goto(&done);
|
||||
}
|
||||
BIND(&done);
|
||||
|
@ -1411,11 +1411,10 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
// This doesn't emit a bounds-check. As part of the security-performance
|
||||
// tradeoff, only use it if it is performance critical.
|
||||
TNode<Object> UnsafeLoadFixedArrayElement(
|
||||
TNode<FixedArray> object, Node* index, int additional_offset = 0,
|
||||
ParameterMode parameter_mode = INTPTR_PARAMETERS,
|
||||
TNode<FixedArray> object, TNode<IntPtrT> index, int additional_offset = 0,
|
||||
LoadSensitivity needs_poisoning = LoadSensitivity::kSafe) {
|
||||
return LoadFixedArrayElement(object, index, additional_offset,
|
||||
parameter_mode, needs_poisoning,
|
||||
INTPTR_PARAMETERS, needs_poisoning,
|
||||
CheckBounds::kDebugOnly);
|
||||
}
|
||||
|
||||
@ -1426,14 +1425,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
return LoadFixedArrayElement(object, index, 0, INTPTR_PARAMETERS,
|
||||
needs_poisoning, check_bounds);
|
||||
}
|
||||
// This doesn't emit a bounds-check. As part of the security-performance
|
||||
// tradeoff, only use it if it is performance critical.
|
||||
TNode<Object> UnsafeLoadFixedArrayElement(TNode<FixedArray> object,
|
||||
TNode<IntPtrT> index,
|
||||
LoadSensitivity needs_poisoning) {
|
||||
return LoadFixedArrayElement(object, index, needs_poisoning,
|
||||
CheckBounds::kDebugOnly);
|
||||
}
|
||||
|
||||
TNode<Object> LoadFixedArrayElement(
|
||||
TNode<FixedArray> object, TNode<IntPtrT> index, int additional_offset = 0,
|
||||
|
@ -683,8 +683,9 @@ TNode<Uint32T> InterpreterAssembler::BytecodeOperandIntrinsicId(
|
||||
TNode<Object> InterpreterAssembler::LoadConstantPoolEntry(TNode<WordT> index) {
|
||||
TNode<FixedArray> constant_pool = CAST(LoadObjectField(
|
||||
BytecodeArrayTaggedPointer(), BytecodeArray::kConstantPoolOffset));
|
||||
return UnsafeLoadFixedArrayElement(
|
||||
constant_pool, UncheckedCast<IntPtrT>(index), LoadSensitivity::kCritical);
|
||||
return UnsafeLoadFixedArrayElement(constant_pool,
|
||||
UncheckedCast<IntPtrT>(index), 0,
|
||||
LoadSensitivity::kCritical);
|
||||
}
|
||||
|
||||
TNode<IntPtrT> InterpreterAssembler::LoadAndUntagConstantPoolEntry(
|
||||
|
Loading…
Reference in New Issue
Block a user