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

Unified Diff: pkg/compiler/lib/src/elements/elements.dart

Issue 1318043005: Support user generated custom native JS classes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: ptal 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/elements/elements.dart
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart
index ecf63709dba607ff83a360e8feb364e33559c471..6366113721f20bfa3bf0b4008bfe3ae12836926b 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -312,6 +312,8 @@ abstract class Element implements Entity {
bool get isTopLevel;
bool get isAssignable;
bool get isNative;
+ bool get isJsInterop;
+
bool get isDeferredLoaderGetter;
/// True if the element is declared in a patch library but has no
@@ -408,6 +410,8 @@ abstract class Element implements Entity {
bool get hasFixedBackendName;
String get fixedBackendName;
+ String get jsInteropName;
+
bool get isAbstract;
Scope buildScope();
@@ -417,6 +421,9 @@ abstract class Element implements Entity {
AnalyzableElement get analyzableElement;
accept(ElementVisitor visitor, arg);
+
+ void setJsInteropName(String name);
+ void markAsJsInterop();
}
class Elements {
@@ -521,7 +528,7 @@ class Elements {
static bool isNativeOrExtendsNative(ClassElement element) {
if (element == null) return false;
- if (element.isNative) return true;
+ if (element.isNative || element.isJsInterop) return true;
assert(element.isResolved);
return isNativeOrExtendsNative(element.superclass);
}

Powered by Google App Engine
This is Rietveld 408576698