| Index: src/compiler/x64/code-generator-x64.cc
|
| diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
|
| index 3ad07ad7de34e09d40abf226ecfc20bf894e332b..55f808883eca8b3e8641eb6be77d19c471ea5749 100644
|
| --- a/src/compiler/x64/code-generator-x64.cc
|
| +++ b/src/compiler/x64/code-generator-x64.cc
|
| @@ -1760,15 +1760,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);
|
| }
|
| }
|
|
|
|
|