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

Unified Diff: lib/src/utils.dart

Issue 1160343003: Revert "fixes #173, ability to use native JS indexers" (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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 | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/domtest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/utils.dart
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index d89e05ac18e48ee26b658c12761ebe32aae836b8..4c7339520c673f724b77c967c1d74164a4615bbe 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -349,7 +349,7 @@ String resourceOutputPath(Uri resourceUri, Uri entryUri) {
///
/// (v) => v.type.name == 'Deprecated' && v.type.element.library.isDartCore
///
-DartObjectImpl findNodeAnnotation(
+DartObjectImpl getAnnotationValue(
AnnotatedNode node, bool test(DartObjectImpl value)) {
for (var metadata in node.metadata) {
ElementAnnotationImpl element = metadata.elementAnnotation;
@@ -364,19 +364,6 @@ DartObjectImpl findNodeAnnotation(
return null;
}
-/// Similar to [findNodeAnnotation] but starts from any element.
-DartObjectImpl findElementAnnotation(
- Element element, bool test(DartObjectImpl value)) {
- for (var metadata in element.metadata) {
- var evalResult = metadata.evaluationResult;
- if (evalResult == null) continue;
-
- var value = evalResult.value;
- if (value != null && test(value)) return value;
- }
- return null;
-}
-
/// Given a constant [value], a [fieldName], and an [expectedType], returns the
/// value of that field.
///
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/domtest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698