| Index: runtime/vm/flow_graph_optimizer.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_optimizer.cc (revision 34963)
|
| +++ runtime/vm/flow_graph_optimizer.cc (working copy)
|
| @@ -3718,18 +3718,6 @@
|
| }
|
|
|
|
|
| -static Definition* OriginalDefinition(Definition* defn) {
|
| - while (defn->IsRedefinition() || defn->IsAssertAssignable()) {
|
| - if (defn->IsRedefinition()) {
|
| - defn = defn->AsRedefinition()->value()->definition();
|
| - } else {
|
| - defn = defn->AsAssertAssignable()->value()->definition();
|
| - }
|
| - }
|
| - return defn;
|
| -}
|
| -
|
| -
|
| // Returns true if checking against this type is a direct class id comparison.
|
| static bool TypeCheckAsClassEquality(const AbstractType& type) {
|
| ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
|
| @@ -3768,7 +3756,7 @@
|
| const AbstractType& type =
|
| AbstractType::Cast(call->ArgumentAt(3)->AsConstant()->value());
|
| const bool negate = Bool::Cast(
|
| - OriginalDefinition(call->ArgumentAt(4))->AsConstant()->value()).value();
|
| + call->ArgumentAt(4)->OriginalDefinition()->AsConstant()->value()).value();
|
| const ICData& unary_checks =
|
| ICData::ZoneHandle(call->ic_data()->AsUnaryClassChecks());
|
| if (unary_checks.NumberOfChecks() <= FLAG_max_polymorphic_checks) {
|
| @@ -5175,7 +5163,7 @@
|
| case Instruction::kLoadField: {
|
| LoadFieldInstr* load_field = instr->AsLoadField();
|
| representation_ = load_field->representation();
|
| - instance_ = OriginalDefinition(load_field->instance()->definition());
|
| + instance_ = load_field->instance()->definition()->OriginalDefinition();
|
| if (load_field->field() != NULL) {
|
| kind_ = kField;
|
| field_ = load_field->field();
|
| @@ -5192,7 +5180,7 @@
|
| instr->AsStoreInstanceField();
|
| representation_ = store->RequiredInputRepresentation(
|
| StoreInstanceFieldInstr::kValuePos);
|
| - instance_ = OriginalDefinition(store->instance()->definition());
|
| + instance_ = store->instance()->definition()->OriginalDefinition();
|
| if (!store->field().IsNull()) {
|
| kind_ = kField;
|
| field_ = &store->field();
|
| @@ -5221,7 +5209,7 @@
|
| LoadIndexedInstr* load_indexed = instr->AsLoadIndexed();
|
| kind_ = kIndexed;
|
| representation_ = load_indexed->representation();
|
| - instance_ = OriginalDefinition(load_indexed->array()->definition());
|
| + instance_ = load_indexed->array()->definition()->OriginalDefinition();
|
| index_ = load_indexed->index()->definition();
|
| *is_load = true;
|
| break;
|
| @@ -5232,7 +5220,7 @@
|
| kind_ = kIndexed;
|
| representation_ = store_indexed->
|
| RequiredInputRepresentation(StoreIndexedInstr::kValuePos);
|
| - instance_ = OriginalDefinition(store_indexed->array()->definition());
|
| + instance_ = store_indexed->array()->definition()->OriginalDefinition();
|
| index_ = store_indexed->index()->definition();
|
| break;
|
| }
|
| @@ -5270,7 +5258,7 @@
|
|
|
| void set_instance(Definition* def) {
|
| ASSERT((kind_ == kField) || (kind_ == kVMField) || (kind_ == kIndexed));
|
| - instance_ = OriginalDefinition(def);
|
| + instance_ = def->OriginalDefinition();
|
| }
|
|
|
| const Field& field() const {
|
|
|