Commit 63f46ae4 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[CSA] Don't use write barriers when writing Smi fields

Change-Id: Ia163acfd04d287d33570374254b661becaf1cc67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2782160Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73646}
parent d2ce5744
......@@ -2912,10 +2912,20 @@ void CodeStubAssembler::StoreHeapNumberValue(TNode<HeapNumber> object,
StoreObjectFieldNoWriteBarrier(object, HeapNumber::kValueOffset, value);
}
void CodeStubAssembler::StoreObjectField(TNode<HeapObject> object, int offset,
TNode<Smi> value) {
StoreObjectFieldNoWriteBarrier(object, offset, value);
}
void CodeStubAssembler::StoreObjectField(TNode<HeapObject> object,
TNode<IntPtrT> offset,
TNode<Smi> value) {
StoreObjectFieldNoWriteBarrier(object, offset, value);
}
void CodeStubAssembler::StoreObjectField(TNode<HeapObject> object, int offset,
TNode<Object> value) {
DCHECK_NE(HeapObject::kMapOffset, offset); // Use StoreMap instead.
OptimizedStoreField(MachineRepresentation::kTagged,
UncheckedCast<HeapObject>(object), offset, value);
}
......
......@@ -1529,6 +1529,9 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
void StoreHeapNumberValue(TNode<HeapNumber> object, TNode<Float64T> value);
// Store a field to an object on the heap.
void StoreObjectField(TNode<HeapObject> object, int offset, TNode<Smi> value);
void StoreObjectField(TNode<HeapObject> object, TNode<IntPtrT> offset,
TNode<Smi> value);
void StoreObjectField(TNode<HeapObject> object, int offset,
TNode<Object> value);
void StoreObjectField(TNode<HeapObject> object, TNode<IntPtrT> offset,
......
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