Index: src/compiler/mips/code-generator-mips.cc |
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc |
index 560ef26692e32e45d128ccdc54a279e702cd713f..cdd8bdb337199456955860b100df294902cdc996 100644 |
--- a/src/compiler/mips/code-generator-mips.cc |
+++ b/src/compiler/mips/code-generator-mips.cc |
@@ -1361,21 +1361,23 @@ void CodeGenerator::AddNopForSmiCodeInlining() { |
void CodeGenerator::EnsureSpaceForLazyDeopt() { |
+ if (!info()->ShouldEnsureSpaceForLazyDeopt()) { |
+ return; |
+ } |
+ |
int space_needed = Deoptimizer::patch_size(); |
- if (!info()->IsStub()) { |
- // Ensure that we have enough space after the previous lazy-bailout |
- // instruction for patching the code here. |
- int current_pc = masm()->pc_offset(); |
- if (current_pc < last_lazy_deopt_pc_ + space_needed) { |
- // Block tramoline pool emission for duration of padding. |
- v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool( |
- masm()); |
- int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
- DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); |
- while (padding_size > 0) { |
- __ nop(); |
- padding_size -= v8::internal::Assembler::kInstrSize; |
- } |
+ // Ensure that we have enough space after the previous lazy-bailout |
+ // instruction for patching the code here. |
+ int current_pc = masm()->pc_offset(); |
+ if (current_pc < last_lazy_deopt_pc_ + space_needed) { |
+ // Block tramoline pool emission for duration of padding. |
+ v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool( |
+ masm()); |
+ int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
+ DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); |
+ while (padding_size > 0) { |
+ __ nop(); |
+ padding_size -= v8::internal::Assembler::kInstrSize; |
} |
} |
} |