[cleanup] Remove dead parameter in DefineSafepoint
Bug: v8:11384 Change-Id: I08bf27af977e94e6d441a83a62cae49eeaf856e8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2697198 Reviewed-by: Georg Neis <neis@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#72776}
This commit is contained in:
parent
76fdceae53
commit
5348e9b155
@ -88,8 +88,7 @@ void SafepointTable::PrintBits(std::ostream& os, // NOLINT
|
||||
}
|
||||
}
|
||||
|
||||
Safepoint SafepointTableBuilder::DefineSafepoint(
|
||||
Assembler* assembler, Safepoint::DeoptMode deopt_mode) {
|
||||
Safepoint SafepointTableBuilder::DefineSafepoint(Assembler* assembler) {
|
||||
deoptimization_info_.push_back(
|
||||
DeoptimizationInfo(zone_, assembler->pc_offset_for_safepoint()));
|
||||
DeoptimizationInfo& new_info = deoptimization_info_.back();
|
||||
|
@ -168,8 +168,6 @@ class SafepointTable {
|
||||
|
||||
class Safepoint {
|
||||
public:
|
||||
enum DeoptMode { kNoLazyDeopt, kLazyDeopt };
|
||||
|
||||
static const int kNoDeoptimizationIndex = SafepointEntry::kNoDeoptIndex;
|
||||
|
||||
void DefinePointerSlot(int index) { indexes_->push_back(index); }
|
||||
@ -195,7 +193,7 @@ class SafepointTableBuilder {
|
||||
unsigned GetCodeOffset() const;
|
||||
|
||||
// Define a new safepoint for the current position in the body.
|
||||
Safepoint DefineSafepoint(Assembler* assembler, Safepoint::DeoptMode mode);
|
||||
Safepoint DefineSafepoint(Assembler* assembler);
|
||||
|
||||
// Emit the safepoint table after the body. The number of bits per
|
||||
// entry must be enough to hold all the pointer indexes.
|
||||
|
@ -869,7 +869,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
__ CallCFunction(func, num_parameters);
|
||||
}
|
||||
if (linkage()->GetIncomingDescriptor()->IsWasmCapiFunction()) {
|
||||
RecordSafepoint(instr->reference_map(), Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(instr->reference_map());
|
||||
}
|
||||
frame_access_state()->SetFrameAccessToDefault();
|
||||
// Ideally, we should decrement SP delta to match the change of stack
|
||||
@ -3686,7 +3686,7 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
|
||||
__ Call(static_cast<Address>(trap_id), RelocInfo::WASM_STUB_CALL);
|
||||
ReferenceMap* reference_map =
|
||||
gen_->zone()->New<ReferenceMap>(gen_->zone());
|
||||
gen_->RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
gen_->RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
@ -3853,7 +3853,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
__ Call(wasm::WasmCode::kWasmStackOverflow, RelocInfo::WASM_STUB_CALL);
|
||||
// We come from WebAssembly, there are no references for the GC.
|
||||
ReferenceMap* reference_map = zone()->New<ReferenceMap>(zone());
|
||||
RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
|
@ -412,7 +412,7 @@ class WasmOutOfLineTrap : public OutOfLineCode {
|
||||
__ Call(static_cast<Address>(trap_id), RelocInfo::WASM_STUB_CALL);
|
||||
ReferenceMap* reference_map =
|
||||
gen_->zone()->New<ReferenceMap>(gen_->zone());
|
||||
gen_->RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
gen_->RecordSafepoint(reference_map);
|
||||
__ AssertUnreachable(AbortReason::kUnexpectedReturnFromWasmTrap);
|
||||
}
|
||||
}
|
||||
@ -881,7 +881,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
}
|
||||
__ Bind(&return_location);
|
||||
if (linkage()->GetIncomingDescriptor()->IsWasmCapiFunction()) {
|
||||
RecordSafepoint(instr->reference_map(), Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(instr->reference_map());
|
||||
}
|
||||
frame_access_state()->SetFrameAccessToDefault();
|
||||
// Ideally, we should decrement SP delta to match the change of stack
|
||||
@ -3161,7 +3161,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
__ Call(wasm::WasmCode::kWasmStackOverflow, RelocInfo::WASM_STUB_CALL);
|
||||
// We come from WebAssembly, there are no references for the GC.
|
||||
ReferenceMap* reference_map = zone()->New<ReferenceMap>(zone());
|
||||
RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ Brk(0);
|
||||
}
|
||||
|
@ -606,9 +606,8 @@ bool CodeGenerator::IsNextInAssemblyOrder(RpoNumber block) const {
|
||||
.IsNext(instructions()->InstructionBlockAt(block)->ao_number());
|
||||
}
|
||||
|
||||
void CodeGenerator::RecordSafepoint(ReferenceMap* references,
|
||||
Safepoint::DeoptMode deopt_mode) {
|
||||
Safepoint safepoint = safepoints()->DefineSafepoint(tasm(), deopt_mode);
|
||||
void CodeGenerator::RecordSafepoint(ReferenceMap* references) {
|
||||
Safepoint safepoint = safepoints()->DefineSafepoint(tasm());
|
||||
int frame_header_offset = frame()->GetFixedSlotCount();
|
||||
for (const InstructionOperand& operand : references->reference_operands()) {
|
||||
if (operand.IsStackSlot()) {
|
||||
@ -1051,9 +1050,7 @@ Label* CodeGenerator::AddJumpTable(Label** targets, size_t target_count) {
|
||||
void CodeGenerator::RecordCallPosition(Instruction* instr) {
|
||||
const bool needs_frame_state =
|
||||
instr->HasCallDescriptorFlag(CallDescriptor::kNeedsFrameState);
|
||||
RecordSafepoint(instr->reference_map(), needs_frame_state
|
||||
? Safepoint::kLazyDeopt
|
||||
: Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(instr->reference_map());
|
||||
|
||||
if (instr->HasCallDescriptorFlag(CallDescriptor::kHasExceptionHandler)) {
|
||||
InstructionOperandConverter i(this, instr);
|
||||
|
@ -160,8 +160,7 @@ class V8_EXPORT_PRIVATE CodeGenerator final : public GapResolver::Assembler {
|
||||
void AssembleSourcePosition(SourcePosition source_position);
|
||||
|
||||
// Record a safepoint with the given pointer map.
|
||||
void RecordSafepoint(ReferenceMap* references,
|
||||
Safepoint::DeoptMode deopt_mode);
|
||||
void RecordSafepoint(ReferenceMap* references);
|
||||
|
||||
Zone* zone() const { return zone_; }
|
||||
TurboAssembler* tasm() { return &tasm_; }
|
||||
|
@ -883,7 +883,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
}
|
||||
__ bind(&return_location);
|
||||
if (linkage()->GetIncomingDescriptor()->IsWasmCapiFunction()) {
|
||||
RecordSafepoint(instr->reference_map(), Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(instr->reference_map());
|
||||
}
|
||||
frame_access_state()->SetFrameAccessToDefault();
|
||||
// Ideally, we should decrement SP delta to match the change of stack
|
||||
@ -4616,7 +4616,7 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
|
||||
__ wasm_call(static_cast<Address>(trap_id), RelocInfo::WASM_STUB_CALL);
|
||||
ReferenceMap* reference_map =
|
||||
gen_->zone()->New<ReferenceMap>(gen_->zone());
|
||||
gen_->RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
gen_->RecordSafepoint(reference_map);
|
||||
__ AssertUnreachable(AbortReason::kUnexpectedReturnFromWasmTrap);
|
||||
}
|
||||
}
|
||||
@ -4923,7 +4923,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
__ wasm_call(wasm::WasmCode::kWasmStackOverflow,
|
||||
RelocInfo::WASM_STUB_CALL);
|
||||
ReferenceMap* reference_map = zone()->New<ReferenceMap>(zone());
|
||||
RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(reference_map);
|
||||
__ AssertUnreachable(AbortReason::kUnexpectedReturnFromWasmTrap);
|
||||
__ bind(&done);
|
||||
}
|
||||
|
@ -790,7 +790,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
}
|
||||
if (isWasmCapiFunction) {
|
||||
CHECK_EQ(offset, __ SizeOfCodeGeneratedSince(&start_call));
|
||||
RecordSafepoint(instr->reference_map(), Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(instr->reference_map());
|
||||
}
|
||||
|
||||
frame_access_state()->SetFrameAccessToDefault();
|
||||
@ -3773,7 +3773,7 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
|
||||
__ Call(static_cast<Address>(trap_id), RelocInfo::WASM_STUB_CALL);
|
||||
ReferenceMap* reference_map =
|
||||
gen_->zone()->New<ReferenceMap>(gen_->zone());
|
||||
gen_->RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
gen_->RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
@ -4063,7 +4063,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
__ Call(wasm::WasmCode::kWasmStackOverflow, RelocInfo::WASM_STUB_CALL);
|
||||
// We come from WebAssembly, there are no references for the GC.
|
||||
ReferenceMap* reference_map = zone()->New<ReferenceMap>(zone());
|
||||
RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
|
@ -755,7 +755,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
}
|
||||
if (isWasmCapiFunction) {
|
||||
CHECK_EQ(offset, __ SizeOfCodeGeneratedSince(&start_call));
|
||||
RecordSafepoint(instr->reference_map(), Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(instr->reference_map());
|
||||
}
|
||||
|
||||
frame_access_state()->SetFrameAccessToDefault();
|
||||
@ -4011,7 +4011,7 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
|
||||
__ Call(static_cast<Address>(trap_id), RelocInfo::WASM_STUB_CALL);
|
||||
ReferenceMap* reference_map =
|
||||
gen_->zone()->New<ReferenceMap>(gen_->zone());
|
||||
gen_->RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
gen_->RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
@ -4313,7 +4313,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
__ Call(wasm::WasmCode::kWasmStackOverflow, RelocInfo::WASM_STUB_CALL);
|
||||
// We come from WebAssembly, there are no references for the GC.
|
||||
ReferenceMap* reference_map = zone()->New<ReferenceMap>(zone());
|
||||
RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
|
@ -1045,7 +1045,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
// f5ab7d3.
|
||||
if (isWasmCapiFunction) {
|
||||
CHECK_EQ(offset, __ SizeOfCodeGeneratedSince(&start_call));
|
||||
RecordSafepoint(instr->reference_map(), Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(instr->reference_map());
|
||||
}
|
||||
frame_access_state()->SetFrameAccessToDefault();
|
||||
// Ideally, we should decrement SP delta to match the change of stack
|
||||
@ -3861,7 +3861,7 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
|
||||
__ Call(static_cast<Address>(trap_id), RelocInfo::WASM_STUB_CALL);
|
||||
ReferenceMap* reference_map =
|
||||
gen_->zone()->New<ReferenceMap>(gen_->zone());
|
||||
gen_->RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
gen_->RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
@ -4101,7 +4101,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
__ Call(wasm::WasmCode::kWasmStackOverflow, RelocInfo::WASM_STUB_CALL);
|
||||
// We come from WebAssembly, there are no references for the GC.
|
||||
ReferenceMap* reference_map = zone()->New<ReferenceMap>(zone());
|
||||
RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
}
|
||||
__ bind(&after_call);
|
||||
if (isWasmCapiFunction) {
|
||||
RecordSafepoint(instr->reference_map(), Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(instr->reference_map());
|
||||
}
|
||||
|
||||
frame_access_state()->SetFrameAccessToDefault();
|
||||
@ -2087,7 +2087,7 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
|
||||
__ Call(static_cast<Address>(trap_id), RelocInfo::WASM_STUB_CALL);
|
||||
ReferenceMap* reference_map =
|
||||
gen_->zone()->New<ReferenceMap>(gen_->zone());
|
||||
gen_->RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
gen_->RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
@ -2382,7 +2382,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
__ Call(wasm::WasmCode::kWasmStackOverflow, RelocInfo::WASM_STUB_CALL);
|
||||
// We come from WebAssembly, there are no references for the GC.
|
||||
ReferenceMap* reference_map = zone()->New<ReferenceMap>(zone());
|
||||
RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
|
@ -1327,7 +1327,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
}
|
||||
__ bind(&return_location);
|
||||
if (linkage()->GetIncomingDescriptor()->IsWasmCapiFunction()) {
|
||||
RecordSafepoint(instr->reference_map(), Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(instr->reference_map());
|
||||
}
|
||||
frame_access_state()->SetFrameAccessToDefault();
|
||||
// Ideally, we should decrement SP delta to match the change of stack
|
||||
@ -4230,7 +4230,7 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
|
||||
__ Call(static_cast<Address>(trap_id), RelocInfo::WASM_STUB_CALL);
|
||||
ReferenceMap* reference_map =
|
||||
gen_->zone()->New<ReferenceMap>(gen_->zone());
|
||||
gen_->RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
gen_->RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
@ -4430,7 +4430,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
__ Call(wasm::WasmCode::kWasmStackOverflow, RelocInfo::WASM_STUB_CALL);
|
||||
// We come from WebAssembly, there are no references for the GC.
|
||||
ReferenceMap* reference_map = zone()->New<ReferenceMap>(zone());
|
||||
RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ class WasmOutOfLineTrap : public OutOfLineCode {
|
||||
__ near_call(static_cast<Address>(trap_id), RelocInfo::WASM_STUB_CALL);
|
||||
ReferenceMap* reference_map =
|
||||
gen_->zone()->New<ReferenceMap>(gen_->zone());
|
||||
gen_->RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
gen_->RecordSafepoint(reference_map);
|
||||
__ AssertUnreachable(AbortReason::kUnexpectedReturnFromWasmTrap);
|
||||
}
|
||||
}
|
||||
@ -1028,7 +1028,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
}
|
||||
__ bind(&return_location);
|
||||
if (linkage()->GetIncomingDescriptor()->IsWasmCapiFunction()) {
|
||||
RecordSafepoint(instr->reference_map(), Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(instr->reference_map());
|
||||
}
|
||||
frame_access_state()->SetFrameAccessToDefault();
|
||||
// Ideally, we should decrement SP delta to match the change of stack
|
||||
@ -4756,7 +4756,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
__ near_call(wasm::WasmCode::kWasmStackOverflow,
|
||||
RelocInfo::WASM_STUB_CALL);
|
||||
ReferenceMap* reference_map = zone()->New<ReferenceMap>(zone());
|
||||
RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt);
|
||||
RecordSafepoint(reference_map);
|
||||
__ AssertUnreachable(AbortReason::kUnexpectedReturnFromWasmTrap);
|
||||
__ bind(&done);
|
||||
}
|
||||
|
@ -870,8 +870,7 @@ class LiftoffCompiler {
|
||||
source_position_table_builder_.AddPosition(
|
||||
__ pc_offset(), SourcePosition(ool->position), true);
|
||||
__ CallRuntimeStub(ool->stub);
|
||||
Safepoint safepoint = safepoint_table_builder_.DefineSafepoint(
|
||||
&asm_, Safepoint::kNoLazyDeopt);
|
||||
Safepoint safepoint = safepoint_table_builder_.DefineSafepoint(&asm_);
|
||||
|
||||
if (ool->safepoint_info) {
|
||||
for (auto index : ool->safepoint_info->slots) {
|
||||
@ -1019,7 +1018,7 @@ class LiftoffCompiler {
|
||||
__ pc_offset(), SourcePosition(decoder->position()), true);
|
||||
__ CallRuntimeStub(WasmCode::kWasmDebugBreak);
|
||||
// TODO(ahaas): Define a proper safepoint here.
|
||||
safepoint_table_builder_.DefineSafepoint(&asm_, Safepoint::kNoLazyDeopt);
|
||||
safepoint_table_builder_.DefineSafepoint(&asm_);
|
||||
RegisterDebugSideTableEntry(DebugSideTableBuilder::kAllowRegisters);
|
||||
}
|
||||
|
||||
@ -5369,8 +5368,7 @@ class LiftoffCompiler {
|
||||
}
|
||||
|
||||
void DefineSafepoint() {
|
||||
Safepoint safepoint = safepoint_table_builder_.DefineSafepoint(
|
||||
&asm_, Safepoint::kNoLazyDeopt);
|
||||
Safepoint safepoint = safepoint_table_builder_.DefineSafepoint(&asm_);
|
||||
__ cache_state()->DefineSafepoint(safepoint);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user