| Index: src/ia32/lithium-ia32.cc
|
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
|
| index 9565a08ebae41a4506a2e5a09f1cf100066b5780..5d024faaf46b2b38d5fb87e16d829a8f99fd933f 100644
|
| --- a/src/ia32/lithium-ia32.cc
|
| +++ b/src/ia32/lithium-ia32.cc
|
| @@ -882,7 +882,14 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
|
| chunk_->AddInstruction(dummy, current_block_);
|
| }
|
| } else {
|
| - instr = current->CompileToLithium(this);
|
| + HBasicBlock* successor;
|
| + if (current->IsControlInstruction() &&
|
| + HControlInstruction::cast(current)->KnownSuccessorBlock(&successor) &&
|
| + successor != NULL) {
|
| + instr = new(zone()) LGoto(successor);
|
| + } else {
|
| + instr = current->CompileToLithium(this);
|
| + }
|
| }
|
|
|
| argument_count_ += current->argument_delta();
|
| @@ -968,9 +975,6 @@ LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
|
| - LInstruction* goto_instr = CheckElideControlInstruction(instr);
|
| - if (goto_instr != NULL) return goto_instr;
|
| -
|
| HValue* value = instr->value();
|
| Representation r = value->representation();
|
| HType type = value->type();
|
| @@ -996,9 +1000,6 @@ LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
|
| - LInstruction* goto_instr = CheckElideControlInstruction(instr);
|
| - if (goto_instr != NULL) return goto_instr;
|
| -
|
| ASSERT(instr->value()->representation().IsTagged());
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| return new(zone()) LCmpMapAndBranch(value);
|
| @@ -1644,8 +1645,6 @@ LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
|
|
|
| LInstruction* LChunkBuilder::DoCompareNumericAndBranch(
|
| HCompareNumericAndBranch* instr) {
|
| - LInstruction* goto_instr = CheckElideControlInstruction(instr);
|
| - if (goto_instr != NULL) return goto_instr;
|
| Representation r = instr->representation();
|
| if (r.IsSmiOrInteger32()) {
|
| ASSERT(instr->left()->representation().Equals(r));
|
| @@ -1676,8 +1675,6 @@ LInstruction* LChunkBuilder::DoCompareNumericAndBranch(
|
|
|
| LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch(
|
| HCompareObjectEqAndBranch* instr) {
|
| - LInstruction* goto_instr = CheckElideControlInstruction(instr);
|
| - if (goto_instr != NULL) return goto_instr;
|
| LOperand* left = UseRegisterAtStart(instr->left());
|
| LOperand* right = UseOrConstantAtStart(instr->right());
|
| return new(zone()) LCmpObjectEqAndBranch(left, right);
|
| @@ -1693,8 +1690,6 @@ LInstruction* LChunkBuilder::DoCompareHoleAndBranch(
|
|
|
| LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch(
|
| HCompareMinusZeroAndBranch* instr) {
|
| - LInstruction* goto_instr = CheckElideControlInstruction(instr);
|
| - if (goto_instr != NULL) return goto_instr;
|
| LOperand* value = UseRegister(instr->value());
|
| LOperand* scratch = TempRegister();
|
| return new(zone()) LCompareMinusZeroAndBranch(value, scratch);
|
| @@ -2568,8 +2563,6 @@ LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoTypeofIsAndBranch(HTypeofIsAndBranch* instr) {
|
| - LInstruction* goto_instr = CheckElideControlInstruction(instr);
|
| - if (goto_instr != NULL) return goto_instr;
|
| return new(zone()) LTypeofIsAndBranch(UseTempRegister(instr->value()));
|
| }
|
|
|
|
|