commit | 919461baddb986b42a18d224c6bc18e5ebf66528 | [log] [tgz] |
---|---|---|
author | Mayank Patke <fishythefish@google.com> | Wed Apr 10 00:28:10 2019 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Wed Apr 10 00:28:10 2019 +0000 |
tree | ab0a41381f29dd42fe476ab74c857de842cc1220 | |
parent | 1bc1e483e0dac6a067f7e3f2555a2151291b35f4 [diff] |
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>
Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
Visit the dartlang.org to learn more about the language, tools, getting started, and more.
Browse pub.dartlang.org for more packages and libraries contributed by the community and the Dart team.
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.