| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index 38f3f2cf80b20646ab29df64e5311536ab5f04ba..c0e0208c513f5fecb77321ab19d363df592ab286 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -76,7 +76,7 @@ void LCodeGen::FinishCode(Handle<Code> code) {
|
| code->set_stack_slots(GetStackSlotCount());
|
| code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
|
| PopulateDeoptimizationData(code);
|
| - if (!info()->IsStub()) {
|
| + if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
| Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code);
|
| }
|
| }
|
| @@ -496,7 +496,7 @@ bool LCodeGen::GenerateDeferredCode() {
|
|
|
| bool LCodeGen::GenerateSafepointTable() {
|
| DCHECK(is_done());
|
| - if (!info()->IsStub()) {
|
| + if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
| // For lazy deoptimization we need space to patch a call after every call.
|
| // Ensure there is always space for such patching, even if the code ends
|
| // in a call.
|
| @@ -825,7 +825,6 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
|
| RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
|
| DCHECK(environment->HasBeenRegistered());
|
| int id = environment->deoptimization_index();
|
| - DCHECK(info()->IsOptimizing() || info()->IsStub());
|
| Address entry =
|
| Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
|
| if (entry == NULL) {
|
| @@ -5486,7 +5485,7 @@ void LCodeGen::EmitIsConstructCall(Register temp) {
|
|
|
|
|
| void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
|
| - if (!info()->IsStub()) {
|
| + if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
| // Ensure that we have enough space after the previous lazy-bailout
|
| // instruction for patching the code here.
|
| int current_pc = masm()->pc_offset();
|
|
|