| Index: pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| index f27b054dbc55a72c28694d686b55caf71384d840..d1a8fe57d7468f91618b96176a74060aa14b043c 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| @@ -2,7 +2,7 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -import 'optimizers.dart' show Pass, ParentVisitor;
|
| +import 'optimizers.dart';
|
|
|
| import '../constants/constant_system.dart';
|
| import '../resolution/operators.dart';
|
| @@ -443,22 +443,13 @@ class ConstantPropagationLattice {
|
| }
|
| }
|
|
|
| - bool isEmptyString(ConstantValue value) {
|
| - return value is StringConstantValue && value.primitiveValue.isEmpty;
|
| - }
|
| -
|
| /// Returns whether [value] is one of the falsy values: false, 0, -0, NaN,
|
| /// the empty string, or null.
|
| AbstractBool boolify(AbstractValue value) {
|
| if (value.isNothing) return AbstractBool.Nothing;
|
| if (value.isConstant) {
|
| ConstantValue constantValue = value.constant;
|
| - if (constantValue.isFalse ||
|
| - constantValue.isNull ||
|
| - constantValue.isZero ||
|
| - constantValue.isMinusZero ||
|
| - constantValue.isNaN ||
|
| - isEmptyString(constantValue)) {
|
| + if (isFalsyConstant(constantValue)) {
|
| return AbstractBool.False;
|
| } else {
|
| return AbstractBool.True;
|
|
|