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

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: about to land 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/diagnostics/messages.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ea4863b76c9bb8503e40791afa81e8a7db3d0295..60fcb20f2663e0b8141bc271a121e0dfe9e8b9f3 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -306,6 +306,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
@@ -402,6 +404,8 @@ abstract class Element implements Entity {
bool get hasFixedBackendName;
String get fixedBackendName;
+ String get jsInteropName;
+
bool get isAbstract;
Scope buildScope();
@@ -411,6 +415,9 @@ abstract class Element implements Entity {
AnalyzableElement get analyzableElement;
accept(ElementVisitor visitor, arg);
+
+ void setJsInteropName(String name);
+ void markAsJsInterop();
}
class Elements {
@@ -515,7 +522,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);
}
« no previous file with comments | « pkg/compiler/lib/src/diagnostics/messages.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698