| Index: sdk/lib/mirrors/mirrors.dart
|
| diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors.dart
|
| index 981191a0eef3475a423dd6c1778460e221a72e87..86bbce17c4ea15f5325d3993e2994ea01d976f70 100644
|
| --- a/sdk/lib/mirrors/mirrors.dart
|
| +++ b/sdk/lib/mirrors/mirrors.dart
|
| @@ -35,8 +35,16 @@ abstract class MirrorSystem {
|
| * An immutable map from from library names to mirrors for all
|
| * libraries known to this mirror system.
|
| */
|
| - // TODO(ahe): [libraries] should be Map<Uri, LibraryMirror>.
|
| - Map<Symbol, LibraryMirror> get libraries;
|
| + Map<Uri, LibraryMirror> get libraries;
|
| +
|
| + /**
|
| + * Returns an iterable of all libraries in the mirror system whose library
|
| + * name is [libraryName].
|
| + */
|
| + Iterable<LibraryMirror> findLibrary(Symbol libraryName) {
|
| + return libraries.values.where(
|
| + (library) => library.simpleName == libraryName);
|
| + }
|
|
|
| /**
|
| * A mirror on the isolate associated with this [MirrorSystem].
|
|
|