Index: src/compiler/ia32/code-generator-ia32.cc |
diff --git a/src/compiler/ia32/code-generator-ia32.cc b/src/compiler/ia32/code-generator-ia32.cc |
index 3113897e2e12474042fd5199569bd28c49f14f7d..5f0ad29c86975bce9124f1c350093c3bdd8601a5 100644 |
--- a/src/compiler/ia32/code-generator-ia32.cc |
+++ b/src/compiler/ia32/code-generator-ia32.cc |
@@ -427,7 +427,8 @@ void CodeGenerator::AssemblePopArgumentsAdaptorFrame(Register args_reg, |
} |
// Assembles an instruction after register allocation, producing machine code. |
-void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
+CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
+ Instruction* instr) { |
IA32OperandConverter i(this, instr); |
InstructionCode opcode = instr->opcode(); |
ArchOpcode arch_opcode = ArchOpcodeField::decode(opcode); |
@@ -546,7 +547,9 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
BuildTranslation(instr, -1, 0, OutputFrameStateCombine::Ignore()); |
Deoptimizer::BailoutType bailout_type = |
Deoptimizer::BailoutType(MiscField::decode(instr->opcode())); |
- AssembleDeoptimizerCall(deopt_state_id, bailout_type); |
+ CodeGenResult result = |
+ AssembleDeoptimizerCall(deopt_state_id, bailout_type); |
+ if (result != kSuccess) return result; |
break; |
} |
case kArchRet: |
@@ -1331,6 +1334,7 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
UNREACHABLE(); // Won't be generated by instruction selector. |
break; |
} |
+ return kSuccess; |
} // NOLINT(readability/fn_size) |
@@ -1504,12 +1508,13 @@ void CodeGenerator::AssembleArchTableSwitch(Instruction* instr) { |
__ jmp(Operand::JumpTable(input, times_4, table)); |
} |
- |
-void CodeGenerator::AssembleDeoptimizerCall( |
+CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( |
int deoptimization_id, Deoptimizer::BailoutType bailout_type) { |
Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
isolate(), deoptimization_id, bailout_type); |
+ if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; |
__ call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
+ return kSuccess; |
} |