[heap] Remove write barrier builtin for incremental marking

https://crrev.com/c/3471854 already disabled the RecordWrite builtin
specifically for incremental marking. Since this didn't regress performance as expected, we can now remove those versions of the
builtin.

This will simplify the barrier implementation a bit, but is also
required for the shared heap write barrier. Unlike the generational barrier, the shared heap barrier can't be elided for map values.

Bug: v8:11708
Change-Id: I44bc6ee79006a5be8c1b593dee7fc30c3b9cfa85
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683341
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80966}
This commit is contained in:
Dominik Inführ 2022-06-03 09:28:58 +02:00 committed by V8 LUCI CQ
parent f7b33be7ed
commit e50d19cb11
29 changed files with 207 additions and 350 deletions

View File

@ -374,8 +374,8 @@ class Internals {
static const uint32_t kNumIsolateDataSlots = 4;
static const int kStackGuardSize = 7 * kApiSystemPointerSize;
static const int kBuiltinTier0EntryTableSize = 9 * kApiSystemPointerSize;
static const int kBuiltinTier0TableSize = 9 * kApiSystemPointerSize;
static const int kBuiltinTier0EntryTableSize = 7 * kApiSystemPointerSize;
static const int kBuiltinTier0TableSize = 7 * kApiSystemPointerSize;
// IsolateData layout guarantees.
static const int kIsolateCageBaseOffset = 0;

View File

@ -836,7 +836,7 @@ static void ReplaceClosureCodeWithOptimizedCode(MacroAssembler* masm,
__ str(optimized_code, FieldMemOperand(closure, JSFunction::kCodeOffset));
__ RecordWriteField(closure, JSFunction::kCodeOffset, optimized_code,
kLRHasNotBeenSaved, SaveFPRegsMode::kIgnore,
RememberedSetAction::kOmit, SmiCheck::kOmit);
SmiCheck::kOmit);
}
static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1,

View File

@ -1001,7 +1001,7 @@ static void ReplaceClosureCodeWithOptimizedCode(MacroAssembler* masm,
FieldMemOperand(closure, JSFunction::kCodeOffset));
__ RecordWriteField(closure, JSFunction::kCodeOffset, optimized_code,
kLRHasNotBeenSaved, SaveFPRegsMode::kIgnore,
RememberedSetAction::kOmit, SmiCheck::kOmit);
SmiCheck::kOmit);
}
static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1,

View File

