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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart

Issue 14251021: Move invokeOn to InstanceMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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: dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
index 9627509be72ec5ca22974810f3fd67e4f524aabc..86e10e04a3785f771cbbc34ddc9eca03482bf31e 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
@@ -117,7 +117,7 @@ class JSInvocationMirror implements Invocation {
return map;
}
- invokeOn(Object object) {
+ _invokeOn(Object object) {
var interceptor = getInterceptor(object);
var receiver = object;
var name = _internalName;
@@ -134,6 +134,11 @@ class JSInvocationMirror implements Invocation {
}
return JS("var", "#[#].apply(#, #)", receiver, name, receiver, arguments);
}
+
+ /// This method is called by [InstanceMirror.delegate].
+ static invokeFromMirror(JSInvocationMirror invocation, victim) {
+ return invocation._invokeOn(victim);
+ }
}
class Primitives {

Powered by Google App Engine
This is Rietveld 408576698