| Index: pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
|
| index 3249c313357fdb6f353367c70c68989ffc902d1f..6a5c82d2ed01dd4300f5259e859fdbec90c5a97f 100644
|
| --- a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
|
| +++ b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
|
| @@ -232,17 +232,24 @@ class SsaSimplifyInterceptors extends HBaseVisitor
|
| if (interceptedClasses.contains(helpers.jsNumberClass) &&
|
| !(interceptedClasses.contains(helpers.jsDoubleClass) ||
|
| interceptedClasses.contains(helpers.jsIntClass))) {
|
| + Set<ClassElement> required;
|
| for (HInstruction user in node.usedBy) {
|
| if (user is! HInvoke) continue;
|
| Set<ClassElement> intercepted =
|
| backend.getInterceptedClassesOn(user.selector.name);
|
| if (intercepted.contains(helpers.jsIntClass)) {
|
| - interceptedClasses.add(helpers.jsIntClass);
|
| + required ??= new Set<ClassElement>();
|
| + required.add(helpers.jsIntClass);
|
| }
|
| if (intercepted.contains(helpers.jsDoubleClass)) {
|
| - interceptedClasses.add(helpers.jsDoubleClass);
|
| + required ??= new Set<ClassElement>();
|
| + required.add(helpers.jsDoubleClass);
|
| }
|
| }
|
| + // Don't modify the result of [backend.getInterceptedClassesOn].
|
| + if (required != null) {
|
| + interceptedClasses = interceptedClasses.union(required);
|
| + }
|
| }
|
| } else {
|
| interceptedClasses = new Set<ClassElement>();
|
|
|