Index: src/x87/lithium-codegen-x87.cc |
diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc |
index ef8ee0eaa140c2e016e6a46b9cdaf924f7895485..e5a66ace2b02e7254910d11589743882011b4e03 100644 |
--- a/src/x87/lithium-codegen-x87.cc |
+++ b/src/x87/lithium-codegen-x87.cc |
@@ -77,7 +77,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); |
} |
} |
@@ -497,7 +497,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. |
@@ -1093,7 +1093,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) { |
@@ -6096,7 +6095,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(); |