Index: src/compiler/x87/code-generator-x87.cc |
diff --git a/src/compiler/x87/code-generator-x87.cc b/src/compiler/x87/code-generator-x87.cc |
index fc5992a9c157cebfdc695ebb0625948aa833307a..3e78a82bb6a13c6714b3083c957b6ccfdb915e04 100644 |
--- a/src/compiler/x87/code-generator-x87.cc |
+++ b/src/compiler/x87/code-generator-x87.cc |
@@ -736,8 +736,10 @@ |
__ fild_s(MemOperand(esp, 0)); |
__ lea(esp, Operand(esp, kPointerSize)); |
- CodeGenResult result = |
- AssembleDeoptimizerCall(deopt_state_id, current_source_position_); |
+ Deoptimizer::BailoutType bailout_type = |
+ Deoptimizer::BailoutType(MiscField::decode(instr->opcode())); |
+ CodeGenResult result = AssembleDeoptimizerCall( |
+ deopt_state_id, bailout_type, current_source_position_); |
if (result != kSuccess) return result; |
break; |
} |
@@ -2263,16 +2265,13 @@ |
} |
CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( |
- int deoptimization_id, SourcePosition pos) { |
- DeoptimizeKind deoptimization_kind = GetDeoptimizationKind(deoptimization_id); |
- DeoptimizeReason deoptimization_reason = |
- GetDeoptimizationReason(deoptimization_id); |
- Deoptimizer::BailoutType bailout_type = |
- deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT |
- : Deoptimizer::EAGER; |
+ int deoptimization_id, Deoptimizer::BailoutType bailout_type, |
+ SourcePosition pos) { |
Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
isolate(), deoptimization_id, bailout_type); |
if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; |
+ DeoptimizeReason deoptimization_reason = |
+ GetDeoptimizationReason(deoptimization_id); |
__ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); |
__ call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
return kSuccess; |