| Index: src/x64/lithium-x64.cc
|
| diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
|
| index 138219b49a6f247a0498284a022c39edaf7106a6..3943e96cfb4dfea07f94e27d3483a991ae05496e 100644
|
| --- a/src/x64/lithium-x64.cc
|
| +++ b/src/x64/lithium-x64.cc
|
| @@ -390,8 +390,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) {
|
| @@ -1038,11 +1037,7 @@ LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
|
| - LGoto* result = new LGoto(instr->FirstSuccessor()->block_id(),
|
| - instr->include_stack_check());
|
| - return (instr->include_stack_check())
|
| - ? AssignPointerMap(result)
|
| - : result;
|
| + return new LGoto(instr->FirstSuccessor()->block_id());
|
| }
|
|
|
|
|
| @@ -2209,7 +2204,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));
|
| + }
|
| }
|
|
|
|
|
|
|