Chromium Code Reviews| Index: runtime/vm/intermediate_language_arm.cc |
| =================================================================== |
| --- runtime/vm/intermediate_language_arm.cc (revision 30058) |
| +++ runtime/vm/intermediate_language_arm.cc (working copy) |
| @@ -447,18 +447,6 @@ |
| } |
| -static void EmitBranchOnValue(FlowGraphCompiler* compiler, |
| - TargetEntryInstr* true_successor, |
| - TargetEntryInstr* false_successor, |
| - bool value) { |
| - if (value && !compiler->CanFallThroughTo(true_successor)) { |
| - __ b(compiler->GetJumpLabel(true_successor)); |
| - } else if (!value && !compiler->CanFallThroughTo(false_successor)) { |
| - __ b(compiler->GetJumpLabel(false_successor)); |
| - } |
| -} |
| - |
| - |
| static void EmitBranchOnCondition(FlowGraphCompiler* compiler, |
| TargetEntryInstr* true_successor, |
| TargetEntryInstr* false_successor, |
| @@ -621,7 +609,6 @@ |
| BranchInstr* branch) { |
| ASSERT((kind() == Token::kNE) || (kind() == Token::kEQ)); |
| if (operation_cid() == kSmiCid) { |
| - // Deoptimizes if both arguments not Smi. |
| EmitSmiComparisonOp(compiler, *locs(), kind(), branch); |
| return; |
| } |
| @@ -4447,7 +4434,9 @@ |
| LocationSummary* locs = |
| new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| locs->set_in(0, Location::RegisterOrConstant(left())); |
| - locs->set_in(1, Location::RegisterOrConstant(right())); |
| + locs->set_in(1, locs->in(0).IsConstant() |
|
Kevin Millikin (Google)
2013/11/11 12:09:42
This is cryptic without a comment. Try:
"We rely
Florian Schneider
2013/11/11 12:29:28
Done.
|
| + ? Location::RequiresRegister() |
| + : Location::RegisterOrConstant(right())); |
| locs->set_out(Location::RequiresRegister()); |
| return locs; |
| } |
| @@ -4458,14 +4447,7 @@ |
| ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); |
| Location left = locs()->in(0); |
| Location right = locs()->in(1); |
| - if (left.IsConstant() && right.IsConstant()) { |
| - // TODO(vegorov): should be eliminated earlier by constant propagation. |
| - const bool result = (kind() == Token::kEQ_STRICT) ? |
| - left.constant().raw() == right.constant().raw() : |
| - left.constant().raw() != right.constant().raw(); |
| - __ LoadObject(locs()->out().reg(), Bool::Get(result)); |
| - return; |
| - } |
| + ASSERT(!left.IsConstant() || !right.IsConstant()); |
| if (left.IsConstant()) { |
| compiler->EmitEqualityRegConstCompare(right.reg(), |
| left.constant(), |
| @@ -4495,17 +4477,7 @@ |
| ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); |
| Location left = locs()->in(0); |
| Location right = locs()->in(1); |
| - if (left.IsConstant() && right.IsConstant()) { |
| - // TODO(vegorov): should be eliminated earlier by constant propagation. |
| - const bool result = (kind() == Token::kEQ_STRICT) ? |
| - left.constant().raw() == right.constant().raw() : |
| - left.constant().raw() != right.constant().raw(); |
| - EmitBranchOnValue(compiler, |
| - branch->true_successor(), |
| - branch->false_successor(), |
| - result); |
| - return; |
| - } |
| + ASSERT(!left.IsConstant() || !right.IsConstant()); |
| if (left.IsConstant()) { |
| compiler->EmitEqualityRegConstCompare(right.reg(), |
| left.constant(), |