mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 08:41:10 +00:00
[rti] Codegen improvements in isSubtype.
Change-Id: If68a3c150b33e2029d7e6538cb3efff23bb9809f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333701 Commit-Queue: Mayank Patke <fishythefish@google.com> Reviewed-by: Stephen Adams <sra@google.com>
This commit is contained in:
parent
1405695675
commit
7a343d0cc1
|
@ -3262,10 +3262,12 @@ bool isSubtype(Object? universe, Rti s, Rti t) {
|
|||
result = _isSubtypeUncached(universe, s, t);
|
||||
_Utils.mapSet(sCache, t, result);
|
||||
}
|
||||
if (result == _subtypeResultFalse) return false;
|
||||
if (result == _subtypeResultTrue) return true;
|
||||
_onExtraNullSafetyError(
|
||||
_InconsistentSubtypingError._forTypes(s, t), StackTrace.current);
|
||||
if (_subtypeResultFalse == result) return false;
|
||||
if (_subtypeResultTrue == result) return true;
|
||||
if (JS_GET_FLAG('EXTRA_NULL_SAFETY_CHECKS')) {
|
||||
_onExtraNullSafetyError(
|
||||
_InconsistentSubtypingError._forTypes(s, t), StackTrace.current);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue