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

Unified Diff: dart/lib/compiler/implementation/compiler.dart

Issue 10879006: Create an outline of metadata API in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | dart/lib/compiler/implementation/elements/elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/compiler.dart
diff --git a/dart/lib/compiler/implementation/compiler.dart b/dart/lib/compiler/implementation/compiler.dart
index e17e661538d1e27f260fd11c35ca130b636c82b6..dc9e08e0a4acb4d9b99b1bc54e852c1167c4694b 100644
--- a/dart/lib/compiler/implementation/compiler.dart
+++ b/dart/lib/compiler/implementation/compiler.dart
@@ -440,7 +440,10 @@ class Compiler implements DiagnosticListener {
bool isPatchElement(Element element) {
// TODO(lrn): More checks needed if we introduce metadata for real.
// In that case, it must have the identifier "native" as metadata.
- return !element.metadata.isEmpty();
+ for (Link link = element.metadata; !link.isEmpty(); link = link.tail) {
+ if (link.head is PatchMetadataAnnotation) return true;
+ }
+ return false;
}
Element clonePatch(Element patchElement, Element enclosing) {
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698