Chromium Code Reviews| Index: runtime/vm/kernel_to_il.cc |
| diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc |
| index 2133a130028d3bd2245938b02c716f500df376c5..9745cd3b3f5627d749e97f65a880375603e573af 100644 |
| --- a/runtime/vm/kernel_to_il.cc |
| +++ b/runtime/vm/kernel_to_il.cc |
| @@ -4576,26 +4576,21 @@ void FlowGraphBuilder::VisitConstructorInvocation(ConstructorInvocation* node) { |
| const TypeArguments& type_arguments = T.TranslateInstantiatedTypeArguments( |
| klass, kernel_type_arguments.raw_array(), |
| kernel_type_arguments.length()); |
| - |
| - if (type_arguments.IsNull() || type_arguments.IsInstantiated()) { |
| - instructions += TranslateInstantiatedTypeArguments(type_arguments); |
|
kustermann
2017/01/11 19:16:37
This CL replaces
if () { X } else { Y }
with
|
| + if (!klass.IsGeneric()) { |
| + Type& type = Type::ZoneHandle(Z, T.ReceiverType(klass).raw()); |
| + |
| + // TODO(27590): Can we move this code into [ReceiverType]? |
| + type ^= ClassFinalizer::FinalizeType(*active_class_.klass, type, |
| + ClassFinalizer::kFinalize); |
| + ASSERT(!type.IsMalformedOrMalbounded()); |
| + |
| + TypeArguments& canonicalized_type_arguments = |
| + TypeArguments::ZoneHandle(Z, type.arguments()); |
| + canonicalized_type_arguments = |
| + canonicalized_type_arguments.Canonicalize(); |
| + instructions += Constant(canonicalized_type_arguments); |
| } else { |
| - if (!klass.IsGeneric()) { |
| - Type& type = Type::ZoneHandle(Z, T.ReceiverType(klass).raw()); |
| - |
| - // TODO(27590): Can we move this code into [ReceiverType]? |
| - type ^= ClassFinalizer::FinalizeType(*active_class_.klass, type, |
| - ClassFinalizer::kFinalize); |
| - ASSERT(!type.IsMalformedOrMalbounded()); |
| - |
| - TypeArguments& canonicalized_type_arguments = |
| - TypeArguments::ZoneHandle(Z, type.arguments()); |
| - canonicalized_type_arguments = |
| - canonicalized_type_arguments.Canonicalize(); |
| - instructions += Constant(canonicalized_type_arguments); |
| - } else { |
| - instructions += TranslateInstantiatedTypeArguments(type_arguments); |
| - } |
| + instructions += TranslateInstantiatedTypeArguments(type_arguments); |
| } |
| instructions += PushArgument(); |