Commit 2d927fc3 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Simplify InstructionSelector::VisitDeoptimize

Change-Id: I6094bc17e8a482f166bdb53e5d2dabe9a1299c9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2087409
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66590}
parent 85f72be3
......@@ -798,21 +798,6 @@ void InstructionSelector::AppendDeoptimizeArguments(
instruction_zone());
}
Instruction* InstructionSelector::EmitDeoptimize(
InstructionCode opcode, size_t output_count, InstructionOperand* outputs,
size_t input_count, InstructionOperand* inputs, DeoptimizeKind kind,
DeoptimizeReason reason, FeedbackSource const& feedback,
Node* frame_state) {
InstructionOperandVector args(instruction_zone());
for (size_t i = 0; i < input_count; ++i) {
args.push_back(inputs[i]);
}
opcode |= MiscField::encode(static_cast<int>(input_count));
AppendDeoptimizeArguments(&args, kind, reason, feedback, frame_state);
return Emit(opcode, output_count, outputs, args.size(), &args.front(), 0,
nullptr);
}
// An internal helper class for generating the operands to calls.
// TODO(bmeurer): Get rid of the CallBuffer business and make
// InstructionSelector::VisitCall platform independent instead.
......@@ -2978,9 +2963,10 @@ void InstructionSelector::EmitIdentity(Node* node) {
void InstructionSelector::VisitDeoptimize(DeoptimizeKind kind,
DeoptimizeReason reason,
FeedbackSource const& feedback,
Node* value) {
EmitDeoptimize(kArchDeoptimize, 0, nullptr, 0, nullptr, kind, reason,
feedback, value);
Node* frame_state) {
InstructionOperandVector args(instruction_zone());
AppendDeoptimizeArguments(&args, kind, reason, feedback, frame_state);
Emit(kArchDeoptimize, 0, nullptr, args.size(), &args.front(), 0, nullptr);
}
void InstructionSelector::VisitThrow(Node* node) {
......
......@@ -353,16 +353,6 @@ class V8_EXPORT_PRIVATE InstructionSelector final {
void EmitIdentity(Node* node);
// ===========================================================================
// ===== Architecture-independent deoptimization exit emission methods. ======
// ===========================================================================
Instruction* EmitDeoptimize(InstructionCode opcode, size_t output_count,
InstructionOperand* outputs, size_t input_count,
InstructionOperand* inputs, DeoptimizeKind kind,
DeoptimizeReason reason,
FeedbackSource const& feedback,
Node* frame_state);
// ===========================================================================
// ============== Architecture-independent CPU feature methods. ==============
// ===========================================================================
......@@ -636,7 +626,7 @@ class V8_EXPORT_PRIVATE InstructionSelector final {
void VisitBranch(Node* input, BasicBlock* tbranch, BasicBlock* fbranch);
void VisitSwitch(Node* node, const SwitchInfo& sw);
void VisitDeoptimize(DeoptimizeKind kind, DeoptimizeReason reason,
FeedbackSource const& feedback, Node* value);
FeedbackSource const& feedback, Node* frame_state);
void VisitReturn(Node* ret);
void VisitThrow(Node* node);
void VisitRetain(Node* node);
......
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