| Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| ===================================================================
|
| --- dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (revision 31530)
|
| +++ dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (working copy)
|
| @@ -165,19 +165,13 @@
|
| * know whether a send must be intercepted or not.
|
| */
|
| final Map<String, Set<Element>> interceptedElements;
|
| + // TODO(sra): Not all methods in the Set always require an interceptor. A
|
| + // method may be mixed into a true interceptor *and* a plain class. For the
|
| + // method to work on the interceptor class it needs to use the explicit
|
| + // receiver. This constrains the call on a known plain receiver to pass the
|
| + // explicit receiver. https://code.google.com/p/dart/issues/detail?id=8942
|
|
|
| /**
|
| - * The members of mixin classes that are mixed into an instantiated
|
| - * interceptor class. This is a cached subset of [interceptedElements].
|
| - * These members must be invoked with a correct explicit receiver even when
|
| - * the receiver is not an intercepted class because the function uses the
|
| - * explicit interceptor parameter since it may be called on an intercepted
|
| - * class.
|
| - */
|
| - final Map<String, Set<Element>> interceptedMixinElements =
|
| - new Map<String, Set<Element>>();
|
| -
|
| - /**
|
| * A map of specialized versions of the [getInterceptorMethod].
|
| * Since [getInterceptorMethod] is a hot method at runtime, we're
|
| * always specializing it based on the incoming type. The keys in
|
| @@ -374,29 +368,6 @@
|
| return interceptedElements[selector.name] != null;
|
| }
|
|
|
| - /**
|
| - * Returns `true` iff [selector] matches an element defined in a class mixed
|
| - * into an intercepted class. These selectors are not eligible for the 'dummy
|
| - * explicit receiver' optimization.
|
| - */
|
| - bool isInterceptedMixinSelector(Selector selector) {
|
| - Set<Element> elements = interceptedMixinElements.putIfAbsent(
|
| - selector.name,
|
| - () {
|
| - Set<Element> elements = interceptedElements[selector.name];
|
| - if (elements == null) return null;
|
| - return elements
|
| - .where((element) =>
|
| - classesMixedIntoNativeClasses.contains(
|
| - element.getEnclosingClass()))
|
| - .toSet();
|
| - });
|
| -
|
| - if (elements == null) return false;
|
| - if (elements.isEmpty) return false;
|
| - return elements.any((element) => selector.applies(element, compiler));
|
| - }
|
| -
|
| final Map<String, Set<ClassElement>> interceptedClassesCache =
|
| new Map<String, Set<ClassElement>>();
|
|
|
| @@ -1884,8 +1855,6 @@
|
|
|
| void visitInterceptor(InterceptorConstant constant) => copy(constant);
|
|
|
| - void visitDummyReceiver(DummyReceiverConstant constant) => copy(constant);
|
| -
|
| void visitList(ListConstant constant) {
|
| copy(constant.entries);
|
| copy(constant);
|
|
|