OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library dart._js_mirrors; | 5 library dart._js_mirrors; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
9 import 'dart:_foreign_helper' show JS; | 9 import 'dart:_foreign_helper' show JS; |
10 import 'dart:_internal' as _internal; | 10 import 'dart:_internal' as _internal; |
11 | 11 |
12 // TODO(vsm): This a workaround for: | |
13 // https://github.com/dart-lang/dev_compiler/issues/219 | |
14 import 'dart:js'; | |
15 | |
16 String getName(Symbol symbol) => | 12 String getName(Symbol symbol) => |
17 _internal.Symbol.getName(symbol as _internal.Symbol); | 13 _internal.Symbol.getName(symbol as _internal.Symbol); |
18 | 14 |
19 Symbol getSymbol(name, library) => | 15 Symbol getSymbol(name, library) => |
20 throw new UnimplementedError("MirrorSystem.getSymbol unimplemented"); | 16 throw new UnimplementedError("MirrorSystem.getSymbol unimplemented"); |
21 | 17 |
22 final currentJsMirrorSystem = throw new UnimplementedError( | 18 final currentJsMirrorSystem = throw new UnimplementedError( |
23 "MirrorSystem.currentJsMirrorSystem unimplemented"); | 19 "MirrorSystem.currentJsMirrorSystem unimplemented"); |
24 | 20 |
25 InstanceMirror reflect(reflectee) => new JsInstanceMirror._(reflectee); | 21 InstanceMirror reflect(reflectee) => new JsInstanceMirror._(reflectee); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 for (var i = 0; i < opts.length; ++i) { | 163 for (var i = 0; i < opts.length; ++i) { |
168 var type = opts[i]; | 164 var type = opts[i]; |
169 // TODO(vsm): Recover the param name. | 165 // TODO(vsm): Recover the param name. |
170 var param = new JsParameterMirror._('', type); | 166 var param = new JsParameterMirror._('', type); |
171 params[i + args.length] = param; | 167 params[i + args.length] = param; |
172 } | 168 } |
173 | 169 |
174 return params; | 170 return params; |
175 } | 171 } |
176 } | 172 } |
OLD | NEW |