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