Commit 789342d8 authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[csa][cleanup] TNodify StoreFullTaggedNoWriteBarrier and StoreRoot

Makes ExternalReference count as a subclass of RawPtrT to enable
either to be passed to these functions as base argument.

BUG=v8:6949,v8:11074

Change-Id: I126856815ff7cdc0612e3c3fcdfdd4938cc19bfa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534820
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71171}
parent bf8c49e1
......@@ -265,6 +265,10 @@ struct is_subtype<UnionT<T1, T2>, UnionT<U1, U2>> {
(is_subtype<T1, U1>::value || is_subtype<T1, U2>::value) &&
(is_subtype<T2, U1>::value || is_subtype<T2, U2>::value);
};
template <>
struct is_subtype<ExternalReference, RawPtrT> {
static const bool value = true;
};
template <class T, class U>
struct types_have_common_values {
......
......@@ -811,14 +811,15 @@ void CodeAssembler::UnsafeStoreNoWriteBarrier(MachineRepresentation rep,
raw_assembler()->Store(rep, base, offset, value, kNoWriteBarrier);
}
void CodeAssembler::StoreFullTaggedNoWriteBarrier(Node* base,
Node* tagged_value) {
void CodeAssembler::StoreFullTaggedNoWriteBarrier(TNode<RawPtrT> base,
TNode<Object> tagged_value) {
StoreNoWriteBarrier(MachineType::PointerRepresentation(), base,
BitcastTaggedToWord(tagged_value));
}
void CodeAssembler::StoreFullTaggedNoWriteBarrier(Node* base, Node* offset,
Node* tagged_value) {
void CodeAssembler::StoreFullTaggedNoWriteBarrier(TNode<RawPtrT> base,
TNode<IntPtrT> offset,
TNode<Object> tagged_value) {
StoreNoWriteBarrier(MachineType::PointerRepresentation(), base, offset,
BitcastTaggedToWord(tagged_value));
}
......@@ -893,7 +894,7 @@ CodeAssembler::AtomicCompareExchange64<AtomicUint64>(
TNode<UintPtrT> new_value, TNode<UintPtrT> old_value_high,
TNode<UintPtrT> new_value_high);
void CodeAssembler::StoreRoot(RootIndex root_index, Node* value) {
void CodeAssembler::StoreRoot(RootIndex root_index, TNode<Object> value) {
DCHECK(!RootsTable::IsImmortalImmovable(root_index));
TNode<ExternalReference> isolate_root =
ExternalConstant(ExternalReference::isolate_root(isolate()));
......
......@@ -782,9 +782,10 @@ class V8_EXPORT_PRIVATE CodeAssembler {
// Stores uncompressed tagged value to (most likely off JS heap) memory
// location without write barrier.
void StoreFullTaggedNoWriteBarrier(Node* base, Node* tagged_value);
void StoreFullTaggedNoWriteBarrier(Node* base, Node* offset,
Node* tagged_value);
void StoreFullTaggedNoWriteBarrier(TNode<RawPtrT> base,
TNode<Object> tagged_value);
void StoreFullTaggedNoWriteBarrier(TNode<RawPtrT> base, TNode<IntPtrT> offset,
TNode<Object> tagged_value);
// Optimized memory operations that map to Turbofan simplified nodes.
TNode<HeapObject> OptimizedAllocate(TNode<IntPtrT> size,
......@@ -861,7 +862,7 @@ class V8_EXPORT_PRIVATE CodeAssembler {
TNode<UintPtrT> new_value_high);
// Store a value to the root array.
void StoreRoot(RootIndex root_index, Node* value);
void StoreRoot(RootIndex root_index, TNode<Object> value);
// Basic arithmetic operations.
#define DECLARE_CODE_ASSEMBLER_BINARY_OP(name, ResType, Arg1Type, Arg2Type) \
......
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