Commit d0302e1a authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[csa] Typify CSA::LoadFixedArrayElement() and friends.

Bug: v8:7310
Change-Id: I942d038d8d213b394fe5c6e158a5eb0fc32912db
Reviewed-on: https://chromium-review.googlesource.com/983778Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52281}
parent cd43b83b
......@@ -491,7 +491,7 @@ TNode<BoolT> BaseCollectionsAssembler::HasInitialCollectionPrototype(
TNode<Object> BaseCollectionsAssembler::LoadAndNormalizeFixedArrayElement(
TNode<Object> elements, TNode<IntPtrT> index) {
TNode<Object> element = CAST(LoadFixedArrayElement(elements, index));
TNode<Object> element = LoadFixedArrayElement(elements, index);
return Select<Object>(IsTheHole(element), [=] { return UndefinedConstant(); },
[=] { return element; });
}
......@@ -1058,12 +1058,12 @@ void CollectionsBuiltinsAssembler::FindOrderedHashTableEntry(
std::function<void(Node*, Label*, Label*)> key_compare,
Variable* entry_start_position, Label* entry_found, Label* not_found) {
// Get the index of the bucket.
Node* const number_of_buckets = SmiUntag(
LoadFixedArrayElement(table, CollectionType::kNumberOfBucketsIndex));
Node* const number_of_buckets = SmiUntag(CAST(
LoadFixedArrayElement(table, CollectionType::kNumberOfBucketsIndex)));
Node* const bucket =
WordAnd(hash, IntPtrSub(number_of_buckets, IntPtrConstant(1)));
Node* const first_entry = SmiUntag(LoadFixedArrayElement(
table, bucket, CollectionType::kHashTableStartIndex * kPointerSize));
Node* const first_entry = SmiUntag(CAST(LoadFixedArrayElement(
table, bucket, CollectionType::kHashTableStartIndex * kPointerSize)));
// Walk the bucket chain.
Node* entry_start;
......@@ -1086,10 +1086,10 @@ void CollectionsBuiltinsAssembler::FindOrderedHashTableEntry(
UintPtrLessThan(
var_entry.value(),
SmiUntag(SmiAdd(
LoadFixedArrayElement(table,
CollectionType::kNumberOfElementsIndex),
LoadFixedArrayElement(
table, CollectionType::kNumberOfDeletedElementsIndex)))));
CAST(LoadFixedArrayElement(
table, CollectionType::kNumberOfElementsIndex)),
CAST(LoadFixedArrayElement(
table, CollectionType::kNumberOfDeletedElementsIndex))))));
// Compute the index of the entry relative to kHashTableStartIndex.
entry_start =
......@@ -1106,10 +1106,10 @@ void CollectionsBuiltinsAssembler::FindOrderedHashTableEntry(
BIND(&continue_next_entry);
// Load the index of the next entry in the bucket chain.
var_entry.Bind(SmiUntag(LoadFixedArrayElement(
var_entry.Bind(SmiUntag(CAST(LoadFixedArrayElement(
table, entry_start,
(CollectionType::kHashTableStartIndex + CollectionType::kChainOffset) *
kPointerSize)));
kPointerSize))));
Goto(&loop);
}
......@@ -1360,8 +1360,8 @@ TF_BUILTIN(MapPrototypeSet, CollectionsBuiltinsAssembler) {
VARIABLE(table_var, MachineRepresentation::kTaggedPointer, table);
{
// Check we have enough space for the entry.
number_of_buckets.Bind(SmiUntag(
LoadFixedArrayElement(table, OrderedHashMap::kNumberOfBucketsIndex)));
number_of_buckets.Bind(SmiUntag(CAST(
LoadFixedArrayElement(table, OrderedHashMap::kNumberOfBucketsIndex))));
STATIC_ASSERT(OrderedHashMap::kLoadFactor == 2);
Node* const capacity = WordShl(number_of_buckets.value(), 1);
......@@ -1376,8 +1376,8 @@ TF_BUILTIN(MapPrototypeSet, CollectionsBuiltinsAssembler) {
// fields.
CallRuntime(Runtime::kMapGrow, context, receiver);
table_var.Bind(LoadObjectField(receiver, JSMap::kTableOffset));
number_of_buckets.Bind(SmiUntag(LoadFixedArrayElement(
table_var.value(), OrderedHashMap::kNumberOfBucketsIndex)));
number_of_buckets.Bind(SmiUntag(CAST(LoadFixedArrayElement(
table_var.value(), OrderedHashMap::kNumberOfBucketsIndex))));
Node* const new_number_of_elements = SmiUntag(CAST(LoadObjectField(
table_var.value(), OrderedHashMap::kNumberOfElementsOffset)));
Node* const new_number_of_deleted = SmiUntag(CAST(LoadObjectField(
......@@ -1516,7 +1516,7 @@ TF_BUILTIN(SetPrototypeAdd, CollectionsBuiltinsAssembler) {
&add_entry);
// Otherwise, go to runtime to compute the hash code.
entry_start_position_or_hash.Bind(SmiUntag((CallGetOrCreateHashRaw(key))));
entry_start_position_or_hash.Bind(SmiUntag(CallGetOrCreateHashRaw(key)));
Goto(&add_entry);
}
......@@ -1526,8 +1526,8 @@ TF_BUILTIN(SetPrototypeAdd, CollectionsBuiltinsAssembler) {
VARIABLE(table_var, MachineRepresentation::kTaggedPointer, table);
{
// Check we have enough space for the entry.
number_of_buckets.Bind(SmiUntag(
LoadFixedArrayElement(table, OrderedHashSet::kNumberOfBucketsIndex)));
number_of_buckets.Bind(SmiUntag(CAST(
LoadFixedArrayElement(table, OrderedHashSet::kNumberOfBucketsIndex))));
STATIC_ASSERT(OrderedHashSet::kLoadFactor == 2);
Node* const capacity = WordShl(number_of_buckets.value(), 1);
......@@ -1542,8 +1542,8 @@ TF_BUILTIN(SetPrototypeAdd, CollectionsBuiltinsAssembler) {
// fields.
CallRuntime(Runtime::kSetGrow, context, receiver);
table_var.Bind(LoadObjectField(receiver, JSMap::kTableOffset));
number_of_buckets.Bind(SmiUntag(LoadFixedArrayElement(
table_var.value(), OrderedHashSet::kNumberOfBucketsIndex)));
number_of_buckets.Bind(SmiUntag(CAST(LoadFixedArrayElement(
table_var.value(), OrderedHashSet::kNumberOfBucketsIndex))));
Node* const new_number_of_elements = SmiUntag(CAST(LoadObjectField(
table_var.value(), OrderedHashSet::kNumberOfElementsOffset)));
Node* const new_number_of_deleted = SmiUntag(CAST(LoadObjectField(
......@@ -2220,7 +2220,7 @@ TNode<IntPtrT> WeakCollectionsBuiltinsAssembler::FindKeyIndex(
TNode<IntPtrT> key_index;
{
key_index = KeyIndexFromEntry(var_entry.value());
TNode<Object> entry_key = CAST(LoadFixedArrayElement(table, key_index));
TNode<Object> entry_key = LoadFixedArrayElement(table, key_index);
key_compare(entry_key, &if_found);
......@@ -2269,15 +2269,15 @@ TNode<IntPtrT> WeakCollectionsBuiltinsAssembler::KeyIndexFromEntry(
TNode<IntPtrT> WeakCollectionsBuiltinsAssembler::LoadNumberOfElements(
TNode<Object> table, int offset) {
TNode<IntPtrT> number_of_elements = SmiUntag(
LoadFixedArrayElement(table, ObjectHashTable::kNumberOfElementsIndex));
TNode<IntPtrT> number_of_elements = SmiUntag(CAST(
LoadFixedArrayElement(table, ObjectHashTable::kNumberOfElementsIndex)));
return IntPtrAdd(number_of_elements, IntPtrConstant(offset));
}
TNode<IntPtrT> WeakCollectionsBuiltinsAssembler::LoadNumberOfDeleted(
TNode<Object> table, int offset) {
TNode<IntPtrT> number_of_deleted = SmiUntag(LoadFixedArrayElement(
table, ObjectHashTable::kNumberOfDeletedElementsIndex));
TNode<IntPtrT> number_of_deleted = SmiUntag(CAST(LoadFixedArrayElement(
table, ObjectHashTable::kNumberOfDeletedElementsIndex)));
return IntPtrAdd(number_of_deleted, IntPtrConstant(offset));
}
......@@ -2289,7 +2289,7 @@ TNode<Object> WeakCollectionsBuiltinsAssembler::LoadTable(
TNode<IntPtrT> WeakCollectionsBuiltinsAssembler::LoadTableCapacity(
TNode<Object> table) {
return SmiUntag(
LoadFixedArrayElement(table, ObjectHashTable::kCapacityIndex));
CAST(LoadFixedArrayElement(table, ObjectHashTable::kCapacityIndex)));
}
TNode<Word32T> WeakCollectionsBuiltinsAssembler::InsufficientCapacityToAdd(
......
......@@ -44,7 +44,7 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
// AccessorInfo objects. In that case, their value can be recomputed even if
// the actual value on the object changes.
Comment("Check descriptor array length");
Node* descriptors = LoadMapDescriptors(receiver_map);
TNode<DescriptorArray> descriptors = LoadMapDescriptors(receiver_map);
Node* descriptors_length = LoadFixedArrayBaseLength(descriptors);
GotoIf(SmiLessThanOrEqual(descriptors_length, SmiConstant(1)), &slow);
......@@ -54,15 +54,15 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
Comment("Check name and length properties");
{
const int length_index = JSFunction::kLengthDescriptorIndex;
Node* maybe_length = LoadFixedArrayElement(
descriptors, DescriptorArray::ToKeyIndex(length_index));
TNode<Name> maybe_length = CAST(LoadFixedArrayElement(
descriptors, DescriptorArray::ToKeyIndex(length_index)));
GotoIf(WordNotEqual(maybe_length, LoadRoot(Heap::klength_stringRootIndex)),
&slow);
Node* maybe_length_accessor = LoadFixedArrayElement(
TNode<Object> maybe_length_accessor = LoadFixedArrayElement(
descriptors, DescriptorArray::ToValueIndex(length_index));
GotoIf(TaggedIsSmi(maybe_length_accessor), &slow);
Node* length_value_map = LoadMap(maybe_length_accessor);
Node* length_value_map = LoadMap(CAST(maybe_length_accessor));
GotoIfNot(IsAccessorInfoMap(length_value_map), &slow);
const int name_index = JSFunction::kNameDescriptorIndex;
......
......@@ -893,8 +893,8 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) {
Goto(&loop);
BIND(&loop);
{
TNode<HeapObject> microtask = TNode<HeapObject>::UncheckedCast(
LoadFixedArrayElement(queue, index.value()));
TNode<HeapObject> microtask =
CAST(LoadFixedArrayElement(queue, index.value()));
index = IntPtrAdd(index.value(), IntPtrConstant(1));
CSA_ASSERT(this, TaggedIsNotSmi(microtask));
......
......@@ -142,8 +142,8 @@ Node* RegExpBuiltinsAssembler::ConstructNewResultFromMatchInfo(
Label named_captures(this), out(this);
TNode<IntPtrT> num_indices = SmiUntag(LoadFixedArrayElement(
match_info, RegExpMatchInfo::kNumberOfCapturesIndex));
TNode<IntPtrT> num_indices = SmiUntag(CAST(LoadFixedArrayElement(
match_info, RegExpMatchInfo::kNumberOfCapturesIndex)));
Node* const num_results = SmiTag(WordShr(num_indices, 1));
Node* const start =
LoadFixedArrayElement(match_info, RegExpMatchInfo::kFirstCaptureIndex);
......
......@@ -1595,8 +1595,8 @@ TNode<IntPtrT> CodeStubAssembler::LoadJSReceiverIdentityHash(
BIND(&if_property_dictionary);
{
var_hash = SmiUntag(
LoadFixedArrayElement(properties, NameDictionary::kObjectHashIndex));
var_hash = SmiUntag(CAST(
LoadFixedArrayElement(properties, NameDictionary::kObjectHashIndex)));
Goto(&done);
}
......@@ -1666,17 +1666,18 @@ TNode<Object> CodeStubAssembler::LoadWeakCellValue(
return value;
}
Node* CodeStubAssembler::LoadFixedArrayElement(
Node* object, Node* index_node, int additional_offset,
TNode<Object> CodeStubAssembler::LoadFixedArrayElement(
SloppyTNode<Object> object, Node* index_node, int additional_offset,
ParameterMode parameter_mode, LoadSensitivity needs_poisoning) {
CSA_SLOW_ASSERT(this, IntPtrGreaterThanOrEqual(
ParameterToIntPtr(index_node, parameter_mode),
IntPtrConstant(0)));
int32_t header_size =
FixedArray::kHeaderSize + additional_offset - kHeapObjectTag;
Node* offset = ElementOffsetFromIndex(index_node, HOLEY_ELEMENTS,
parameter_mode, header_size);
return Load(MachineType::AnyTagged(), object, offset, needs_poisoning);
TNode<IntPtrT> offset = ElementOffsetFromIndex(index_node, HOLEY_ELEMENTS,
parameter_mode, header_size);
return UncheckedCast<Object>(
Load(MachineType::AnyTagged(), object, offset, needs_poisoning));
}
TNode<RawPtrT> CodeStubAssembler::LoadFixedTypedArrayBackingStore(
......@@ -1884,8 +1885,8 @@ TNode<Object> CodeStubAssembler::LoadFeedbackVectorSlot(
return UncheckedCast<Object>(Load(MachineType::AnyTagged(), object, offset));
}
Node* CodeStubAssembler::LoadAndUntagToWord32FixedArrayElement(
Node* object, Node* index_node, int additional_offset,
TNode<Int32T> CodeStubAssembler::LoadAndUntagToWord32FixedArrayElement(
SloppyTNode<Object> object, Node* index_node, int additional_offset,
ParameterMode parameter_mode) {
CSA_SLOW_ASSERT(this, IsFixedArraySubclass(object));
CSA_SLOW_ASSERT(this, MatchesParameterMode(index_node, parameter_mode));
......@@ -1899,7 +1900,7 @@ Node* CodeStubAssembler::LoadAndUntagToWord32FixedArrayElement(
Node* offset = ElementOffsetFromIndex(index_node, HOLEY_ELEMENTS,
parameter_mode, header_size);
if (Is64()) {
return Load(MachineType::Int32(), object, offset);
return UncheckedCast<Int32T>(Load(MachineType::Int32(), object, offset));
} else {
return SmiToInt32(Load(MachineType::AnyTagged(), object, offset));
}
......@@ -7701,10 +7702,10 @@ Node* CodeStubAssembler::OrdinaryHasInstance(Node* context, Node* callable,
return var_result.value();
}
Node* CodeStubAssembler::ElementOffsetFromIndex(Node* index_node,
ElementsKind kind,
ParameterMode mode,
int base_size) {
TNode<IntPtrT> CodeStubAssembler::ElementOffsetFromIndex(Node* index_node,
ElementsKind kind,
ParameterMode mode,
int base_size) {
int element_size_shift = ElementsKindToShiftSize(kind);
int element_size = 1 << element_size_shift;
int const kSmiShiftBits = kSmiShiftSize + kSmiTagSize;
......@@ -7724,13 +7725,13 @@ Node* CodeStubAssembler::ElementOffsetFromIndex(Node* index_node,
return IntPtrConstant(base_size + element_size * index);
}
Node* shifted_index =
TNode<WordT> shifted_index =
(element_size_shift == 0)
? index_node
? UncheckedCast<WordT>(index_node)
: ((element_size_shift > 0)
? WordShl(index_node, IntPtrConstant(element_size_shift))
: WordSar(index_node, IntPtrConstant(-element_size_shift)));
return IntPtrAdd(IntPtrConstant(base_size), shifted_index);
return IntPtrAdd(IntPtrConstant(base_size), Signed(shifted_index));
}
Node* CodeStubAssembler::LoadFeedbackVector(Node* closure) {
......@@ -7953,10 +7954,10 @@ TNode<Context> CodeStubAssembler::LoadScriptContext(
TNode<ScriptContextTable> script_context_table = CAST(
LoadContextElement(native_context, Context::SCRIPT_CONTEXT_TABLE_INDEX));
Node* script_context = LoadFixedArrayElement(
TNode<Context> script_context = CAST(LoadFixedArrayElement(
script_context_table, context_index,
ScriptContextTable::kFirstContextSlotIndex * kPointerSize);
return CAST(script_context);
ScriptContextTable::kFirstContextSlotIndex * kPointerSize));
return script_context;
}
namespace {
......
......@@ -599,26 +599,44 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Label* if_cleared = nullptr);
// Load an array element from a FixedArray.
Node* LoadFixedArrayElement(
Node* object, Node* index, int additional_offset = 0,
TNode<Object> LoadFixedArrayElement(
SloppyTNode<Object> object, Node* index, int additional_offset = 0,
ParameterMode parameter_mode = INTPTR_PARAMETERS,
LoadSensitivity needs_poisoning = LoadSensitivity::kSafe);
Node* LoadFixedArrayElement(Node* object, Node* index,
LoadSensitivity needs_poisoning) {
TNode<Object> LoadFixedArrayElement(SloppyTNode<Object> object,
TNode<IntPtrT> index,
LoadSensitivity needs_poisoning) {
return LoadFixedArrayElement(object, index, 0, INTPTR_PARAMETERS,
needs_poisoning);
}
Node* LoadFixedArrayElement(
Node* object, int index, int additional_offset = 0,
TNode<Object> LoadFixedArrayElement(
SloppyTNode<Object> object, TNode<IntPtrT> index,
int additional_offset = 0,
LoadSensitivity needs_poisoning = LoadSensitivity::kSafe) {
return LoadFixedArrayElement(object, index, additional_offset,
INTPTR_PARAMETERS, needs_poisoning);
}
TNode<Object> LoadFixedArrayElement(
SloppyTNode<Object> object, int index, int additional_offset = 0,
LoadSensitivity needs_poisoning = LoadSensitivity::kSafe) {
return LoadFixedArrayElement(object, IntPtrConstant(index),
additional_offset, INTPTR_PARAMETERS,
needs_poisoning);
}
// Load an array element from a FixedArray, untag it and return it as Word32.
Node* LoadAndUntagToWord32FixedArrayElement(
Node* object, Node* index, int additional_offset = 0,
TNode<Int32T> LoadAndUntagToWord32FixedArrayElement(
SloppyTNode<Object> object, Node* index, int additional_offset = 0,
ParameterMode parameter_mode = INTPTR_PARAMETERS);
TNode<Int32T> LoadAndUntagToWord32FixedArrayElement(
SloppyTNode<Object> object, int index, int additional_offset = 0) {
return LoadAndUntagToWord32FixedArrayElement(
object, IntPtrConstant(index), additional_offset, INTPTR_PARAMETERS);
}
// Load an array element from a FixedDoubleArray.
Node* LoadFixedDoubleArrayElement(
Node* object, Node* index, MachineType machine_type,
......@@ -1487,18 +1505,18 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
// Loads the details for the entry with the given key_index.
// Returns an untagged int32.
template <class ContainerType>
Node* LoadDetailsByKeyIndex(Node* container, Node* key_index) {
TNode<Uint32T> LoadDetailsByKeyIndex(Node* container, Node* key_index) {
const int kKeyToDetailsOffset =
(ContainerType::kEntryDetailsIndex - ContainerType::kEntryKeyIndex) *
kPointerSize;
return LoadAndUntagToWord32FixedArrayElement(container, key_index,
kKeyToDetailsOffset);
return Unsigned(LoadAndUntagToWord32FixedArrayElement(container, key_index,
kKeyToDetailsOffset));
}
// Loads the value for the entry with the given key_index.
// Returns a tagged value.
template <class ContainerType>
Node* LoadValueByKeyIndex(Node* container, Node* key_index) {
TNode<Object> LoadValueByKeyIndex(Node* container, Node* key_index) {
const int kKeyToValueOffset =
(ContainerType::kEntryValueIndex - ContainerType::kEntryKeyIndex) *
kPointerSize;
......@@ -1867,19 +1885,20 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
last_element_exclusive, body, mode, direction);
}
Node* GetArrayAllocationSize(Node* element_count, ElementsKind kind,
ParameterMode mode, int header_size) {
TNode<IntPtrT> GetArrayAllocationSize(Node* element_count, ElementsKind kind,
ParameterMode mode, int header_size) {
return ElementOffsetFromIndex(element_count, kind, mode, header_size);
}
Node* GetFixedArrayAllocationSize(Node* element_count, ElementsKind kind,
ParameterMode mode) {
TNode<IntPtrT> GetFixedArrayAllocationSize(Node* element_count,
ElementsKind kind,
ParameterMode mode) {
return GetArrayAllocationSize(element_count, kind, mode,
FixedArray::kHeaderSize);
}
Node* GetPropertyArrayAllocationSize(Node* element_count,
ParameterMode mode) {
TNode<IntPtrT> GetPropertyArrayAllocationSize(Node* element_count,
ParameterMode mode) {
return GetArrayAllocationSize(element_count, PACKED_ELEMENTS, mode,
PropertyArray::kHeaderSize);
}
......@@ -1939,8 +1958,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
// TypedArray/ArrayBuffer helpers
Node* IsDetachedBuffer(Node* buffer);
Node* ElementOffsetFromIndex(Node* index, ElementsKind kind,
ParameterMode mode, int base_size = 0);
TNode<IntPtrT> ElementOffsetFromIndex(Node* index, ElementsKind kind,
ParameterMode mode, int base_size = 0);
// Load a builtin's code from the builtin array in the isolate.
TNode<Code> LoadBuiltin(TNode<Smi> builtin_id);
......
......@@ -129,7 +129,7 @@ void AccessorAssembler::HandlePolymorphicCase(Node* receiver_map,
Label next_entry(this);
Node* cached_map =
LoadWeakCellValue(LoadFixedArrayElement(feedback, map_index));
LoadWeakCellValue(CAST(LoadFixedArrayElement(feedback, map_index)));
GotoIf(WordNotEqual(receiver_map, cached_map), &next_entry);
// Found, now call handler.
......@@ -149,7 +149,7 @@ void AccessorAssembler::HandlePolymorphicCase(Node* receiver_map,
start_index, end_index,
[this, receiver_map, feedback, if_handler, var_handler](Node* index) {
Node* cached_map =
LoadWeakCellValue(LoadFixedArrayElement(feedback, index));
LoadWeakCellValue(CAST(LoadFixedArrayElement(feedback, index)));
Label next_entry(this);
GotoIf(WordNotEqual(receiver_map, cached_map), &next_entry);
......
......@@ -236,10 +236,11 @@ void KeyedStoreGenericAssembler::StoreElementWithCapacity(
GotoIf(IsDictionaryMap(receiver_map), slow);
// The length property is non-configurable, so it's guaranteed to always
// be the first property.
Node* descriptors = LoadMapDescriptors(receiver_map);
Node* details =
LoadFixedArrayElement(descriptors, DescriptorArray::ToDetailsIndex(0));
GotoIf(IsSetSmi(details, PropertyDetails::kAttributesReadOnlyMask), slow);
TNode<DescriptorArray> descriptors = LoadMapDescriptors(receiver_map);
TNode<Int32T> details = LoadAndUntagToWord32FixedArrayElement(
descriptors, DescriptorArray::ToDetailsIndex(0));
GotoIf(IsSetWord32(details, PropertyDetails::kAttributesReadOnlyMask),
slow);
}
STATIC_ASSERT(FixedArray::kHeaderSize == FixedDoubleArray::kHeaderSize);
const int kHeaderSize = FixedArray::kHeaderSize - kHeapObjectTag;
......
......@@ -647,7 +647,7 @@ Node* InterpreterAssembler::BytecodeOperandIntrinsicId(int operand_index) {
Node* InterpreterAssembler::LoadConstantPoolEntry(Node* index) {
Node* constant_pool = LoadObjectField(BytecodeArrayTaggedPointer(),
BytecodeArray::kConstantPoolOffset);
return LoadFixedArrayElement(constant_pool, index,
return LoadFixedArrayElement(constant_pool, UncheckedCast<IntPtrT>(index),
LoadSensitivity::kNeedsPoisoning);
}
......
......@@ -125,8 +125,8 @@ Handle<Code> BuildSetupFunction(Isolate* isolate,
tester.raw_assembler_for_testing()->machine()->I32x4Splat(),
__ Int32Constant(0));
for (int lane = 0; lane < 4; lane++) {
Node* lane_value = __ SmiToInt32(
__ LoadFixedArrayElement(element, __ IntPtrConstant(lane)));
TNode<Int32T> lane_value = __ LoadAndUntagToWord32FixedArrayElement(
element, __ IntPtrConstant(lane));
vector = tester.raw_assembler_for_testing()->AddNode(
tester.raw_assembler_for_testing()->machine()->I32x4ReplaceLane(
lane),
......
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