Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index d12b229c381323ca0f80f417548b6e29e90e9403..1b5d90bd1f658b7ac00d5bbd2cb971cd84f5ae46 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -277,6 +277,7 @@ bool LCodeGen::GenerateBody() { |
instr->CompileToNative(this); |
} |
EnsureSpaceForLazyDeopt(); |
+ last_lazy_deopt_pc_ = masm()->pc_offset(); |
return !is_aborted(); |
} |
@@ -676,6 +677,7 @@ void LCodeGen::CallCodeGeneric(Handle<Code> code, |
LInstruction* instr, |
SafepointMode safepoint_mode, |
TargetAddressStorageMode storage_mode) { |
+ EnsureSpaceForLazyDeopt(); |
ASSERT(instr != NULL); |
// Block literal pool emission to ensure nop indicating no inlined smi code |
// is in the correct position. |
@@ -5629,12 +5631,12 @@ void LCodeGen::EnsureSpaceForLazyDeopt() { |
padding_size -= Assembler::kInstrSize; |
} |
} |
- last_lazy_deopt_pc_ = masm()->pc_offset(); |
} |
void LCodeGen::DoLazyBailout(LLazyBailout* instr) { |
EnsureSpaceForLazyDeopt(); |
+ last_lazy_deopt_pc_ = masm()->pc_offset(); |
ASSERT(instr->HasEnvironment()); |
LEnvironment* env = instr->environment(); |
RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); |
@@ -5692,6 +5694,7 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) { |
PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize); |
CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
EnsureSpaceForLazyDeopt(); |
+ last_lazy_deopt_pc_ = masm()->pc_offset(); |
__ bind(&done); |
RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); |
safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
@@ -5704,6 +5707,7 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) { |
__ cmp(sp, Operand(ip)); |
__ b(lo, deferred_stack_check->entry()); |
EnsureSpaceForLazyDeopt(); |
+ last_lazy_deopt_pc_ = masm()->pc_offset(); |
__ bind(instr->done_label()); |
deferred_stack_check->SetExit(instr->done_label()); |
RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); |