3064 {
3065
3066
3067 if (!
dst_type()->BindsToConstant())
return this;
3068 const auto& abs_type = AbstractType::Cast(
dst_type()->BoundConstant());
3069
3070 if (abs_type.IsTopTypeForSubtyping() ||
3071 (FLAG_eliminate_type_checks &&
3072 value()->
Type()->IsAssignableTo(abs_type))) {
3074 }
3075 if (abs_type.IsInstantiated()) {
3076 return this;
3077 }
3078
3079
3080
3081
3082
3083
3084
3085
3087 Zone*
Z = thread->zone();
3088
3089 const TypeArguments* instantiator_type_args = nullptr;
3090 const TypeArguments* function_type_args = nullptr;
3091
3095 ? &TypeArguments::null_type_arguments()
3096 : &TypeArguments::Cast(val);
3097 }
3098
3101 function_type_args =
3103 ? &TypeArguments::null_type_arguments()
3105 }
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115 if (instantiator_type_args == nullptr) {
3116 if (LoadFieldInstr* load_type_args =
3118 if (load_type_args->slot().IsTypeArguments()) {
3119 if (LoadFieldInstr* load_field = load_type_args->instance()
3120 ->definition()
3121 ->OriginalDefinition()
3122 ->AsLoadField()) {
3123 if (load_field->slot().IsDartField() &&
3124 load_field->slot()
3125 .field()
3126 .static_type_exactness_state()
3127 .IsHasExactSuperClass()) {
3130 Z, load_field->slot().field().type()))
3131 .GetInstanceTypeArguments(thread));
3132 }
3133 }
3134 }
3135 }
3136 }
3137
3138 if ((instantiator_type_args != nullptr) && (function_type_args != nullptr)) {
3140 Z, abs_type.InstantiateFrom(*instantiator_type_args,
3142 if (new_dst_type.IsNull()) {
3143
3144 return this;
3145 }
3147
3148
3149
3150
3154
3155 if (new_dst_type.IsTopTypeForSubtyping() ||
3156 (FLAG_eliminate_type_checks &&
3157 value()->
Type()->IsAssignableTo(new_dst_type))) {
3159 }
3160 }
3161 return this;
3162}
static Thread * Current()
const Object & BoundConstant() const
Definition * definition() const
void BindTo(Definition *definition)