| 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 3e78a82bb6a13c6714b3083c957b6ccfdb915e04..fc5992a9c157cebfdc695ebb0625948aa833307a 100644
|
| --- a/src/compiler/x87/code-generator-x87.cc
|
| +++ b/src/compiler/x87/code-generator-x87.cc
|
| @@ -736,10 +736,8 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
| __ fild_s(MemOperand(esp, 0));
|
| __ lea(esp, Operand(esp, kPointerSize));
|
|
|
| - Deoptimizer::BailoutType bailout_type =
|
| - Deoptimizer::BailoutType(MiscField::decode(instr->opcode()));
|
| - CodeGenResult result = AssembleDeoptimizerCall(
|
| - deopt_state_id, bailout_type, current_source_position_);
|
| + CodeGenResult result =
|
| + AssembleDeoptimizerCall(deopt_state_id, current_source_position_);
|
| if (result != kSuccess) return result;
|
| break;
|
| }
|
| @@ -2265,13 +2263,16 @@ void CodeGenerator::AssembleArchTableSwitch(Instruction* instr) {
|
| }
|
|
|
| CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall(
|
| - int deoptimization_id, Deoptimizer::BailoutType bailout_type,
|
| - SourcePosition pos) {
|
| + 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;
|
| 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;
|
|
|