[osr] Relaxed accessors for Code::osr_offset

.. since they may be written from background threads (for SP concurrent
codegen).

Bug: v8:12161
Fixed: chromium:1319857
Change-Id: I11860137ea4d79645821df69e61b62836f7c8283
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3605818
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80185}
This commit is contained in:
Jakob Gruber 2022-04-26 14:49:12 +02:00 committed by V8 LUCI CQ
parent 823a221a36
commit 2f4b0737e2

View File

@ -730,11 +730,11 @@ void Code::set_inlined_bytecode_size(unsigned size) {
}
BytecodeOffset Code::osr_offset() const {
return BytecodeOffset(ReadField<int32_t>(kOsrOffsetOffset));
return BytecodeOffset(RELAXED_READ_INT32_FIELD(*this, kOsrOffsetOffset));
}
void Code::set_osr_offset(BytecodeOffset offset) {
WriteField<int32_t>(kOsrOffsetOffset, offset.ToInt());
RELAXED_WRITE_INT32_FIELD(*this, kOsrOffsetOffset, offset.ToInt());
}
bool Code::uses_safepoint_table() const {