Chromium Code Reviews| Index: sdk/lib/_internal/lib/mirror_helper.dart |
| diff --git a/sdk/lib/_internal/lib/mirror_helper.dart b/sdk/lib/_internal/lib/mirror_helper.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5136b30c7f97442c61ab36fde516f6d70c0c8a1b |
| --- /dev/null |
| +++ b/sdk/lib/_internal/lib/mirror_helper.dart |
| @@ -0,0 +1,19 @@ |
| +// 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. |
| + |
|
ahe
2013/08/19 15:34:06
Document this library.
zarah
2013/08/20 14:08:17
Done.
|
| +library _mirror_helper; |
| + |
| +import 'dart:mirrors'; |
| + |
| +/// The compiler will replace this variable with a map containing all the |
| +/// renames made in dart2dart. |
| +const Map _SYMBOLS = null; |
|
ahe
2013/08/19 15:34:06
Add empty line here.
zarah
2013/08/20 14:08:17
Done.
|
| +String helperGetName(Symbol sym) { |
|
ahe
2013/08/19 15:34:06
Please document this method. In particular that it
zarah
2013/08/20 14:08:17
Done.
|
| + var name = MirrorSystem.getName(sym); |
| + if (_SYMBOLS.containsKey(name)) { |
| + return _SYMBOLS[name]; |
| + } else { |
| + return name; |
| + } |
| +} |