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

Unified Diff: runtime/lib/mirrors_impl.dart

Issue 23038010: Fix Function.end_token_pos() and implement MethodMirror.source getter (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index 88a89cc5a2f220466eb79773bbcc1d36b80ca401..e2a49f725167e13f9f37e445669a843fbd32cf45 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -1009,6 +1009,14 @@ class _LocalMethodMirrorImpl extends _LocalDeclarationMirrorImpl
final bool isRedirectingConstructor;
final bool isFactoryConstructor;
+ String _source = null;
+ String get source {
+ if (_source == null) {
+ _source = _MethodMirror_source(_reflectee);
siva 2013/08/21 22:21:05 assert(_source != null);
Michael Lippautz (Google) 2013/08/21 23:19:20 Done.
+ }
+ return _source;
+ }
+
String toString() => "MethodMirror on '${_n(simpleName)}'";
static dynamic _MethodMirror_owner(reflectee)
@@ -1019,6 +1027,9 @@ class _LocalMethodMirrorImpl extends _LocalDeclarationMirrorImpl
List<ParameterMirror> _MethodMirror_parameters(reflectee)
native "MethodMirror_parameters";
+
+ static String _MethodMirror_source(reflectee)
+ native "MethodMirror_source";
}
class _LocalVariableMirrorImpl extends _LocalDeclarationMirrorImpl

Powered by Google App Engine
This is Rietveld 408576698