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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/elements.dart

Issue 15026006: Support for extending native classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/elements/elements.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
index 235a943ba058c3443042abb3d489e89d4f1984c1..65a4c568b6655db779ddb7363d558d72e76aed90 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
@@ -332,6 +332,12 @@ class Elements {
&& (identical(element.kind, ElementKind.FUNCTION));
}
+ static bool isNativeOrExtendsNative(ClassElement element) {
+ if (element == null) return false;
+ if (element.isNative()) return true;
+ return isNativeOrExtendsNative(element.superclass);
+ }
+
static bool isInstanceSend(Send send, TreeElements elements) {
Element element = elements[send];
if (element == null) return !isClosureSend(send, element);
@@ -358,7 +364,7 @@ class Elements {
return new SourceString(reconstructConstructorName(element));
}
}
-
+
// TODO(johnniwinther): Remove this method.
static String reconstructConstructorName(Element element) {
String className = element.getEnclosingClass().name.slowToString();
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698