| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 if (numNamedArguments == 0) { | 82 if (numNamedArguments == 0) { |
| 83 return _namedArguments = const <Symbol, dynamic>{}; | 83 return _namedArguments = const <Symbol, dynamic>{}; |
| 84 } | 84 } |
| 85 _namedArguments = new Map<Symbol, dynamic>(); | 85 _namedArguments = new Map<Symbol, dynamic>(); |
| 86 for (int i = 0; i < numNamedArguments; i++) { | 86 for (int i = 0; i < numNamedArguments; i++) { |
| 87 String arg_name = _argumentsDescriptor[2 + 2*i]; | 87 String arg_name = _argumentsDescriptor[2 + 2*i]; |
| 88 var arg_value = _arguments[_argumentsDescriptor[3 + 2*i]]; | 88 var arg_value = _arguments[_argumentsDescriptor[3 + 2*i]]; |
| 89 _namedArguments[new internal.Symbol.unvalidated(arg_name)] = | 89 _namedArguments[new internal.Symbol.unvalidated(arg_name)] = |
| 90 arg_value; | 90 arg_value; |
| 91 } | 91 } |
| 92 _namedArguments = new Map.unmodifiable(_namedArguments); |
| 92 } | 93 } |
| 93 return _namedArguments; | 94 return _namedArguments; |
| 94 } | 95 } |
| 95 | 96 |
| 96 bool get isMethod { | 97 bool get isMethod { |
| 97 if (_type == null) { | 98 if (_type == null) { |
| 98 _setMemberNameAndType(); | 99 _setMemberNameAndType(); |
| 99 } | 100 } |
| 100 return (_type & _TYPE_MASK) == _METHOD; | 101 return (_type & _TYPE_MASK) == _METHOD; |
| 101 } | 102 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 129 static _allocateInvocationMirror(String functionName, | 130 static _allocateInvocationMirror(String functionName, |
| 130 List argumentsDescriptor, | 131 List argumentsDescriptor, |
| 131 List arguments, | 132 List arguments, |
| 132 bool isSuperInvocation) { | 133 bool isSuperInvocation) { |
| 133 return new _InvocationMirror(functionName, | 134 return new _InvocationMirror(functionName, |
| 134 argumentsDescriptor, | 135 argumentsDescriptor, |
| 135 arguments, | 136 arguments, |
| 136 isSuperInvocation); | 137 isSuperInvocation); |
| 137 } | 138 } |
| 138 } | 139 } |
| OLD | NEW |