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

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
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+ }
+
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
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698