Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart

Issue 1408043002: Move native and js interop properties from the element model to the JS backend (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanup Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index 5e817af18ab25d3fcd9d9254694c032e34e622eb..c26cf58a6252275701e3039169f68437cc5887e2 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -451,9 +451,9 @@ abstract class InferrerEngine<T, V extends TypeSystem>
}
bool isNativeElement(Element element) {
- if (element.isNative) return true;
+ if (compiler.backend.isNative(element)) return true;
return element.isClassMember
- && element.enclosingClass.isNative
+ && compiler.backend.isNative(element.enclosingClass)
&& element.isField;
}
@@ -555,7 +555,7 @@ class SimpleTypeInferrerVisitor<T>
inferrer.setDefaultTypeOfParameter(element, type);
});
- if (analyzedElement.isNative) {
+ if (compiler.backend.isNative(analyzedElement)) {
// Native methods do not have a body, and we currently just say
// they return dynamic.
return types.dynamicType;

Powered by Google App Engine
This is Rietveld 408576698