logical or expressions are not always optimal. #17027
Labels
area-web
Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
dart2js-optimization
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
web-dart2js
After a fix to issue #16996 some logical or expressions are not optimal anymore.
See
tests/compiler/dart2js/logical_expression_test.darttest moved here.This happens when the first part of a logical-or is shared between several other logical or expressions:
var cond = foo();
if (cond || bar()) ...
if (cond || gee()) ...
This now generates:
var cond = !foo();
if (!cond || bar()) ...
if (!cond || gee()) ...
The text was updated successfully, but these errors were encountered: