| Index: pkg/compiler/lib/src/js_emitter/native_emitter.dart
|
| diff --git a/pkg/compiler/lib/src/js_emitter/native_emitter.dart b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
|
| index 9f873350492e6acf125516f74c61cb330a94d541..fa590a4c709c20d24e66d19077e17ae77db4eec6 100644
|
| --- a/pkg/compiler/lib/src/js_emitter/native_emitter.dart
|
| +++ b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
|
| @@ -134,9 +134,10 @@ class NativeEmitter {
|
| } else if (extensionPoints.containsKey(cls)) {
|
| needed = true;
|
| }
|
| - if (classElement.isJsInterop) {
|
| + if (backend.isJsInterop(classElement)) {
|
| needed = true; // TODO(jacobr): we don't need all interop classes.
|
| - } else if (cls.isNative && native.nativeTagsForcedNonLeaf(classElement)) {
|
| + } else if (cls.isNative &&
|
| + backend.hasNativeTagsForcedNonLeaf(classElement)) {
|
| needed = true;
|
| nonLeafClasses.add(cls);
|
| }
|
| @@ -155,8 +156,8 @@ class NativeEmitter {
|
|
|
| for (Class cls in classes) {
|
| if (!cls.isNative) continue;
|
| - if (cls.element.isJsInterop) continue;
|
| - List<String> nativeTags = native.nativeTagsOfClass(cls.element);
|
| + if (backend.isJsInterop(cls.element)) continue;
|
| + List<String> nativeTags = backend.getNativeTagsOfClass(cls.element);
|
|
|
| if (nonLeafClasses.contains(cls) ||
|
| extensionPoints.containsKey(cls)) {
|
| @@ -312,7 +313,7 @@ class NativeEmitter {
|
| assert(invariant(member, nativeMethods.contains(member)));
|
| // When calling a JS method, we call it with the native name, and only the
|
| // arguments up until the last one provided.
|
| - target = member.fixedBackendName;
|
| + target = backend.getFixedBackendName(member);
|
|
|
| if (isInterceptedMethod) {
|
| receiver = argumentsBuffer[0];
|
| @@ -323,7 +324,7 @@ class NativeEmitter {
|
| assert(invariant(member, member.isStatic));
|
| arguments = argumentsBuffer.sublist(0,
|
| indexOfLastOptionalArgumentInParameters + 1);
|
| - if (member.isJsInterop) {
|
| + if (backend.isJsInterop(member)) {
|
| // fixedBackendPath is allowed to have the form foo.bar.baz for
|
| // interop. This template is uncached to avoid possibly running out of
|
| // memory when Dart2Js is run in server mode. In reality the risk of
|
| @@ -359,7 +360,7 @@ class NativeEmitter {
|
| // is whether the receiver can be native, not the type of the test.
|
| if (element == null || !element.isClass) return false;
|
| ClassElement cls = element;
|
| - if (Elements.isNativeOrExtendsNative(cls)) return true;
|
| + if (backend.isNativeOrExtendsNative(cls)) return true;
|
| return isSupertypeOfNativeClass(element);
|
| }
|
| }
|
|
|