@ -45,10 +45,8 @@ namespace internal {
ASM(DeoptimizationEntry_Lazy, DeoptimizationEntry) \
\
/* GC write barrier. */ \
TFC(RecordWriteEmitRememberedSetSaveFP, WriteBarrier) \
TFC(RecordWriteOmitRememberedSetSaveFP, WriteBarrier) \
TFC(RecordWriteEmitRememberedSetIgnoreFP, WriteBarrier) \
TFC(RecordWriteOmitRememberedSetIgnoreFP, WriteBarrier) \
TFC(RecordWriteSaveFP, WriteBarrier) \
TFC(RecordWriteIgnoreFP, WriteBarrier) \
TFC(EphemeronKeyBarrierSaveFP, WriteBarrier) \
TFC(EphemeronKeyBarrierIgnoreFP, WriteBarrier) \
\

View File

@ -238,7 +238,7 @@ class WriteBarrierCodeStubAssembler : public CodeStubAssembler {
TruncateIntPtrToInt32(new_cell_value));
}
void GenerationalWriteBarrier(SaveFPRegsMode fp_mode) {
void WriteBarrier(SaveFPRegsMode fp_mode) {
Label incremental_wb(this), test_old_to_young_flags(this),
remembered_set_only(this), remembered_set_and_incremental_wb(this),
next(this);
@ -340,20 +340,13 @@ class WriteBarrierCodeStubAssembler : public CodeStubAssembler {
BIND(&next);
}
void GenerateRecordWrite(RememberedSetAction rs_mode,
SaveFPRegsMode fp_mode) {
void GenerateRecordWrite(SaveFPRegsMode fp_mode) {
if (V8_DISABLE_WRITE_BARRIERS_BOOL) {
Return(TrueConstant());
return;
}
switch (rs_mode) {
case RememberedSetAction::kEmit:
GenerationalWriteBarrier(fp_mode);
break;
case RememberedSetAction::kOmit:
IncrementalWriteBarrier(fp_mode);
break;
}
WriteBarrier(fp_mode);
IncrementCounter(isolate()->counters()->write_barriers(), 1);
Return(TrueConstant());
}
@ -383,22 +376,12 @@ class WriteBarrierCodeStubAssembler : public CodeStubAssembler {
}
};
TF_BUILTIN(RecordWriteEmitRememberedSetSaveFP, WriteBarrierCodeStubAssembler) {
GenerateRecordWrite(RememberedSetAction::kEmit, SaveFPRegsMode::kSave);
TF_BUILTIN(RecordWriteSaveFP, WriteBarrierCodeStubAssembler) {
GenerateRecordWrite(SaveFPRegsMode::kSave);
}
TF_BUILTIN(RecordWriteOmitRememberedSetSaveFP, WriteBarrierCodeStubAssembler) {
GenerateRecordWrite(RememberedSetAction::kOmit, SaveFPRegsMode::kSave);
}
TF_BUILTIN(RecordWriteEmitRememberedSetIgnoreFP,
WriteBarrierCodeStubAssembler) {
GenerateRecordWrite(RememberedSetAction::kEmit, SaveFPRegsMode::kIgnore);
}
TF_BUILTIN(RecordWriteOmitRememberedSetIgnoreFP,
WriteBarrierCodeStubAssembler) {
GenerateRecordWrite(RememberedSetAction::kOmit, SaveFPRegsMode::kIgnore);
TF_BUILTIN(RecordWriteIgnoreFP, WriteBarrierCodeStubAssembler) {
GenerateRecordWrite(SaveFPRegsMode::kIgnore);
}
TF_BUILTIN(EphemeronKeyBarrierSaveFP, WriteBarrierCodeStubAssembler) {

View File

@ -119,23 +119,12 @@ class Builtins {
static BytecodeOffset GetContinuationBytecodeOffset(Builtin builtin);
static Builtin GetBuiltinFromBytecodeOffset(BytecodeOffset);
static constexpr Builtin GetRecordWriteStub(
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode) {
switch (remembered_set_action) {
case RememberedSetAction::kEmit:
switch (fp_mode) {
case SaveFPRegsMode::kIgnore:
return Builtin::kRecordWriteEmitRememberedSetIgnoreFP;
case SaveFPRegsMode::kSave:
return Builtin::kRecordWriteEmitRememberedSetSaveFP;
}
case RememberedSetAction::kOmit:
switch (fp_mode) {
case SaveFPRegsMode::kIgnore:
return Builtin::kRecordWriteOmitRememberedSetIgnoreFP;
case SaveFPRegsMode::kSave:
return Builtin::kRecordWriteOmitRememberedSetSaveFP;
}
static constexpr Builtin GetRecordWriteStub(SaveFPRegsMode fp_mode) {
switch (fp_mode) {
case SaveFPRegsMode::kIgnore:
return Builtin::kRecordWriteIgnoreFP;
case SaveFPRegsMode::kSave:
return Builtin::kRecordWriteSaveFP;
}
}

View File

@ -783,8 +783,7 @@ static void ReplaceClosureCodeWithOptimizedCode(MacroAssembler* masm,
__ mov(FieldOperand(closure, JSFunction::kCodeOffset), optimized_code);
__ mov(value, optimized_code); // Write barrier clobbers slot_address below.
__ RecordWriteField(closure, JSFunction::kCodeOffset, value, slot_address,
SaveFPRegsMode::kIgnore, RememberedSetAction::kOmit,
SmiCheck::kOmit);
SaveFPRegsMode::kIgnore, SmiCheck::kOmit);
}
static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1,

View File

@ -889,8 +889,7 @@ static void ReplaceClosureCodeWithOptimizedCode(MacroAssembler* masm,
__ movq(value, optimized_code);
__ RecordWriteField(closure, JSFunction::kCodeOffset, value, slot_address,
SaveFPRegsMode::kIgnore, RememberedSetAction::kOmit,
SmiCheck::kOmit);
SaveFPRegsMode::kIgnore, SmiCheck::kOmit);
}
static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1,

View File

@ -638,7 +638,6 @@ void MacroAssembler::RecordWriteField(Register object, int offset,
Register value,
LinkRegisterStatus lr_status,
SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action,
SmiCheck smi_check) {
ASM_CODE_COMMENT(this);
// First, check if a write barrier is even needed. The tests below
@ -668,7 +667,7 @@ void MacroAssembler::RecordWriteField(Register object, int offset,
}
RecordWrite(object, Operand(offset - kHeapObjectTag), value, lr_status,
save_fp, remembered_set_action, SmiCheck::kOmit);
save_fp, SmiCheck::kOmit);
bind(&done);
}
@ -702,9 +701,10 @@ void TurboAssembler::CallEphemeronKeyBarrier(Register object, Operand offset,
MaybeRestoreRegisters(registers);
}
void TurboAssembler::CallRecordWriteStubSaveRegisters(
Register object, Operand offset, RememberedSetAction remembered_set_action,
SaveFPRegsMode fp_mode, StubCallMode mode) {
void TurboAssembler::CallRecordWriteStubSaveRegisters(Register object,
Operand offset,
SaveFPRegsMode fp_mode,
StubCallMode mode) {
ASM_CODE_COMMENT(this);
RegList registers = WriteBarrierDescriptor::ComputeSavedRegisters(object);
MaybeSaveRegisters(registers);
@ -714,30 +714,26 @@ void TurboAssembler::CallRecordWriteStubSaveRegisters(
WriteBarrierDescriptor::SlotAddressRegister();
MoveObjectAndSlot(object_parameter, slot_address_parameter, object, offset);
CallRecordWriteStub(object_parameter, slot_address_parameter,
remembered_set_action, fp_mode, mode);
CallRecordWriteStub(object_parameter, slot_address_parameter, fp_mode, mode);
MaybeRestoreRegisters(registers);
}
void TurboAssembler::CallRecordWriteStub(
Register object, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
StubCallMode mode) {
void TurboAssembler::CallRecordWriteStub(Register object, Register slot_address,
SaveFPRegsMode fp_mode,
StubCallMode mode) {
ASM_CODE_COMMENT(this);
DCHECK_EQ(WriteBarrierDescriptor::ObjectRegister(), object);
DCHECK_EQ(WriteBarrierDescriptor::SlotAddressRegister(), slot_address);
#if V8_ENABLE_WEBASSEMBLY
if (mode == StubCallMode::kCallWasmRuntimeStub) {
auto wasm_target =
wasm::WasmCode::GetRecordWriteStub(remembered_set_action, fp_mode);
auto wasm_target = wasm::WasmCode::GetRecordWriteStub(fp_mode);
Call(wasm_target, RelocInfo::WASM_STUB_CALL);
#else
if (false) {
#endif
} else {
Builtin builtin =
Builtins::GetRecordWriteStub(remembered_set_action, fp_mode);
Builtin builtin = Builtins::GetRecordWriteStub(fp_mode);
if (options().inline_offheap_trampolines) {
CallBuiltin(builtin);
} else {
@ -785,9 +781,7 @@ void TurboAssembler::MoveObjectAndSlot(Register dst_object, Register dst_slot,
// shifted away. A scratch register also needs to be available.
void MacroAssembler::RecordWrite(Register object, Operand offset,
Register value, LinkRegisterStatus lr_status,
SaveFPRegsMode fp_mode,
RememberedSetAction remembered_set_action,
SmiCheck smi_check) {
SaveFPRegsMode fp_mode, SmiCheck smi_check) {
DCHECK(!AreAliased(object, value));
if (FLAG_debug_code) {
ASM_CODE_COMMENT_STRING(this, "Verify slot_address");
@ -800,9 +794,7 @@ void MacroAssembler::RecordWrite(Register object, Operand offset,
Check(eq, AbortReason::kWrongAddressOrValuePassedToRecordWrite);
}
if ((remembered_set_action == RememberedSetAction::kOmit &&
!FLAG_incremental_marking) ||
FLAG_disable_write_barriers) {
if (FLAG_disable_write_barriers) {
return;
}
@ -828,7 +820,7 @@ void MacroAssembler::RecordWrite(Register object, Operand offset,
DCHECK(!AreAliased(object, value, slot_address));
DCHECK(!offset.IsRegister());
add(slot_address, object, offset);
CallRecordWriteStub(object, slot_address, remembered_set_action, fp_mode);
CallRecordWriteStub(object, slot_address, fp_mode);
if (lr_status == kLRHasNotBeenSaved) {
pop(lr);
}

View File

@ -372,12 +372,10 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
SaveFPRegsMode fp_mode);
void CallRecordWriteStubSaveRegisters(
Register object, Operand offset,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
Register object, Operand offset, SaveFPRegsMode fp_mode,
StubCallMode mode = StubCallMode::kCallBuiltinPointer);
void CallRecordWriteStub(
Register object, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
Register object, Register slot_address, SaveFPRegsMode fp_mode,
StubCallMode mode = StubCallMode::kCallBuiltinPointer);
// For a given |object| and |offset|:
@ -640,19 +638,15 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// stored.
// The offset is the offset from the start of the object, not the offset from
// the tagged HeapObject pointer. For use with FieldMemOperand(reg, off).
void RecordWriteField(
Register object, int offset, Register value, LinkRegisterStatus lr_status,
SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = RememberedSetAction::kEmit,
SmiCheck smi_check = SmiCheck::kInline);
void RecordWriteField(Register object, int offset, Register value,
LinkRegisterStatus lr_status, SaveFPRegsMode save_fp,
SmiCheck smi_check = SmiCheck::kInline);
// For a given |object| notify the garbage collector that the slot at |offset|
// has been written. |value| is the object being stored.
void RecordWrite(
Register object, Operand offset, Register value,
LinkRegisterStatus lr_status, SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = RememberedSetAction::kEmit,
SmiCheck smi_check = SmiCheck::kInline);
void RecordWrite(Register object, Operand offset, Register value,
LinkRegisterStatus lr_status, SaveFPRegsMode save_fp,
SmiCheck smi_check = SmiCheck::kInline);
// Enter exit frame.
// stack_space - extra stack space, used for alignment before call to C.

View File

@ -3085,7 +3085,6 @@ void MacroAssembler::RecordWriteField(Register object, int offset,
Register value,
LinkRegisterStatus lr_status,
SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action,
SmiCheck smi_check) {
ASM_CODE_COMMENT(this);
DCHECK(!AreAliased(object, value));
@ -3116,7 +3115,7 @@ void MacroAssembler::RecordWriteField(Register object, int offset,
}
RecordWrite(object, Operand(offset - kHeapObjectTag), value, lr_status,
save_fp, remembered_set_action, SmiCheck::kOmit);
save_fp, SmiCheck::kOmit);
Bind(&done);
}
@ -3225,9 +3224,10 @@ void TurboAssembler::CallEphemeronKeyBarrier(Register object, Operand offset,
MaybeRestoreRegisters(registers);
}
void TurboAssembler::CallRecordWriteStubSaveRegisters(
Register object, Operand offset, RememberedSetAction remembered_set_action,
SaveFPRegsMode fp_mode, StubCallMode mode) {
void TurboAssembler::CallRecordWriteStubSaveRegisters(Register object,
Operand offset,
SaveFPRegsMode fp_mode,
StubCallMode mode) {
ASM_CODE_COMMENT(this);
RegList registers = WriteBarrierDescriptor::ComputeSavedRegisters(object);
MaybeSaveRegisters(registers);
@ -3237,30 +3237,26 @@ void TurboAssembler::CallRecordWriteStubSaveRegisters(
WriteBarrierDescriptor::SlotAddressRegister();
MoveObjectAndSlot(object_parameter, slot_address_parameter, object, offset);
CallRecordWriteStub(object_parameter, slot_address_parameter,
remembered_set_action, fp_mode, mode);
CallRecordWriteStub(object_parameter, slot_address_parameter, fp_mode, mode);
MaybeRestoreRegisters(registers);
}
void TurboAssembler::CallRecordWriteStub(
Register object, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
StubCallMode mode) {
void TurboAssembler::CallRecordWriteStub(Register object, Register slot_address,
SaveFPRegsMode fp_mode,
StubCallMode mode) {
ASM_CODE_COMMENT(this);
DCHECK_EQ(WriteBarrierDescriptor::ObjectRegister(), object);
DCHECK_EQ(WriteBarrierDescriptor::SlotAddressRegister(), slot_address);
#if V8_ENABLE_WEBASSEMBLY
if (mode == StubCallMode::kCallWasmRuntimeStub) {
auto wasm_target =
wasm::WasmCode::GetRecordWriteStub(remembered_set_action, fp_mode);
auto wasm_target = wasm::WasmCode::GetRecordWriteStub(fp_mode);
Call(wasm_target, RelocInfo::WASM_STUB_CALL);
#else
if (false) {
#endif
} else {
Builtin builtin =
Builtins::GetRecordWriteStub(remembered_set_action, fp_mode);
Builtin builtin = Builtins::GetRecordWriteStub(fp_mode);
if (options().inline_offheap_trampolines) {
CallBuiltin(builtin);
} else {
@ -3310,9 +3306,7 @@ void TurboAssembler::MoveObjectAndSlot(Register dst_object, Register dst_slot,
// shifted away.
void MacroAssembler::RecordWrite(Register object, Operand offset,
Register value, LinkRegisterStatus lr_status,
SaveFPRegsMode fp_mode,
RememberedSetAction remembered_set_action,
SmiCheck smi_check) {
SaveFPRegsMode fp_mode, SmiCheck smi_check) {
ASM_CODE_COMMENT(this);
ASM_LOCATION_IN_ASSEMBLER("MacroAssembler::RecordWrite");
DCHECK(!AreAliased(object, value));
@ -3328,9 +3322,7 @@ void MacroAssembler::RecordWrite(Register object, Operand offset,
Check(eq, AbortReason::kWrongAddressOrValuePassedToRecordWrite);
}
if ((remembered_set_action == RememberedSetAction::kOmit &&
!FLAG_incremental_marking) ||
FLAG_disable_write_barriers) {
if (FLAG_disable_write_barriers) {
return;
}
@ -3357,7 +3349,7 @@ void MacroAssembler::RecordWrite(Register object, Operand offset,
// TODO(cbruni): Turn offset into int.
DCHECK(offset.IsImmediate());
Add(slot_address, object, offset);
CallRecordWriteStub(object, slot_address, remembered_set_action, fp_mode);
CallRecordWriteStub(object, slot_address, fp_mode);
if (lr_status == kLRHasNotBeenSaved) {
Pop<TurboAssembler::kAuthLR>(lr, padreg);
}

View File

@ -838,12 +838,10 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
SaveFPRegsMode fp_mode);
void CallRecordWriteStubSaveRegisters(
Register object, Operand offset,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
Register object, Operand offset, SaveFPRegsMode fp_mode,
StubCallMode mode = StubCallMode::kCallBuiltinPointer);
void CallRecordWriteStub(
Register object, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
Register object, Register slot_address, SaveFPRegsMode fp_mode,
StubCallMode mode = StubCallMode::kCallBuiltinPointer);
// For a given |object| and |offset|:
@ -2065,19 +2063,15 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// stored.
// The offset is the offset from the start of the object, not the offset from
// the tagged HeapObject pointer. For use with FieldMemOperand(reg, off).
void RecordWriteField(
Register object, int offset, Register value, LinkRegisterStatus lr_status,
SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = RememberedSetAction::kEmit,
SmiCheck smi_check = SmiCheck::kInline);
void RecordWriteField(Register object, int offset, Register value,
LinkRegisterStatus lr_status, SaveFPRegsMode save_fp,
SmiCheck smi_check = SmiCheck::kInline);
// For a given |object| notify the garbage collector that the slot at |offset|
// has been written. |value| is the object being stored.
void RecordWrite(
Register object, Operand offset, Register value,
LinkRegisterStatus lr_status, SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = RememberedSetAction::kEmit,
SmiCheck smi_check = SmiCheck::kInline);
void RecordWrite(Register object, Operand offset, Register value,
LinkRegisterStatus lr_status, SaveFPRegsMode save_fp,
SmiCheck smi_check = SmiCheck::kInline);
// ---------------------------------------------------------------------------
// Debugging.

View File

@ -389,7 +389,6 @@ int TurboAssembler::PopCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1,
void MacroAssembler::RecordWriteField(Register object, int offset,
Register value, Register slot_address,
SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action,
SmiCheck smi_check) {
ASM_CODE_COMMENT(this);
// First, check if a write barrier is even needed. The tests below
@ -414,8 +413,7 @@ void MacroAssembler::RecordWriteField(Register object, int offset,
bind(&ok);
}
RecordWrite(object, slot_address, value, save_fp, remembered_set_action,
SmiCheck::kOmit);
RecordWrite(object, slot_address, value, save_fp, SmiCheck::kOmit);
bind(&done);
@ -464,10 +462,10 @@ void TurboAssembler::CallEphemeronKeyBarrier(Register object,
MaybeRestoreRegisters(registers);
}
void TurboAssembler::CallRecordWriteStubSaveRegisters(
Register object, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
StubCallMode mode) {
void TurboAssembler::CallRecordWriteStubSaveRegisters(Register object,
Register slot_address,
SaveFPRegsMode fp_mode,
StubCallMode mode) {
ASM_CODE_COMMENT(this);
DCHECK(!AreAliased(object, slot_address));
RegList registers =
@ -483,16 +481,14 @@ void TurboAssembler::CallRecordWriteStubSaveRegisters(
pop(slot_address_parameter);
pop(object_parameter);
CallRecordWriteStub(object_parameter, slot_address_parameter,
remembered_set_action, fp_mode, mode);
CallRecordWriteStub(object_parameter, slot_address_parameter, fp_mode, mode);
MaybeRestoreRegisters(registers);
}
void TurboAssembler::CallRecordWriteStub(
Register object, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
StubCallMode mode) {
void TurboAssembler::CallRecordWriteStub(Register object, Register slot_address,
SaveFPRegsMode fp_mode,
StubCallMode mode) {
ASM_CODE_COMMENT(this);
// Use CallRecordWriteStubSaveRegisters if the object and slot registers
// need to be caller saved.
@ -501,15 +497,13 @@ void TurboAssembler::CallRecordWriteStub(
#if V8_ENABLE_WEBASSEMBLY
if (mode == StubCallMode::kCallWasmRuntimeStub) {
// Use {wasm_call} for direct Wasm call within a module.
auto wasm_target =
wasm::WasmCode::GetRecordWriteStub(remembered_set_action, fp_mode);
auto wasm_target = wasm::WasmCode::GetRecordWriteStub(fp_mode);
wasm_call(wasm_target, RelocInfo::WASM_STUB_CALL);
#else
if (false) {
#endif
} else {
Builtin builtin =
Builtins::GetRecordWriteStub(remembered_set_action, fp_mode);
Builtin builtin = Builtins::GetRecordWriteStub(fp_mode);
if (options().inline_offheap_trampolines) {
CallBuiltin(builtin);
} else {
@ -521,15 +515,12 @@ void TurboAssembler::CallRecordWriteStub(
void MacroAssembler::RecordWrite(Register object, Register slot_address,
Register value, SaveFPRegsMode fp_mode,
RememberedSetAction remembered_set_action,
SmiCheck smi_check) {
ASM_CODE_COMMENT(this);
DCHECK(!AreAliased(object, value, slot_address));
AssertNotSmi(object);
if ((remembered_set_action == RememberedSetAction::kOmit &&
!FLAG_incremental_marking) ||
FLAG_disable_write_barriers) {
if (FLAG_disable_write_barriers) {
return;
}
@ -561,7 +552,7 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address,
Label::kNear);
RecordComment("CheckPageFlag]");
CallRecordWriteStub(object, slot_address, remembered_set_action, fp_mode);
CallRecordWriteStub(object, slot_address, fp_mode);
bind(&done);

View File

@ -366,12 +366,10 @@ class V8_EXPORT_PRIVATE TurboAssembler
SaveFPRegsMode fp_mode);
void CallRecordWriteStubSaveRegisters(
Register object, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
Register object, Register slot_address, SaveFPRegsMode fp_mode,
StubCallMode mode = StubCallMode::kCallBuiltinPointer);
void CallRecordWriteStub(
Register object, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
Register object, Register slot_address, SaveFPRegsMode fp_mode,
StubCallMode mode = StubCallMode::kCallBuiltinPointer);
// Calculate how much stack space (in bytes) are required to store caller
@ -456,21 +454,18 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// stored. value and scratch registers are clobbered by the operation.
// The offset is the offset from the start of the object, not the offset from
// the tagged HeapObject pointer. For use with FieldOperand(reg, off).
void RecordWriteField(
Register object, int offset, Register value, Register scratch,
SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = RememberedSetAction::kEmit,
SmiCheck smi_check = SmiCheck::kInline);
void RecordWriteField(Register object, int offset, Register value,
Register scratch, SaveFPRegsMode save_fp,
SmiCheck smi_check = SmiCheck::kInline);
// For page containing |object| mark region covering |address|
// dirty. |object| is the object being stored into, |value| is the
// object being stored. The address and value registers are clobbered by the
// operation. RecordWrite filters out smis so it does not update the
// write barrier if the value is a smi.
void RecordWrite(
Register object, Register address, Register value, SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = RememberedSetAction::kEmit,
SmiCheck smi_check = SmiCheck::kInline);
void RecordWrite(Register object, Register address, Register value,
SaveFPRegsMode save_fp,
SmiCheck smi_check = SmiCheck::kInline);
// Enter specific kind of exit frame. Expects the number of
// arguments in register eax and sets up the number of arguments in

View File

@ -335,7 +335,6 @@ void TurboAssembler::DecompressAnyTagged(Register destination,
void MacroAssembler::RecordWriteField(Register object, int offset,
Register value, Register slot_address,
SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action,
SmiCheck smi_check) {
ASM_CODE_COMMENT(this);
DCHECK(!AreAliased(object, value, slot_address));
@ -362,8 +361,7 @@ void MacroAssembler::RecordWriteField(Register object, int offset,
bind(&ok);
}
RecordWrite(object, slot_address, value, save_fp, remembered_set_action,
SmiCheck::kOmit);
RecordWrite(object, slot_address, value, save_fp, SmiCheck::kOmit);
bind(&done);
@ -473,10 +471,10 @@ void TurboAssembler::CallEphemeronKeyBarrier(Register object,
MaybeRestoreRegisters(registers);
}
void TurboAssembler::CallRecordWriteStubSaveRegisters(
Register object, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
StubCallMode mode) {
void TurboAssembler::CallRecordWriteStubSaveRegisters(Register object,
Register slot_address,
SaveFPRegsMode fp_mode,
StubCallMode mode) {
ASM_CODE_COMMENT(this);
DCHECK(!AreAliased(object, slot_address));
RegList registers =
@ -487,15 +485,13 @@ void TurboAssembler::CallRecordWriteStubSaveRegisters(
WriteBarrierDescriptor::SlotAddressRegister();
MovePair(object_parameter, object, slot_address_parameter, slot_address);
CallRecordWriteStub(object_parameter, slot_address_parameter,
remembered_set_action, fp_mode, mode);
CallRecordWriteStub(object_parameter, slot_address_parameter, fp_mode, mode);
MaybeRestoreRegisters(registers);
}
void TurboAssembler::CallRecordWriteStub(
Register object, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
StubCallMode mode) {
void TurboAssembler::CallRecordWriteStub(Register object, Register slot_address,
SaveFPRegsMode fp_mode,
StubCallMode mode) {
ASM_CODE_COMMENT(this);
// Use CallRecordWriteStubSaveRegisters if the object and slot registers
// need to be caller saved.
@ -504,15 +500,13 @@ void TurboAssembler::CallRecordWriteStub(
#if V8_ENABLE_WEBASSEMBLY
if (mode == StubCallMode::kCallWasmRuntimeStub) {
// Use {near_call} for direct Wasm call within a module.
auto wasm_target =
wasm::WasmCode::GetRecordWriteStub(remembered_set_action, fp_mode);
auto wasm_target = wasm::WasmCode::GetRecordWriteStub(fp_mode);
near_call(wasm_target, RelocInfo::WASM_STUB_CALL);
#else
if (false) {
#endif
} else {
Builtin builtin =
Builtins::GetRecordWriteStub(remembered_set_action, fp_mode);
Builtin builtin = Builtins::GetRecordWriteStub(fp_mode);
if (options().inline_offheap_trampolines) {
CallBuiltin(builtin);
} else {
@ -613,15 +607,12 @@ void TurboAssembler::CallTSANRelaxedLoadStub(Register address,
void MacroAssembler::RecordWrite(Register object, Register slot_address,
Register value, SaveFPRegsMode fp_mode,
RememberedSetAction remembered_set_action,
SmiCheck smi_check) {
ASM_CODE_COMMENT(this);
DCHECK(!AreAliased(object, slot_address, value));
AssertNotSmi(object);
if ((remembered_set_action == RememberedSetAction::kOmit &&
!FLAG_incremental_marking) ||
FLAG_disable_write_barriers) {
if (FLAG_disable_write_barriers) {
return;
}
@ -653,7 +644,7 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address,
MemoryChunk::kPointersFromHereAreInterestingMask, zero, &done,
Label::kNear);
CallRecordWriteStub(object, slot_address, remembered_set_action, fp_mode);
CallRecordWriteStub(object, slot_address, fp_mode);
bind(&done);

View File

@ -510,12 +510,10 @@ class V8_EXPORT_PRIVATE TurboAssembler
SaveFPRegsMode fp_mode);
void CallRecordWriteStubSaveRegisters(
Register object, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
Register object, Register slot_address, SaveFPRegsMode fp_mode,
StubCallMode mode = StubCallMode::kCallBuiltinPointer);
void CallRecordWriteStub(
Register object, Register slot_address,
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode,
Register object, Register slot_address, SaveFPRegsMode fp_mode,
StubCallMode mode = StubCallMode::kCallBuiltinPointer);
#ifdef V8_IS_TSAN
@ -695,22 +693,18 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// stored. value and scratch registers are clobbered by the operation.
// The offset is the offset from the start of the object, not the offset from
// the tagged HeapObject pointer. For use with FieldOperand(reg, off).
void RecordWriteField(
Register object, int offset, Register value, Register slot_address,
SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = RememberedSetAction::kEmit,
SmiCheck smi_check = SmiCheck::kInline);
void RecordWriteField(Register object, int offset, Register value,
Register slot_address, SaveFPRegsMode save_fp,
SmiCheck smi_check = SmiCheck::kInline);
// For page containing |object| mark region covering |address|
// dirty. |object| is the object being stored into, |value| is the
// object being stored. The address and value registers are clobbered by the
// operation. RecordWrite filters out smis so it does not update
// the write barrier if the value is a smi.
void RecordWrite(
Register object, Register slot_address, Register value,
SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = RememberedSetAction::kEmit,
SmiCheck smi_check = SmiCheck::kInline);
void RecordWrite(Register object, Register slot_address, Register value,
SaveFPRegsMode save_fp,
SmiCheck smi_check = SmiCheck::kInline);
// Enter specific kind of exit frame; either in normal or
// debug mode. Expects the number of arguments in register rax and

View File

@ -550,8 +550,6 @@ enum class StoreOrigin { kMaybeKeyed, kNamed };
enum class TypeofMode { kInside, kNotInside };
// Use by RecordWrite stubs.
enum class RememberedSetAction { kOmit, kEmit };
// Enums used by CEntry.
enum class SaveFPRegsMode { kIgnore, kSave };
enum class ArgvMode { kStack, kRegister };

View File

@ -198,11 +198,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
void Generate() final {
__ CheckPageFlag(value_, MemoryChunk::kPointersToHereAreInterestingMask, eq,
exit());
RememberedSetAction const remembered_set_action =
mode_ > RecordWriteMode::kValueIsMap ||
FLAG_use_full_record_write_builtin
? RememberedSetAction::kEmit
: RememberedSetAction::kOmit;
SaveFPRegsMode const save_fp_mode = frame()->DidAllocateDoubleRegisters()
? SaveFPRegsMode::kSave
: SaveFPRegsMode::kIgnore;
@ -215,13 +210,11 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
__ CallEphemeronKeyBarrier(object_, offset_, save_fp_mode);
#if V8_ENABLE_WEBASSEMBLY
} else if (stub_mode_ == StubCallMode::kCallWasmRuntimeStub) {
__ CallRecordWriteStubSaveRegisters(object_, offset_,
remembered_set_action, save_fp_mode,
__ CallRecordWriteStubSaveRegisters(object_, offset_, save_fp_mode,
StubCallMode::kCallWasmRuntimeStub);
#endif // V8_ENABLE_WEBASSEMBLY
} else {
__ CallRecordWriteStubSaveRegisters(object_, offset_,
remembered_set_action, save_fp_mode);
__ CallRecordWriteStubSaveRegisters(object_, offset_, save_fp_mode);
}
if (must_save_lr_) {
__ Pop(lr);

View File

@ -290,11 +290,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
}
__ CheckPageFlag(value_, MemoryChunk::kPointersToHereAreInterestingMask, ne,
exit());
RememberedSetAction const remembered_set_action =
mode_ > RecordWriteMode::kValueIsMap ||
FLAG_use_full_record_write_builtin
? RememberedSetAction::kEmit
: RememberedSetAction::kOmit;
SaveFPRegsMode const save_fp_mode = frame()->DidAllocateDoubleRegisters()
? SaveFPRegsMode::kSave
: SaveFPRegsMode::kIgnore;
@ -310,13 +305,11 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
// A direct call to a wasm runtime stub defined in this module.
// Just encode the stub index. This will be patched when the code
// is added to the native module and copied into wasm code space.
__ CallRecordWriteStubSaveRegisters(object_, offset_,
remembered_set_action, save_fp_mode,
__ CallRecordWriteStubSaveRegisters(object_, offset_, save_fp_mode,
StubCallMode::kCallWasmRuntimeStub);
#endif // V8_ENABLE_WEBASSEMBLY
} else {
__ CallRecordWriteStubSaveRegisters(object_, offset_,
remembered_set_action, save_fp_mode);
__ CallRecordWriteStubSaveRegisters(object_, offset_, save_fp_mode);
}
if (must_save_lr_) {
__ Pop<TurboAssembler::kAuthLR>(padreg, lr);

View File

@ -327,11 +327,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
MemoryChunk::kPointersToHereAreInterestingMask, zero,
exit());
__ lea(scratch1_, operand_);
RememberedSetAction const remembered_set_action =
mode_ > RecordWriteMode::kValueIsMap ||
FLAG_use_full_record_write_builtin
? RememberedSetAction::kEmit
: RememberedSetAction::kOmit;
SaveFPRegsMode const save_fp_mode = frame()->DidAllocateDoubleRegisters()
? SaveFPRegsMode::kSave
: SaveFPRegsMode::kIgnore;
@ -342,13 +337,11 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
// A direct call to a wasm runtime stub defined in this module.
// Just encode the stub index. This will be patched when the code
// is added to the native module and copied into wasm code space.
__ CallRecordWriteStubSaveRegisters(object_, scratch1_,
remembered_set_action, save_fp_mode,
__ CallRecordWriteStubSaveRegisters(object_, scratch1_, save_fp_mode,
StubCallMode::kCallWasmRuntimeStub);
#endif // V8_ENABLE_WEBASSEMBLY
} else {
__ CallRecordWriteStubSaveRegisters(object_, scratch1_,
remembered_set_action, save_fp_mode);
__ CallRecordWriteStubSaveRegisters(object_, scratch1_, save_fp_mode);
}
}

View File

@ -288,11 +288,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
exit());
__ leaq(scratch1_, operand_);
RememberedSetAction const remembered_set_action =
mode_ > RecordWriteMode::kValueIsMap ||
FLAG_use_full_record_write_builtin
? RememberedSetAction::kEmit
: RememberedSetAction::kOmit;
SaveFPRegsMode const save_fp_mode = frame()->DidAllocateDoubleRegisters()
? SaveFPRegsMode::kSave
: SaveFPRegsMode::kIgnore;
@ -304,13 +299,11 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
// A direct call to a wasm runtime stub defined in this module.
// Just encode the stub index. This will be patched when the code
// is added to the native module and copied into wasm code space.
__ CallRecordWriteStubSaveRegisters(object_, scratch1_,
remembered_set_action, save_fp_mode,
__ CallRecordWriteStubSaveRegisters(object_, scratch1_, save_fp_mode,
StubCallMode::kCallWasmRuntimeStub);
#endif // V8_ENABLE_WEBASSEMBLY
} else {
__ CallRecordWriteStubSaveRegisters(object_, scratch1_,
remembered_set_action, save_fp_mode);
__ CallRecordWriteStubSaveRegisters(object_, scratch1_, save_fp_mode);
}
}

View File

@ -1123,10 +1123,8 @@ static bool TransitivelyCalledBuiltinHasNoSideEffect(Builtin caller,
case Builtin::kProxyHasProperty:
case Builtin::kProxyIsExtensible:
case Builtin::kProxyGetPrototypeOf:
case Builtin::kRecordWriteEmitRememberedSetSaveFP:
case Builtin::kRecordWriteOmitRememberedSetSaveFP:
case Builtin::kRecordWriteEmitRememberedSetIgnoreFP:
case Builtin::kRecordWriteOmitRememberedSetIgnoreFP:
case Builtin::kRecordWriteSaveFP:
case Builtin::kRecordWriteIgnoreFP:
case Builtin::kStringAdd_CheckNone:
case Builtin::kStringEqual:
case Builtin::kStringIndexOf:

View File

@ -457,9 +457,6 @@ DEFINE_BOOL_READONLY(enable_unconditional_write_barriers,
V8_ENABLE_UNCONDITIONAL_WRITE_BARRIERS_BOOL,
"always use full write barriers")
DEFINE_BOOL(use_full_record_write_builtin, true,
"Force use of full version of RecordWrite builtin.")
#ifdef V8_ENABLE_SINGLE_GENERATION
#define V8_SINGLE_GENERATION_BOOL true
#else

View File

@ -104,10 +104,8 @@ bool IsUnexpectedCodeObject(Isolate* isolate, HeapObject obj) {
case Builtin::kAbort:
case Builtin::kCEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit:
case Builtin::kInterpreterEntryTrampoline:
case Builtin::kRecordWriteEmitRememberedSetSaveFP:
case Builtin::kRecordWriteOmitRememberedSetSaveFP:
case Builtin::kRecordWriteEmitRememberedSetIgnoreFP:
case Builtin::kRecordWriteOmitRememberedSetIgnoreFP:
case Builtin::kRecordWriteSaveFP:
case Builtin::kRecordWriteIgnoreFP:
#ifdef V8_IS_TSAN
case Builtin::kTSANRelaxedStore8IgnoreFP:
case Builtin::kTSANRelaxedStore8SaveFP:

View File

@ -789,8 +789,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
dst_addr,
actual_offset_reg == no_reg ? Operand(offset_imm)
: Operand(actual_offset_reg),
RememberedSetAction::kEmit, SaveFPRegsMode::kSave,
StubCallMode::kCallWasmRuntimeStub);
SaveFPRegsMode::kSave, StubCallMode::kCallWasmRuntimeStub);
bind(&exit);
}

View File

@ -520,9 +520,8 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
}
CheckPageFlag(src.gp(), MemoryChunk::kPointersToHereAreInterestingMask, ne,
&exit);
CallRecordWriteStubSaveRegisters(
dst_addr, offset_op, RememberedSetAction::kEmit, SaveFPRegsMode::kSave,
StubCallMode::kCallWasmRuntimeStub);
CallRecordWriteStubSaveRegisters(dst_addr, offset_op, SaveFPRegsMode::kSave,
StubCallMode::kCallWasmRuntimeStub);
bind(&exit);
}

View File

@ -427,9 +427,8 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
MemoryChunk::kPointersToHereAreInterestingMask, zero, &exit,
Label::kNear);
lea(scratch, dst_op);
CallRecordWriteStubSaveRegisters(
dst_addr, scratch, RememberedSetAction::kEmit, SaveFPRegsMode::kSave,
StubCallMode::kCallWasmRuntimeStub);
CallRecordWriteStubSaveRegisters(dst_addr, scratch, SaveFPRegsMode::kSave,
StubCallMode::kCallWasmRuntimeStub);
bind(&exit);
}

View File

@ -425,9 +425,8 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
Label::kNear);
leaq(scratch, dst_op);
CallRecordWriteStubSaveRegisters(
dst_addr, scratch, RememberedSetAction::kEmit, SaveFPRegsMode::kSave,
StubCallMode::kCallWasmRuntimeStub);
CallRecordWriteStubSaveRegisters(dst_addr, scratch, SaveFPRegsMode::kSave,
StubCallMode::kCallWasmRuntimeStub);
bind(&exit);
}

View File

@ -50,82 +50,80 @@ struct WasmModule;
// Convenience macro listing all wasm runtime stubs. Note that the first few
// elements of the list coincide with {compiler::TrapId}, order matters.
#define WASM_RUNTIME_STUB_LIST(V, VTRAP) \
FOREACH_WASM_TRAPREASON(VTRAP) \
V(WasmCompileLazy) \
V(WasmTriggerTierUp) \
V(WasmDebugBreak) \
V(WasmInt32ToHeapNumber) \
V(WasmTaggedNonSmiToInt32) \
V(WasmFloat32ToNumber) \
V(WasmFloat64ToNumber) \
V(WasmTaggedToFloat64) \
V(WasmAllocateJSArray) \
V(WasmAtomicNotify) \
V(WasmI32AtomicWait32) \
V(WasmI32AtomicWait64) \
V(WasmI64AtomicWait32) \
V(WasmI64AtomicWait64) \
V(WasmGetOwnProperty) \
V(WasmRefFunc) \
V(WasmMemoryGrow) \
V(WasmTableInit) \
V(WasmTableCopy) \
V(WasmTableFill) \
V(WasmTableGrow) \
V(WasmTableGet) \
V(WasmTableSet) \
V(WasmTableGetFuncRef) \
V(WasmTableSetFuncRef) \
V(WasmStackGuard) \
V(WasmStackOverflow) \
V(WasmAllocateFixedArray) \
V(WasmThrow) \
V(WasmRethrow) \
V(WasmRethrowExplicitContext) \
V(WasmTraceEnter) \
V(WasmTraceExit) \
V(WasmTraceMemory) \
V(BigIntToI32Pair) \
V(BigIntToI64) \
V(CallRefIC) \
V(DoubleToI) \
V(I32PairToBigInt) \
V(I64ToBigInt) \
V(RecordWriteEmitRememberedSetSaveFP) \
V(RecordWriteOmitRememberedSetSaveFP) \
V(RecordWriteEmitRememberedSetIgnoreFP) \
V(RecordWriteOmitRememberedSetIgnoreFP) \
V(ToNumber) \
IF_TSAN(V, TSANRelaxedStore8IgnoreFP) \
IF_TSAN(V, TSANRelaxedStore8SaveFP) \
IF_TSAN(V, TSANRelaxedStore16IgnoreFP) \
IF_TSAN(V, TSANRelaxedStore16SaveFP) \
IF_TSAN(V, TSANRelaxedStore32IgnoreFP) \
IF_TSAN(V, TSANRelaxedStore32SaveFP) \
IF_TSAN(V, TSANRelaxedStore64IgnoreFP) \
IF_TSAN(V, TSANRelaxedStore64SaveFP) \
IF_TSAN(V, TSANSeqCstStore8IgnoreFP) \
IF_TSAN(V, TSANSeqCstStore8SaveFP) \
IF_TSAN(V, TSANSeqCstStore16IgnoreFP) \
IF_TSAN(V, TSANSeqCstStore16SaveFP) \
IF_TSAN(V, TSANSeqCstStore32IgnoreFP) \
IF_TSAN(V, TSANSeqCstStore32SaveFP) \
IF_TSAN(V, TSANSeqCstStore64IgnoreFP) \
IF_TSAN(V, TSANSeqCstStore64SaveFP) \
IF_TSAN(V, TSANRelaxedLoad32IgnoreFP) \
IF_TSAN(V, TSANRelaxedLoad32SaveFP) \
IF_TSAN(V, TSANRelaxedLoad64IgnoreFP) \
IF_TSAN(V, TSANRelaxedLoad64SaveFP) \
V(WasmAllocateArray_Uninitialized) \
V(WasmArrayCopy) \
V(WasmArrayCopyWithChecks) \
V(WasmArrayInitFromData) \
V(WasmAllocateStructWithRtt) \
V(WasmSubtypeCheck) \
V(WasmOnStackReplace) \
V(WasmSuspend) \
V(WasmStringNewWtf8) \
#define WASM_RUNTIME_STUB_LIST(V, VTRAP) \
FOREACH_WASM_TRAPREASON(VTRAP) \
V(WasmCompileLazy) \
V(WasmTriggerTierUp) \
V(WasmDebugBreak) \
V(WasmInt32ToHeapNumber) \
V(WasmTaggedNonSmiToInt32) \
V(WasmFloat32ToNumber) \
V(WasmFloat64ToNumber) \
V(WasmTaggedToFloat64) \
V(WasmAllocateJSArray) \
V(WasmAtomicNotify) \
V(WasmI32AtomicWait32) \
V(WasmI32AtomicWait64) \
V(WasmI64AtomicWait32) \
V(WasmI64AtomicWait64) \
V(WasmGetOwnProperty) \
V(WasmRefFunc) \
V(WasmMemoryGrow) \
V(WasmTableInit) \
V(WasmTableCopy) \
V(WasmTableFill) \
V(WasmTableGrow) \
V(WasmTableGet) \
V(WasmTableSet) \
V(WasmTableGetFuncRef) \
V(WasmTableSetFuncRef) \
V(WasmStackGuard) \
V(WasmStackOverflow) \
V(WasmAllocateFixedArray) \
V(WasmThrow) \
V(WasmRethrow) \
V(WasmRethrowExplicitContext) \
V(WasmTraceEnter) \
V(WasmTraceExit) \
V(WasmTraceMemory) \
V(BigIntToI32Pair) \
V(BigIntToI64) \
V(CallRefIC) \
V(DoubleToI) \
V(I32PairToBigInt) \
V(I64ToBigInt) \
V(RecordWriteSaveFP) \
V(RecordWriteIgnoreFP) \
V(ToNumber) \
IF_TSAN(V, TSANRelaxedStore8IgnoreFP) \
IF_TSAN(V, TSANRelaxedStore8SaveFP) \
IF_TSAN(V, TSANRelaxedStore16IgnoreFP) \
IF_TSAN(V, TSANRelaxedStore16SaveFP) \
IF_TSAN(V, TSANRelaxedStore32IgnoreFP) \
IF_TSAN(V, TSANRelaxedStore32SaveFP) \
IF_TSAN(V, TSANRelaxedStore64IgnoreFP) \
IF_TSAN(V, TSANRelaxedStore64SaveFP) \
IF_TSAN(V, TSANSeqCstStore8IgnoreFP) \
IF_TSAN(V, TSANSeqCstStore8SaveFP) \
IF_TSAN(V, TSANSeqCstStore16IgnoreFP) \
IF_TSAN(V, TSANSeqCstStore16SaveFP) \
IF_TSAN(V, TSANSeqCstStore32IgnoreFP) \
IF_TSAN(V, TSANSeqCstStore32SaveFP) \
IF_TSAN(V, TSANSeqCstStore64IgnoreFP) \
IF_TSAN(V, TSANSeqCstStore64SaveFP) \
IF_TSAN(V, TSANRelaxedLoad32IgnoreFP) \
IF_TSAN(V, TSANRelaxedLoad32SaveFP) \
IF_TSAN(V, TSANRelaxedLoad64IgnoreFP) \
IF_TSAN(V, TSANRelaxedLoad64SaveFP) \
V(WasmAllocateArray_Uninitialized) \
V(WasmArrayCopy) \
V(WasmArrayCopyWithChecks) \
V(WasmArrayInitFromData) \
V(WasmAllocateStructWithRtt) \
V(WasmSubtypeCheck) \
V(WasmOnStackReplace) \
V(WasmSuspend) \
V(WasmStringNewWtf8) \
V(WasmStringNewWtf16)
// Sorted, disjoint and non-overlapping memory regions. A region is of the
@ -173,23 +171,12 @@ class V8_EXPORT_PRIVATE WasmCode final {
kRuntimeStubCount
};
static constexpr RuntimeStubId GetRecordWriteStub(
RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode) {
switch (remembered_set_action) {
case RememberedSetAction::kEmit:
switch (fp_mode) {
case SaveFPRegsMode::kIgnore:
return RuntimeStubId::kRecordWriteEmitRememberedSetIgnoreFP;
case SaveFPRegsMode::kSave:
return RuntimeStubId::kRecordWriteEmitRememberedSetSaveFP;
}
case RememberedSetAction::kOmit:
switch (fp_mode) {
case SaveFPRegsMode::kIgnore:
return RuntimeStubId::kRecordWriteOmitRememberedSetIgnoreFP;
case SaveFPRegsMode::kSave:
return RuntimeStubId::kRecordWriteOmitRememberedSetSaveFP;
}
static constexpr RuntimeStubId GetRecordWriteStub(SaveFPRegsMode fp_mode) {
switch (fp_mode) {
case SaveFPRegsMode::kIgnore:
return RuntimeStubId::kRecordWriteIgnoreFP;
case SaveFPRegsMode::kSave:
return RuntimeStubId::kRecordWriteSaveFP;
}
}