Index: src/compiler/instruction-selector.cc |
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc |
index 7e7b909b4f6ded1317e49721c9a096f85037b561..d7fd37a4582eb4ab3101e9e54ee6870ac77716de 100644 |
--- a/src/compiler/instruction-selector.cc |
+++ b/src/compiler/instruction-selector.cc |
@@ -765,7 +765,8 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer, |
} |
int const state_id = sequence()->AddDeoptimizationEntry( |
- buffer->frame_state_descriptor, DeoptimizeReason::kNoReason); |
+ buffer->frame_state_descriptor, DeoptimizeKind::kEager, |
+ DeoptimizeReason::kNoReason); |
buffer->instruction_args.push_back(g.TempImmediate(state_id)); |
StateObjectDeduplicator deduplicator(instruction_zone()); |
@@ -1919,7 +1920,6 @@ void InstructionSelector::VisitRoundUint64ToFloat64(Node* node) { |
UNIMPLEMENTED(); |
} |
- |
void InstructionSelector::VisitBitcastFloat64ToInt64(Node* node) { |
UNIMPLEMENTED(); |
} |
@@ -2466,32 +2466,31 @@ void InstructionSelector::VisitReturn(Node* ret) { |
Emit(kArchRet, 0, nullptr, input_count, value_locations); |
} |
-Instruction* InstructionSelector::EmitDeoptimize(InstructionCode opcode, |
- InstructionOperand output, |
- InstructionOperand a, |
- DeoptimizeReason reason, |
- Node* frame_state) { |
+Instruction* InstructionSelector::EmitDeoptimize( |
+ InstructionCode opcode, InstructionOperand output, InstructionOperand a, |
+ DeoptimizeKind kind, DeoptimizeReason reason, Node* frame_state) { |
size_t output_count = output.IsInvalid() ? 0 : 1; |
InstructionOperand inputs[] = {a}; |
size_t input_count = arraysize(inputs); |
return EmitDeoptimize(opcode, output_count, &output, input_count, inputs, |
- reason, frame_state); |
+ kind, reason, frame_state); |
} |
Instruction* InstructionSelector::EmitDeoptimize( |
InstructionCode opcode, InstructionOperand output, InstructionOperand a, |
- InstructionOperand b, DeoptimizeReason reason, Node* frame_state) { |
+ InstructionOperand b, DeoptimizeKind kind, DeoptimizeReason reason, |
+ Node* frame_state) { |
size_t output_count = output.IsInvalid() ? 0 : 1; |
InstructionOperand inputs[] = {a, b}; |
size_t input_count = arraysize(inputs); |
return EmitDeoptimize(opcode, output_count, &output, input_count, inputs, |
- reason, frame_state); |
+ kind, reason, frame_state); |
} |
Instruction* InstructionSelector::EmitDeoptimize( |
InstructionCode opcode, size_t output_count, InstructionOperand* outputs, |
- size_t input_count, InstructionOperand* inputs, DeoptimizeReason reason, |
- Node* frame_state) { |
+ size_t input_count, InstructionOperand* inputs, DeoptimizeKind kind, |
+ DeoptimizeReason reason, Node* frame_state) { |
OperandGenerator g(this); |
FrameStateDescriptor* const descriptor = GetFrameStateDescriptor(frame_state); |
InstructionOperandVector args(instruction_zone()); |
@@ -2500,7 +2499,8 @@ Instruction* InstructionSelector::EmitDeoptimize( |
args.push_back(inputs[i]); |
} |
opcode |= MiscField::encode(static_cast<int>(input_count)); |
- int const state_id = sequence()->AddDeoptimizationEntry(descriptor, reason); |
+ int const state_id = |
+ sequence()->AddDeoptimizationEntry(descriptor, kind, reason); |
args.push_back(g.TempImmediate(state_id)); |
StateObjectDeduplicator deduplicator(instruction_zone()); |
AddInputsToFrameStateDescriptor(descriptor, frame_state, &g, &deduplicator, |
@@ -2519,16 +2519,7 @@ void InstructionSelector::EmitIdentity(Node* node) { |
void InstructionSelector::VisitDeoptimize(DeoptimizeKind kind, |
DeoptimizeReason reason, |
Node* value) { |
- InstructionCode opcode = kArchDeoptimize; |
- switch (kind) { |
- case DeoptimizeKind::kEager: |
- opcode |= MiscField::encode(Deoptimizer::EAGER); |
- break; |
- case DeoptimizeKind::kSoft: |
- opcode |= MiscField::encode(Deoptimizer::SOFT); |
- break; |
- } |
- EmitDeoptimize(opcode, 0, nullptr, 0, nullptr, reason, value); |
+ EmitDeoptimize(kArchDeoptimize, 0, nullptr, 0, nullptr, kind, reason, value); |
} |