| Index: runtime/vm/code_generator.cc
|
| diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
|
| index 5af05c99d4154258b541ac7228f32655f6656ae5..f5492312d7f8f0c195f6e936bd6fab535cf1a206 100644
|
| --- a/runtime/vm/code_generator.cc
|
| +++ b/runtime/vm/code_generator.cc
|
| @@ -398,17 +398,16 @@ static void UpdateTypeTestCache(
|
| }
|
| const Class& instance_class = Class::Handle(instance.clazz());
|
| Object& instance_class_id_or_function = Object::Handle();
|
| + TypeArguments& instance_type_arguments = TypeArguments::Handle();
|
| if (instance_class.IsClosureClass()) {
|
| instance_class_id_or_function = Closure::Cast(instance).function();
|
| + instance_type_arguments = Closure::Cast(instance).instantiator();
|
| } else {
|
| instance_class_id_or_function = Smi::New(instance_class.id());
|
| + if (instance_class.NumTypeArguments() > 0) {
|
| + instance_type_arguments = instance.GetTypeArguments();
|
| + }
|
| }
|
| - TypeArguments& instance_type_arguments = TypeArguments::Handle();
|
| - if (instance_class.IsClosureClass() ||
|
| - (instance_class.NumTypeArguments() > 0)) {
|
| - instance_type_arguments = instance.GetTypeArguments();
|
| - }
|
| -
|
| const intptr_t len = new_cache.NumberOfChecks();
|
| if (len >= FLAG_max_subtype_cache_entries) {
|
| return;
|
|
|