| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index 5a12ca9690b35e388059443b9aeaeabe2868eaa3..382a93ba9c895e289f5cb6d1be13ff4e8b913e62 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -390,6 +390,9 @@ void LCodeGen::GenerateOsrPrologue() {
|
|
|
|
|
| void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) {
|
| + if (instr->IsCall()) {
|
| + EnsureSpaceForLazyDeopt(Deoptimizer::patch_size());
|
| + }
|
| if (!instr->IsLazyBailout() && !instr->IsGap()) {
|
| safepoints_.BumpLastLazySafepointIndex();
|
| }
|
| @@ -6072,7 +6075,7 @@ void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
|
|
|
|
|
| void LCodeGen::DoLazyBailout(LLazyBailout* instr) {
|
| - EnsureSpaceForLazyDeopt(Deoptimizer::patch_size());
|
| + last_lazy_deopt_pc_ = masm()->pc_offset();
|
| ASSERT(instr->HasEnvironment());
|
| LEnvironment* env = instr->environment();
|
| RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
|
| @@ -6148,10 +6151,7 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) {
|
| CallCode(isolate()->builtins()->StackCheck(),
|
| RelocInfo::CODE_TARGET,
|
| instr);
|
| - EnsureSpaceForLazyDeopt(Deoptimizer::patch_size());
|
| __ bind(&done);
|
| - RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
|
| - safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
|
| } else {
|
| ASSERT(instr->hydrogen()->is_backwards_branch());
|
| // Perform stack overflow check if this goto needs it before jumping.
|
|
|