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

Unified Diff: runtime/lib/mirrors_impl.dart

Issue 18473005: Add a MirrorReference reflectee to MethodMirrors. Name getter now refers to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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: 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

Powered by Google App Engine
This is Rietveld 408576698