| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 class _InvocationMirror implements Invocation { | 5 class _InvocationMirror implements Invocation { |
| 6 // Constants describing the invocation type. | 6 // Constants describing the invocation type. |
| 7 // _FIELD cannot be generated by regular invocation mirrors. | 7 // _FIELD cannot be generated by regular invocation mirrors. |
| 8 static const int _METHOD = 0; | 8 static const int _METHOD = 0; |
| 9 static const int _GETTER = 1; | 9 static const int _GETTER = 1; |
| 10 static const int _SETTER = 2; | 10 static const int _SETTER = 2; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 List arguments) { | 119 List arguments) { |
| 120 return new _InvocationMirror(functionName, argumentsDescriptor, arguments); | 120 return new _InvocationMirror(functionName, argumentsDescriptor, arguments); |
| 121 } | 121 } |
| 122 | 122 |
| 123 static _invoke(Object receiver, | 123 static _invoke(Object receiver, |
| 124 String functionName, | 124 String functionName, |
| 125 List argumentsDescriptor, | 125 List argumentsDescriptor, |
| 126 List arguments) | 126 List arguments) |
| 127 native "InvocationMirror_invoke"; | 127 native "InvocationMirror_invoke"; |
| 128 | 128 |
| 129 invokeOn(Object receiver) { | 129 _invokeOn(Object receiver) { |
| 130 return _invoke(receiver, _functionName, _argumentsDescriptor, _arguments); | 130 return _invoke(receiver, _functionName, _argumentsDescriptor, _arguments); |
| 131 } | 131 } |
| 132 |
| 133 // TODO(ahe): This is a hack. See _LocalInstanceMirrorImpl.delegate |
| 134 // in mirrors_impl.dart |
| 135 static final _invokeOnClosure = (x, y) => y._invokeOn(x); |
| 132 } | 136 } |
| 133 | |
| OLD | NEW |