| Index: pkg/compiler/lib/src/ssa/optimize.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
|
| index 6ff4e783c2628f33e7a24e2fe26721b75945ba10..e8c546a42b03ff4ec80de283618a7b05b856c8df 100644
|
| --- a/pkg/compiler/lib/src/ssa/optimize.dart
|
| +++ b/pkg/compiler/lib/src/ssa/optimize.dart
|
| @@ -952,7 +952,9 @@ class SsaInstructionSimplifier extends HBaseVisitor
|
|
|
| HInstruction visitInvokeStatic(HInvokeStatic node) {
|
| propagateConstantValueToUses(node);
|
| - if (node.element == backend.helpers.checkConcurrentModificationError) {
|
| + Element element = node.element;
|
| +
|
| + if (element == backend.helpers.checkConcurrentModificationError) {
|
| if (node.inputs.length == 2) {
|
| HInstruction firstArgument = node.inputs[0];
|
| if (firstArgument is HConstant) {
|
| @@ -960,6 +962,21 @@ class SsaInstructionSimplifier extends HBaseVisitor
|
| if (constant.constant.isTrue) return constant;
|
| }
|
| }
|
| + } else if (element == backend.helpers.checkInt) {
|
| + if (node.inputs.length == 1) {
|
| + HInstruction argument = node.inputs[0];
|
| + if (argument.isInteger(compiler)) return argument;
|
| + }
|
| + } else if (element == backend.helpers.checkNum) {
|
| + if (node.inputs.length == 1) {
|
| + HInstruction argument = node.inputs[0];
|
| + if (argument.isNumber(compiler)) return argument;
|
| + }
|
| + } else if (element == backend.helpers.checkString) {
|
| + if (node.inputs.length == 1) {
|
| + HInstruction argument = node.inputs[0];
|
| + if (argument.isString(compiler)) return argument;
|
| + }
|
| }
|
| return node;
|
| }
|
|
|