mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:17:55 +00:00
[dart2js] Avoid discarding type tests during SSA with
--experiment-null-safety-checks Change-Id: If3e2465103494d4772b1f8b71e7c57ae83b3e036 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332371 Commit-Queue: Mayank Patke <fishythefish@google.com> Reviewed-by: Nate Biggs <natebiggs@google.com>
This commit is contained in:
parent
9615958211
commit
b034a909a6
|
@ -4343,6 +4343,10 @@ AbstractBool _typeTest(
|
|||
JClosedWorld closedWorld,
|
||||
CompilerOptions options,
|
||||
{required bool isCast}) {
|
||||
// The null safety mode may affect the result of a type test, so defer to
|
||||
// runtime.
|
||||
if (options.experimentNullSafetyChecks) return AbstractBool.Maybe;
|
||||
|
||||
JCommonElements commonElements = closedWorld.commonElements;
|
||||
DartTypes dartTypes = closedWorld.dartTypes;
|
||||
AbstractValueDomain abstractValueDomain = closedWorld.abstractValueDomain;
|
||||
|
|
Loading…
Reference in a new issue