| Index: runtime/vm/flow_graph_optimizer.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_optimizer.cc (revision 15685)
|
| +++ runtime/vm/flow_graph_optimizer.cc (working copy)
|
| @@ -3547,15 +3547,23 @@
|
| instr->instantiator()->definition()->constant_value();
|
| if (IsNonConstant(object)) {
|
| SetValue(instr, non_constant_);
|
| - } else if (IsConstant(object)) {
|
| - if (!object.IsNull() &&
|
| + return;
|
| + }
|
| + if (IsConstant(object)) {
|
| + const intptr_t len = instr->type_arguments().Length();
|
| + if (instr->type_arguments().IsRawInstantiatedRaw(len) &&
|
| + object.IsNull()) {
|
| + SetValue(instr, object);
|
| + return;
|
| + }
|
| + if (instr->type_arguments().IsUninstantiatedIdentity() &&
|
| + !object.IsNull() &&
|
| object.IsTypeArguments() &&
|
| - (TypeArguments::Cast(object).Length() ==
|
| - instr->type_arguments().Length())) {
|
| + (TypeArguments::Cast(object).Length() == len)) {
|
| SetValue(instr, object);
|
| - } else {
|
| - SetValue(instr, non_constant_);
|
| + return;
|
| }
|
| + SetValue(instr, non_constant_);
|
| }
|
| }
|
|
|
| @@ -3832,6 +3840,7 @@
|
| // types, etc.
|
| if ((defn != NULL) &&
|
| (defn->constant_value().IsSmi() ||
|
| + defn->constant_value().IsNull() ||
|
| defn->constant_value().IsTypeArguments()) &&
|
| !defn->IsConstant() &&
|
| !defn->IsPushArgument() &&
|
|
|