[heap] Verify skipping of write barriers for maps
We recently landed write barrier verification in https://crrev.com/c/3386803. This CL adds verification to set_map_no_write_barrier and similar methods as well. Bug: v8:12544 Change-Id: I54844b0323731281b4f41fd1502acdd44557a2c9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3395561 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#78675}
This commit is contained in:
parent
261ad0d5c2
commit
1511a19d5a
@ -831,6 +831,7 @@ void HeapObject::set_map_no_write_barrier(Map value, RelaxedStoreTag tag) {
|
||||
}
|
||||
#endif
|
||||
set_map_word(MapWord::FromMap(value), tag);
|
||||
SLOW_DCHECK(!WriteBarrier::IsRequired(*this, value));
|
||||
}
|
||||
|
||||
void HeapObject::set_map_no_write_barrier(Map value, ReleaseStoreTag tag) {
|
||||
@ -840,6 +841,7 @@ void HeapObject::set_map_no_write_barrier(Map value, ReleaseStoreTag tag) {
|
||||
}
|
||||
#endif
|
||||
set_map_word(MapWord::FromMap(value), tag);
|
||||
SLOW_DCHECK(!WriteBarrier::IsRequired(*this, value));
|
||||
}
|
||||
|
||||
void HeapObject::set_map_after_allocation(Map value, WriteBarrierMode mode) {
|
||||
@ -851,6 +853,8 @@ void HeapObject::set_map_after_allocation(Map value, WriteBarrierMode mode) {
|
||||
// TODO(1600) We are passing kNullAddress as a slot because maps can never
|
||||
// be on an evacuation candidate.
|
||||
WriteBarrier::Marking(*this, ObjectSlot(kNullAddress), value);
|
||||
} else {
|
||||
SLOW_DCHECK(!WriteBarrier::IsRequired(*this, value));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user