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 // VM-specific implementation of the dart:mirrors library. | 5 // VM-specific implementation of the dart:mirrors library. |
6 | 6 |
7 var _dirty = false; | 7 var _dirty = false; |
8 final _emptyList = new UnmodifiableListView([]); | 8 final _emptyList = new UnmodifiableListView([]); |
9 | 9 |
10 class _InternalMirrorError { | 10 class _InternalMirrorError { |
11 final String _msg; | 11 final String _msg; |
12 const _InternalMirrorError(String this._msg); | 12 const _InternalMirrorError(this._msg); |
13 String toString() => _msg; | 13 String toString() => _msg; |
14 } | 14 } |
15 | 15 |
16 String _n(Symbol symbol) => internal.Symbol.getName(symbol); | 16 String _n(Symbol symbol) => internal.Symbol.getName(symbol); |
17 | 17 |
18 Symbol _s(String name) { | 18 Symbol _s(String name) { |
19 if (name == null) return null; | 19 if (name == null) return null; |
20 return new internal.Symbol.unvalidated(name); | 20 return new internal.Symbol.unvalidated(name); |
21 } | 21 } |
22 | 22 |
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 } | 1679 } |
1680 | 1680 |
1681 static Type _instantiateType(Type key, List<Type> typeArguments) { | 1681 static Type _instantiateType(Type key, List<Type> typeArguments) { |
1682 if (typeArguments.isEmpty) { | 1682 if (typeArguments.isEmpty) { |
1683 throw new ArgumentError.value( | 1683 throw new ArgumentError.value( |
1684 typeArguments, 'typeArguments', 'Type arguments list cannot be empty.'); | 1684 typeArguments, 'typeArguments', 'Type arguments list cannot be empty.'); |
1685 } | 1685 } |
1686 return instantiateGenericType(key, typeArguments.toList(growable: false)); | 1686 return instantiateGenericType(key, typeArguments.toList(growable: false)); |
1687 } | 1687 } |
1688 } | 1688 } |
OLD | NEW |