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

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: Rebase 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
« 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
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index ea63f9079e4d381b0ac2b2965447296bc1a3cce4..498e4698bac865b42ea7282e64a763b3a064d0e4 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -1016,6 +1016,15 @@ class _LocalMethodMirrorImpl extends _LocalDeclarationMirrorImpl
return _constructorName;
}
+ String _source = null;
+ String get source {
+ if (_source == null) {
+ _source = _MethodMirror_source(_reflectee);
+ assert(_source != null);
+ }
+ return _source;
+ }
+
String toString() => "MethodMirror on '${_n(simpleName)}'";
static dynamic _MethodMirror_owner(reflectee)
@@ -1026,6 +1035,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
« 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