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

Unified Diff: runtime/lib/mirrors_impl.dart

Issue 22625003: Make ClosureMirror handle instances of user-defined classes that implement call. (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 5fb76c7c6bf92029ba1a117eb97ee0ec31daaa6c..0e3ad113d660118b75d8721e715556612125629c 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -610,6 +610,14 @@ class _LocalFunctionTypeMirrorImpl extends _LocalClassMirrorImpl
return _simpleName;
}
+ MethodMirror _callMethod;
+ MethodMirror get callMethod {
+ if (_callMethod==null) {
siva 2013/08/07 23:06:41 missing spaces: if (_callMethod == null) {
+ _callMethod = this._FunctionTypeMirror_call_method(_reflectee);
+ }
+ return _callMethod;
+ }
+
TypeMirror _returnType = null;
TypeMirror get returnType {
if (_returnType == null) {
@@ -632,6 +640,9 @@ class _LocalFunctionTypeMirrorImpl extends _LocalClassMirrorImpl
String toString() => "FunctionTypeMirror on '${_n(simpleName)}'";
+ MethodMirror _FunctionTypeMirror_call_method(reflectee)
+ native "FunctionTypeMirror_call_method";
+
static TypeMirror _FunctionTypeMirror_return_type(reflectee)
native "FunctionTypeMirror_return_type";

Powered by Google App Engine
This is Rietveld 408576698