| Index: runtime/vm/flow_graph_optimizer.cc
|
| diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
|
| index fdd2aebecdf836b729dfded67c0c72a25b3d8134..2750f74e8a228058ab3624e794700772be2cd2f9 100644
|
| --- a/runtime/vm/flow_graph_optimizer.cc
|
| +++ b/runtime/vm/flow_graph_optimizer.cc
|
| @@ -7659,6 +7659,13 @@ void ConstantPropagator::VisitTargetEntry(TargetEntryInstr* block) {
|
| }
|
|
|
|
|
| +void ConstantPropagator::VisitIndirectEntry(IndirectEntryInstr* block) {
|
| + for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
|
| + it.Current()->Accept(this);
|
| + }
|
| +}
|
| +
|
| +
|
| void ConstantPropagator::VisitCatchBlockEntry(CatchBlockEntryInstr* block) {
|
| const GrowableArray<Definition*>& defs = *block->initial_definitions();
|
| for (intptr_t i = 0; i < defs.length(); ++i) {
|
| @@ -7706,6 +7713,13 @@ void ConstantPropagator::VisitGoto(GotoInstr* instr) {
|
| }
|
|
|
|
|
| +void ConstantPropagator::VisitIndirectGoto(IndirectGotoInstr* instr) {
|
| + for (intptr_t i = 0; i < instr->SuccessorCount(); i++) {
|
| + SetReachable(instr->SuccessorAt(i));
|
| + }
|
| +}
|
| +
|
| +
|
| void ConstantPropagator::VisitBranch(BranchInstr* instr) {
|
| instr->comparison()->Accept(this);
|
|
|
| @@ -8114,6 +8128,12 @@ void ConstantPropagator::VisitLoadIndexed(LoadIndexedInstr* instr) {
|
| }
|
|
|
|
|
| +void ConstantPropagator::VisitLoadCodeUnits(LoadCodeUnitsInstr* instr) {
|
| + // TODO(zerny): Implement constant propagation.
|
| + SetValue(instr, non_constant_);
|
| +}
|
| +
|
| +
|
| void ConstantPropagator::VisitStoreIndexed(StoreIndexedInstr* instr) {
|
| SetValue(instr, instr->value()->definition()->constant_value());
|
| }
|
| @@ -8756,6 +8776,12 @@ void ConstantPropagator::VisitMathMinMax(MathMinMaxInstr* instr) {
|
| }
|
|
|
|
|
| +void ConstantPropagator::VisitCaseInsensitiveCompareUC16(
|
| + CaseInsensitiveCompareUC16Instr *instr) {
|
| + SetValue(instr, non_constant_);
|
| +}
|
| +
|
| +
|
| void ConstantPropagator::VisitUnboxDouble(UnboxDoubleInstr* instr) {
|
| const Object& value = instr->value()->definition()->constant_value();
|
| if (IsNonConstant(value)) {
|
| @@ -8905,7 +8931,8 @@ void ConstantPropagator::Analyze() {
|
|
|
| static bool IsEmptyBlock(BlockEntryInstr* block) {
|
| return block->next()->IsGoto() &&
|
| - (!block->IsJoinEntry() || (block->AsJoinEntry()->phis() == NULL));
|
| + (!block->IsJoinEntry() || (block->AsJoinEntry()->phis() == NULL)) &&
|
| + !block->IsIndirectEntry();
|
| }
|
|
|
|
|
|
|