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

Unified Diff: pkg/polymer_expressions/lib/src/mirrors.dart

Issue 173003006: Use smoke in polymer and polymer_expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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/polymer_expressions/lib/src/mirrors.dart
diff --git a/pkg/polymer_expressions/lib/src/mirrors.dart b/pkg/polymer_expressions/lib/src/mirrors.dart
deleted file mode 100644
index f46ee6ece767bba2284ea193c9dc2b9f52a2dc50..0000000000000000000000000000000000000000
--- a/pkg/polymer_expressions/lib/src/mirrors.dart
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer_expressions.src.mirrors;
-
-import 'package:observe/observe.dart' show Reflectable, ObservableProperty;
-
-@MirrorsUsed(metaTargets: const [Reflectable, ObservableProperty],
- override: 'polymer_expressions.src.mirrors')
-import 'dart:mirrors';
-
-/**
- * Walks up the class hierarchy to find a method declaration with the given
- * [name].
- *
- * Note that it's not possible to tell if there's an implementation via
- * noSuchMethod().
- */
-Mirror getMemberMirror(ClassMirror classMirror, Symbol name) {
- if (classMirror.declarations.containsKey(name)) {
- return classMirror.declarations[name];
- }
- if (hasSuperclass(classMirror)) {
- var mirror = getMemberMirror(classMirror.superclass, name);
- if (mirror != null) {
- return mirror;
- }
- }
- for (ClassMirror supe in classMirror.superinterfaces) {
- var mirror = getMemberMirror(supe, name);
- if (mirror != null) {
- return mirror;
- }
- }
- return null;
-}
-
-/**
- * Work-around for http://dartbug.com/5794
- */
-bool hasSuperclass(ClassMirror classMirror) {
- var superclass = classMirror.superclass;
- return (superclass != null) &&
- (superclass.qualifiedName != #dart.core.Object);
-}

Powered by Google App Engine
This is Rietveld 408576698