| Index: src/compiler/x87/code-generator-x87.cc
|
| diff --git a/src/compiler/x87/code-generator-x87.cc b/src/compiler/x87/code-generator-x87.cc
|
| index d39fda6761ed095e18eca95b95b8235bdf100c6c..e174e709c7784e44e99da7627126681737d194d5 100644
|
| --- a/src/compiler/x87/code-generator-x87.cc
|
| +++ b/src/compiler/x87/code-generator-x87.cc
|
| @@ -1838,15 +1838,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);
|
| }
|
| }
|
|
|
|
|