dart-sdk/sdk
Mayank Patke 919461badd Ensure boolified SSA nodes are non-null first.
Fixes https://github.com/dart-lang/sdk/issues/34147.

The Dart language specification says we should ensure booleans are
non-null in the following (non-exhaustive) situations:
* (ternary) conditional expressions - this includes the `!` operator
since `!x` is equivalent to `x ? false : true`
* arguments to logical boolean expressions (`||` and `&&`), modulo
short-circuiting
* `if` conditions
* `for` loop conditions
* `while` conditions
* `do`/`while` conditions

With control-flow-collections enabled, this CL will also cover
conditions in `if` elements and `for` elements. Tests for these already
exist in
language_2/control_flow_collections/{if,for}_null_condition_test.dart.

Change-Id: I2ce9a30adeb16a0a68411f358f69aeca08656dab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98780
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-10 00:28:10 +00:00
..
bin [SDK] Adds .exe extension for Windows binaries in dart_sdk.py. 2019-04-08 13:22:53 +00:00
lib Ensure boolified SSA nodes are non-null first. 2019-04-10 00:28:10 +00:00
api_readme.md API doc updates 2018-02-28 01:23:46 +00:00
BUILD.gn [SDK] Adds build targets, wrappers and SDK builds for Dart AOT. 2019-04-05 13:23:44 +00:00