Index: src/compiler/s390/code-generator-s390.cc |
diff --git a/src/compiler/s390/code-generator-s390.cc b/src/compiler/s390/code-generator-s390.cc |
index d6a952d7aa87dd439072bda14c3537045744557f..250d9453a60cef203def722d53942de9c45ef095 100644 |
--- a/src/compiler/s390/code-generator-s390.cc |
+++ b/src/compiler/s390/code-generator-s390.cc |
@@ -1162,10 +1162,8 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
case kArchDeoptimize: { |
int deopt_state_id = |
BuildTranslation(instr, -1, 0, OutputFrameStateCombine::Ignore()); |
- 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; |
} |
@@ -2393,16 +2391,19 @@ 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); |
// TODO(turbofan): We should be able to generate better code by sharing the |
// actual final call site and just bl'ing to it here, similar to what we do |
// in the lithium backend. |
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; |