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 library mirrors_dart2js; | 5 library mirrors_dart2js; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 import 'dart:uri'; | 9 import 'dart:uri'; |
10 | 10 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 {Node node, Token token, HInstruction instruction, | 209 {Node node, Token token, HInstruction instruction, |
210 Element element}) { | 210 Element element}) { |
211 cancel('Internal error: $message', node: node, token: token, | 211 cancel('Internal error: $message', node: node, token: token, |
212 instruction: instruction, element: element); | 212 instruction: instruction, element: element); |
213 } | 213 } |
214 | 214 |
215 void internalErrorOnElement(Element element, String message) { | 215 void internalErrorOnElement(Element element, String message) { |
216 internalError(message, element: element); | 216 internalError(message, element: element); |
217 } | 217 } |
218 | 218 |
219 SourceSpan spanFromNode(Node node, [Uri uri]) { | 219 SourceSpan spanFromSpannable(Node node, [Uri uri]) { |
220 // TODO(johnniwinther): implement this. | 220 // TODO(johnniwinther): implement this. |
221 throw 'unimplemented'; | 221 throw 'unimplemented'; |
222 } | 222 } |
223 | 223 |
224 void reportMessage(SourceSpan span, Diagnostic message, | 224 void reportMessage(SourceSpan span, Diagnostic message, |
225 diagnostics.Diagnostic kind) { | 225 diagnostics.Diagnostic kind) { |
226 // TODO(johnniwinther): implement this. | 226 // TODO(johnniwinther): implement this. |
227 throw 'unimplemented'; | 227 throw 'unimplemented'; |
228 } | 228 } |
229 | 229 |
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1859 return new Future.immediate( | 1859 return new Future.immediate( |
1860 new Dart2JsStringConstantMirror.fromString(mirrors, text)); | 1860 new Dart2JsStringConstantMirror.fromString(mirrors, text)); |
1861 } else if (fieldName == 'trimmedText') { | 1861 } else if (fieldName == 'trimmedText') { |
1862 return new Future.immediate( | 1862 return new Future.immediate( |
1863 new Dart2JsStringConstantMirror.fromString(mirrors, trimmedText)); | 1863 new Dart2JsStringConstantMirror.fromString(mirrors, trimmedText)); |
1864 } | 1864 } |
1865 // TODO(johnniwinther): Which exception/error should be thrown here? | 1865 // TODO(johnniwinther): Which exception/error should be thrown here? |
1866 throw new UnsupportedError('InstanceMirror does not have a reflectee'); | 1866 throw new UnsupportedError('InstanceMirror does not have a reflectee'); |
1867 } | 1867 } |
1868 } | 1868 } |
OLD | NEW |