| Index: runtime/vm/intermediate_language_mips.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_mips.cc (revision 22926)
|
| +++ runtime/vm/intermediate_language_mips.cc (working copy)
|
| @@ -1556,27 +1556,26 @@
|
|
|
| // instantiator_reg is the instantiator type argument vector, i.e. an
|
| // AbstractTypeArguments object (or null).
|
| - if (!type_arguments().IsUninstantiatedIdentity() &&
|
| - !type_arguments().CanShareInstantiatorTypeArguments(
|
| - instantiator_class())) {
|
| - // If the instantiator is null and if the type argument vector
|
| - // instantiated from null becomes a vector of dynamic, then use null as
|
| - // the type arguments.
|
| - Label type_arguments_instantiated;
|
| - const intptr_t len = type_arguments().Length();
|
| - if (type_arguments().IsRawInstantiatedRaw(len)) {
|
| - __ BranchEqual(instantiator_reg,
|
| - reinterpret_cast<intptr_t>(Object::null()),
|
| - &type_arguments_instantiated);
|
| - }
|
| - // Instantiate non-null type arguments.
|
| - // In the non-factory case, we rely on the allocation stub to
|
| - // instantiate the type arguments.
|
| - __ LoadObject(result_reg, type_arguments());
|
| - // result_reg: uninstantiated type arguments.
|
| - __ Bind(&type_arguments_instantiated);
|
| + ASSERT(!type_arguments().IsUninstantiatedIdentity() &&
|
| + !type_arguments().CanShareInstantiatorTypeArguments(
|
| + instantiator_class()));
|
| + // If the instantiator is null and if the type argument vector
|
| + // instantiated from null becomes a vector of dynamic, then use null as
|
| + // the type arguments.
|
| + Label type_arguments_instantiated;
|
| + const intptr_t len = type_arguments().Length();
|
| + if (type_arguments().IsRawInstantiatedRaw(len)) {
|
| + __ BranchEqual(instantiator_reg,
|
| + reinterpret_cast<intptr_t>(Object::null()),
|
| + &type_arguments_instantiated);
|
| }
|
| - ASSERT(instantiator_reg == result_reg);
|
| + // Instantiate non-null type arguments.
|
| + // In the non-factory case, we rely on the allocation stub to
|
| + // instantiate the type arguments.
|
| + __ LoadObject(result_reg, type_arguments());
|
| + // result_reg: uninstantiated type arguments.
|
| + __ Bind(&type_arguments_instantiated);
|
| +
|
| // result_reg: uninstantiated or instantiated type arguments.
|
| }
|
|
|
| @@ -1600,28 +1599,23 @@
|
|
|
| // instantiator_reg is the instantiator AbstractTypeArguments object
|
| // (or null).
|
| - if (type_arguments().IsUninstantiatedIdentity() ||
|
| - type_arguments().CanShareInstantiatorTypeArguments(
|
| - instantiator_class())) {
|
| - // The instantiator was used in VisitExtractConstructorTypeArguments as the
|
| + ASSERT(!type_arguments().IsUninstantiatedIdentity() &&
|
| + !type_arguments().CanShareInstantiatorTypeArguments(
|
| + instantiator_class()));
|
| +
|
| + // If the instantiator is null and if the type argument vector
|
| + // instantiated from null becomes a vector of dynamic, then use null as
|
| + // the type arguments and do not pass the instantiator.
|
| + const intptr_t len = type_arguments().Length();
|
| + if (type_arguments().IsRawInstantiatedRaw(len)) {
|
| + Label instantiator_not_null;
|
| + __ BranchNotEqual(instantiator_reg,
|
| + reinterpret_cast<intptr_t>(Object::null()), &instantiator_not_null);
|
| + // Null was used in VisitExtractConstructorTypeArguments as the
|
| // instantiated type arguments, no proper instantiator needed.
|
| __ LoadImmediate(instantiator_reg,
|
| Smi::RawValue(StubCode::kNoInstantiator));
|
| - } else {
|
| - // If the instantiator is null and if the type argument vector
|
| - // instantiated from null becomes a vector of dynamic, then use null as
|
| - // the type arguments and do not pass the instantiator.
|
| - const intptr_t len = type_arguments().Length();
|
| - if (type_arguments().IsRawInstantiatedRaw(len)) {
|
| - Label instantiator_not_null;
|
| - __ BranchNotEqual(instantiator_reg,
|
| - reinterpret_cast<intptr_t>(Object::null()), &instantiator_not_null);
|
| - // Null was used in VisitExtractConstructorTypeArguments as the
|
| - // instantiated type arguments, no proper instantiator needed.
|
| - __ LoadImmediate(instantiator_reg,
|
| - Smi::RawValue(StubCode::kNoInstantiator));
|
| - __ Bind(&instantiator_not_null);
|
| - }
|
| + __ Bind(&instantiator_not_null);
|
| }
|
| // instantiator_reg: instantiator or kNoInstantiator.
|
| }
|
|
|