Commit 0bb3adb
[dart2js] Remove receiver-not-null strengthening
Adding the inference that, after `x.foo()`, `x` cannot be null used to
make sense, but with sound null safety means this is only applicable
when `x` is `dynamic`.
Removing the `knownType` update logic makes it easier to reason about
type propagation. There are very few regressions for removing this now
(huge app had half a dozen minor regressions, several other apps had
none).
If we decide to add something like this in the future, I think it
should be added as part of SsaTypeConversionInserter, and be extended
to add other post-conditions (e.g. the runtime helper `checkString(s)`
ensures `s` is a String).
Change-Id: I27a7fcbc13873867713c439c062ecf9bd71d644d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/420504
Commit-Queue: Stephen Adams <[email protected]>
Reviewed-by: Mayank Patke <[email protected]>1 parent 1568027 commit 0bb3adb
2 files changed
+1
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4045 | 4045 | | |
4046 | 4046 | | |
4047 | 4047 | | |
4048 | | - | |
| 4048 | + | |
4049 | 4049 | | |
4050 | 4050 | | |
4051 | 4051 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | 444 | | |
479 | 445 | | |
480 | 446 | | |
| |||
0 commit comments