Index: src/compiler/arm64/code-generator-arm64.cc |
diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc |
index 48c82f00d64eb3f17576994e8fbe81ac19c66255..5eec65ac81827417f6ad7f4898adcfb8751632db 100644 |
--- a/src/compiler/arm64/code-generator-arm64.cc |
+++ b/src/compiler/arm64/code-generator-arm64.cc |
@@ -537,7 +537,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) { |
Arm64OperandConverter i(this, instr); |
InstructionCode opcode = instr->opcode(); |
ArchOpcode arch_opcode = ArchOpcodeField::decode(opcode); |
@@ -689,7 +690,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: |
@@ -1429,6 +1432,7 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
__ Dmb(InnerShareable, BarrierAll); |
break; |
} |
+ return kSuccess; |
} // NOLINT(readability/fn_size) |
@@ -1531,12 +1535,13 @@ void CodeGenerator::AssembleArchTableSwitch(Instruction* instr) { |
__ EndBlockPools(); |
} |
- |
-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; |
} |
void CodeGenerator::FinishFrame(Frame* frame) { |