| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 log('compilation succeeded'); | 281 log('compilation succeeded'); |
| 282 return true; | 282 return true; |
| 283 } | 283 } |
| 284 | 284 |
| 285 void runCompilerList(List<Uri> uriList) { | 285 void runCompilerList(List<Uri> uriList) { |
| 286 scanBuiltinLibraries(); | 286 scanBuiltinLibraries(); |
| 287 var elementList = <LibraryElement>[]; | 287 var elementList = <LibraryElement>[]; |
| 288 for (var uri in uriList) { | 288 for (var uri in uriList) { |
| 289 elementList.add(libraryLoader.loadLibrary(uri, null, uri)); | 289 elementList.add(libraryLoader.loadLibrary(uri, null, uri)); |
| 290 } | 290 } |
| 291 libraries.forEach((_, library) { | |
| 292 maybeEnableJSHelper(library); | |
| 293 }); | |
| 294 | 291 |
| 295 world.populate(); | 292 world.populate(); |
| 296 | 293 |
| 297 log('Resolving...'); | 294 log('Resolving...'); |
| 298 phase = Compiler.PHASE_RESOLVING; | 295 phase = Compiler.PHASE_RESOLVING; |
| 299 backend.enqueueHelpers(enqueuer.resolution); | 296 backend.enqueueHelpers(enqueuer.resolution); |
| 300 processQueueList(enqueuer.resolution, elementList); | 297 processQueueList(enqueuer.resolution, elementList); |
| 301 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); | 298 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); |
| 302 } | 299 } |
| 303 | 300 |
| (...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1860 return new Future.immediate( | 1857 return new Future.immediate( |
| 1861 new Dart2JsStringConstantMirror.fromString(mirrors, text)); | 1858 new Dart2JsStringConstantMirror.fromString(mirrors, text)); |
| 1862 } else if (fieldName == 'trimmedText') { | 1859 } else if (fieldName == 'trimmedText') { |
| 1863 return new Future.immediate( | 1860 return new Future.immediate( |
| 1864 new Dart2JsStringConstantMirror.fromString(mirrors, trimmedText)); | 1861 new Dart2JsStringConstantMirror.fromString(mirrors, trimmedText)); |
| 1865 } | 1862 } |
| 1866 // TODO(johnniwinther): Which exception/error should be thrown here? | 1863 // TODO(johnniwinther): Which exception/error should be thrown here? |
| 1867 throw new UnsupportedError('InstanceMirror does not have a reflectee'); | 1864 throw new UnsupportedError('InstanceMirror does not have a reflectee'); |
| 1868 } | 1865 } |
| 1869 } | 1866 } |
| OLD | NEW |