| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 trydart.caching_compiler; | 5 library trydart.caching_compiler; |
| 6 | 6 |
| 7 import 'dart:profiler' show | 7 import 'dart:profiler' show |
| 8 UserTag; | 8 UserTag; |
| 9 | 9 |
| 10 import 'package:compiler/compiler.dart' show | 10 import 'package:compiler/compiler.dart' show |
| 11 CompilerInputProvider, | 11 CompilerInputProvider, |
| 12 CompilerOutputProvider, | 12 CompilerOutputProvider, |
| 13 Diagnostic, | 13 Diagnostic, |
| 14 DiagnosticHandler; | 14 DiagnosticHandler; |
| 15 | 15 |
| 16 import 'package:compiler/implementation/apiimpl.dart' show | 16 import 'package:compiler/implementation/apiimpl.dart' show |
| 17 Compiler; | 17 Compiler; |
| 18 | 18 |
| 19 import 'package:compiler/implementation/dart2jslib.dart' show | 19 import 'package:compiler/implementation/dart2jslib.dart' show |
| 20 LibraryLoaderTask, // TODO(ahe): Remove this import. | 20 LibraryLoaderTask, // TODO(ahe): Remove this import. |
| 21 NullSink; | 21 NullSink; |
| 22 | 22 |
| 23 import 'package:compiler/implementation/js_backend/js_backend.dart' show | 23 import 'package:compiler/implementation/js_backend/js_backend.dart' show |
| 24 JavaScriptBackend; | 24 JavaScriptBackend; |
| 25 | 25 |
| 26 import 'package:compiler/implementation/elements/elements.dart' show | 26 import 'package:compiler/implementation/elements/elements.dart' show |
| 27 LibraryElement; | 27 LibraryElement; |
| 28 | 28 |
| 29 import 'package:compiler/implementation/native_handler.dart' as native; | |
| 30 | |
| 31 void clearLibraryLoader(LibraryLoaderTask libraryLoader) { | 29 void clearLibraryLoader(LibraryLoaderTask libraryLoader) { |
| 32 // TODO(ahe): Move this method to [LibraryLoader]. | 30 // TODO(ahe): Move this method to [LibraryLoader]. |
| 33 libraryLoader | 31 libraryLoader |
| 34 ..libraryResourceUriMap.clear() | 32 ..libraryResourceUriMap.clear() |
| 35 ..libraryNames.clear(); | 33 ..libraryNames.clear(); |
| 36 } | 34 } |
| 37 | 35 |
| 38 void reuseLibrary( | 36 void reuseLibrary( |
| 39 LibraryLoaderTask libraryLoader, | 37 LibraryLoaderTask libraryLoader, |
| 40 LibraryElement library) { | 38 LibraryElement library) { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 if (library.isPlatformLibrary || | 170 if (library.isPlatformLibrary || |
| 173 (packagesAreImmutable && library.isPackageLibrary)) { | 171 (packagesAreImmutable && library.isPackageLibrary)) { |
| 174 compiler.libraries[uri] = library; | 172 compiler.libraries[uri] = library; |
| 175 reuseLibrary(compiler.libraryLoader, library); | 173 reuseLibrary(compiler.libraryLoader, library); |
| 176 } | 174 } |
| 177 }); | 175 }); |
| 178 } | 176 } |
| 179 oldTag.makeCurrent(); | 177 oldTag.makeCurrent(); |
| 180 return compiler; | 178 return compiler; |
| 181 } | 179 } |
| OLD | NEW |