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

Unified Diff: pkg/compiler/lib/src/js_backend/js_interop_analysis.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: Updated cf. comments. 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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/js_backend.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
diff --git a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
index 777a36829bd1f376da78379774af9a7cc7a453ba..e5c9b2543ea77f17e49255888113f95b769cd977 100644
--- a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
@@ -68,10 +68,11 @@ class JsInteropAnalysis {
ConstantValue value = constructedConstant.fields[nameField];
if (value.isString) {
StringConstantValue stringValue = value;
- e.setJsInteropName(stringValue.primitiveValue.slowToString());
+ backend.setJsInteropName(
+ e, stringValue.primitiveValue.slowToString());
} else {
// TODO(jacobr): report a warning if the value is not a String.
- e.setJsInteropName('');
+ backend.setJsInteropName(e, '');
}
enabledJsInterop = true;
return;
@@ -83,7 +84,7 @@ class JsInteropAnalysis {
processJsInteropAnnotation(library);
library.implementation.forEachLocalMember((Element element) {
processJsInteropAnnotation(element);
- if (!element.isClass || !element.isJsInterop) return;
+ if (!element.isClass || !backend.isJsInterop(element)) return;
ClassElement classElement = element;
@@ -101,7 +102,7 @@ class JsInteropAnalysis {
processJsInteropAnnotation(member);
if (!member.isSynthesized &&
- classElement.isJsInterop &&
+ backend.isJsInterop(classElement) &&
member is FunctionElement) {
FunctionElement fn = member;
if (!fn.isExternal && !fn.isAbstract) {
« no previous file with comments | « pkg/compiler/lib/src/js_backend/js_backend.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698