| Index: pkg/compiler/lib/src/cps_ir/redundant_join.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/redundant_join.dart b/pkg/compiler/lib/src/cps_ir/redundant_join.dart
|
| index 4acb2ef438b834dbe6a7924d8c9a6c895ecd679f..9b0de68e048770528c6db935515d491372028c3a 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/redundant_join.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/redundant_join.dart
|
| @@ -109,12 +109,12 @@ class RedundantJoinEliminator extends RecursiveVisitor implements Pass {
|
| Primitive argument = invoke.arguments[parameterIndex].definition;
|
| if (argument is! Constant) return; // Branching condition is unknown.
|
| Constant constant = argument;
|
| - if (isFalsyConstant(constant.value)) {
|
| - ++falseHits;
|
| - falseCall = invoke;
|
| - } else {
|
| + if (isTruthyConstant(constant.value, strict: branch.isStrictCheck)) {
|
| ++trueHits;
|
| trueCall = invoke;
|
| + } else {
|
| + ++falseHits;
|
| + falseCall = invoke;
|
| }
|
| }
|
|
|
| @@ -182,10 +182,10 @@ class RedundantJoinEliminator extends RecursiveVisitor implements Pass {
|
| Reference reference = branchCont.firstRef;
|
| InvokeContinuation invoke = branchCont.firstRef.parent;
|
| Constant condition = invoke.arguments[parameterIndex].definition;
|
| - if (isFalsyConstant(condition.value)) {
|
| - invoke.continuation.changeTo(falseCont);
|
| - } else {
|
| + if (isTruthyConstant(condition.value, strict: branch.isStrictCheck)) {
|
| invoke.continuation.changeTo(trueCont);
|
| + } else {
|
| + invoke.continuation.changeTo(falseCont);
|
| }
|
| assert(branchCont.firstRef != reference);
|
| }
|
|
|