| 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 4241a5e9824c35c341241975b3feb585df099030..f102ef5cfb6c7d2100fe3b6a1db8a0e2aadad7a0 100644
|
| --- a/src/compiler/ia32/code-generator-ia32.cc
|
| +++ b/src/compiler/ia32/code-generator-ia32.cc
|
| @@ -1518,15 +1518,17 @@ void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); }
|
|
|
|
|
| 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) {
|
| - int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
|
| - __ Nop(padding_size);
|
| - }
|
| + // 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) {
|
| + int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
|
| + __ Nop(padding_size);
|
| }
|
| }
|
|
|
|
|