@@ -449,8 +449,7 @@ void ClassFinalizer::ResolveRedirectingFactoryTarget(
449
449
return ;
450
450
}
451
451
452
- Isolate* isolate = Isolate::Current ();
453
- if (isolate->error_on_bad_override () && !isolate->strong ()) {
452
+ if (!FLAG_strong && Isolate::Current ()->error_on_bad_override ()) {
454
453
// Verify that the target is compatible with the redirecting factory.
455
454
Error& error = Error::Handle ();
456
455
if (!target.HasCompatibleParametersWith (factory, &error)) {
@@ -564,7 +563,7 @@ void ClassFinalizer::ResolveTypeClass(const Class& cls, const Type& type) {
564
563
(type.signature () != Function::null ()));
565
564
566
565
// In non-strong mode, replace FutureOr<T> type of async library with dynamic.
567
- if (type_class.IsFutureOrClass () && !Isolate::Current ()-> strong () ) {
566
+ if (type_class.IsFutureOrClass () && !FLAG_strong ) {
568
567
Type::Cast (type).set_type_class (Class::Handle (Object::dynamic_class ()));
569
568
type.set_arguments (Object::null_type_arguments ());
570
569
}
@@ -1226,7 +1225,7 @@ RawAbstractType* ClassFinalizer::FinalizeType(const Class& cls,
1226
1225
// malformed.
1227
1226
if ((finalization >= kCanonicalize ) && !type.IsMalformed () &&
1228
1227
!type.IsCanonical () && type.IsType ()) {
1229
- if (!Isolate::Current ()-> strong () ) {
1228
+ if (!FLAG_strong ) {
1230
1229
CheckTypeBounds (cls, type);
1231
1230
}
1232
1231
return type.Canonicalize ();
@@ -1370,7 +1369,7 @@ RawAbstractType* ClassFinalizer::FinalizeType(const Class& cls,
1370
1369
1371
1370
// If we are done finalizing a graph of mutually recursive types, check their
1372
1371
// bounds.
1373
- if (is_root_type && !Isolate::Current ()-> strong () ) {
1372
+ if (is_root_type && !FLAG_strong ) {
1374
1373
for (intptr_t i = pending_types->length () - 1 ; i >= 0 ; i--) {
1375
1374
const AbstractType& type = pending_types->At (i);
1376
1375
if (!type.IsMalformed () && !type.IsCanonical ()) {
@@ -1634,7 +1633,7 @@ void ClassFinalizer::ResolveAndFinalizeMemberTypes(const Class& cls) {
1634
1633
String& other_name = String::Handle (zone);
1635
1634
Class& super_class = Class::Handle (zone);
1636
1635
const intptr_t num_fields = array.Length ();
1637
- const bool track_exactness = isolate-> strong () && isolate->use_field_guards ();
1636
+ const bool track_exactness = FLAG_strong && isolate->use_field_guards ();
1638
1637
for (intptr_t i = 0 ; i < num_fields; i++) {
1639
1638
field ^= array.At (i);
1640
1639
type = field.type ();
@@ -1743,7 +1742,7 @@ void ClassFinalizer::ResolveAndFinalizeMemberTypes(const Class& cls) {
1743
1742
// If we check for bad overrides, collect interfaces, super interfaces, and
1744
1743
// super classes of this class.
1745
1744
GrowableArray<const Class*> interfaces (zone, 4 );
1746
- if (isolate->error_on_bad_override () && !isolate-> strong () ) {
1745
+ if (isolate->error_on_bad_override () && !FLAG_strong ) {
1747
1746
CollectInterfaces (cls, &interfaces);
1748
1747
// Include superclasses in list of interfaces and super interfaces.
1749
1748
super_class = cls.SuperClass ();
@@ -1765,7 +1764,7 @@ void ClassFinalizer::ResolveAndFinalizeMemberTypes(const Class& cls) {
1765
1764
FinalizeSignature (cls, function);
1766
1765
name = function.name ();
1767
1766
// Report signature conflicts only.
1768
- if (isolate->error_on_bad_override () && !isolate-> strong () &&
1767
+ if (isolate->error_on_bad_override () && !FLAG_strong &&
1769
1768
!function.is_static () && !function.IsGenerativeConstructor ()) {
1770
1769
// A constructor cannot override anything.
1771
1770
for (intptr_t i = 0 ; i < interfaces.length (); i++) {
@@ -2787,7 +2786,7 @@ void ClassFinalizer::FinalizeClass(const Class& cls) {
2787
2786
}
2788
2787
// Ensure interfaces are finalized in case we check for bad overrides.
2789
2788
Isolate* isolate = Isolate::Current ();
2790
- if (isolate->error_on_bad_override () && !isolate-> strong () ) {
2789
+ if (isolate->error_on_bad_override () && !FLAG_strong ) {
2791
2790
GrowableArray<const Class*> interfaces (4 );
2792
2791
CollectInterfaces (cls, &interfaces);
2793
2792
for (intptr_t i = 0 ; i < interfaces.length (); i++) {
0 commit comments