Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index f6aa53430eb261a75d756df85457f6bcdfcfe60f..a3cfd215bd1a683dfc29ce850d90d0fb73c26ff5 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -433,8 +433,7 @@ void LChunk::MarkEmptyBlocks() { |
LLabel* label = LLabel::cast(first_instr); |
if (last_instr->IsGoto()) { |
LGoto* goto_instr = LGoto::cast(last_instr); |
- if (!goto_instr->include_stack_check() && |
- label->IsRedundant() && |
+ if (label->IsRedundant() && |
!label->is_loop_header()) { |
bool can_eliminate = true; |
for (int i = first + 1; i < last && can_eliminate; ++i) { |
@@ -1043,10 +1042,7 @@ LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) { |
LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
- LInstruction* result = new LGoto(instr->FirstSuccessor()->block_id(), |
- instr->include_stack_check()); |
- if (instr->include_stack_check()) result = AssignPointerMap(result); |
- return result; |
+ return new LGoto(instr->FirstSuccessor()->block_id()); |
} |
@@ -2217,7 +2213,12 @@ LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { |
LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) { |
- return MarkAsCall(new LStackCheck, instr); |
+ if (instr->is_function_entry()) { |
+ return MarkAsCall(new LStackCheck, instr); |
+ } else { |
+ ASSERT(instr->is_backwards_branch()); |
+ return AssignEnvironment(AssignPointerMap(new LStackCheck)); |
+ } |
} |