Chromium Code Reviews| Index: runtime/lib/mirrors_impl.dart |
| =================================================================== |
| --- runtime/lib/mirrors_impl.dart (revision 24851) |
| +++ runtime/lib/mirrors_impl.dart (working copy) |
| @@ -829,7 +829,7 @@ |
| class _LocalMethodMirrorImpl extends _LocalMirrorImpl |
| implements MethodMirror { |
| - _LocalMethodMirrorImpl(String simpleName, |
| + _LocalMethodMirrorImpl(this._reflectee, |
| this._owner, |
| this.parameters, |
| this._returnType, |
| @@ -841,11 +841,18 @@ |
| this.isConstConstructor, |
| this.isGenerativeConstructor, |
| this.isRedirectingConstructor, |
| - this.isFactoryConstructor) |
| - : this.simpleName = _s(simpleName); |
| + this.isFactoryConstructor); |
| - final Symbol simpleName; |
| + final _MirrorReference _reflectee; |
| + Symbol _simpleName = null; |
| + Symbol get simpleName { |
| + if (_simpleName == null) { |
| + _simpleName = _s(_MethodMirror_name(_reflectee)); |
| + } |
| + return _simpleName; |
| + } |
|
siva
2013/07/10 00:09:49
I am wondering if this can be added to the base cl
rmacnak
2013/07/10 00:28:58
Not all mirrors have a simpleName. If we go with a
siva
2013/07/10 01:04:19
Ok when you add that class move this into that cla
|
| + |
| Symbol _qualifiedName = null; |
| Symbol get qualifiedName { |
| if (_qualifiedName == null) { |
| @@ -932,6 +939,9 @@ |
| } |
| String toString() => "MethodMirror on '${_n(simpleName)}'"; |
| + |
| + static String _MethodMirror_name(reflectee) |
| + native "MethodMirror_name"; |
| } |
| class _LocalVariableMirrorImpl extends _LocalMirrorImpl |