Chromium Code Reviews| Index: site/try/src/caching_compiler.dart |
| diff --git a/site/try/src/caching_compiler.dart b/site/try/src/caching_compiler.dart |
| index 30c1c3d106e1ef41bca52b0474851ca12936ba75..f8703ff4ff8d49447edf03697090a3ce1bf3041e 100644 |
| --- a/site/try/src/caching_compiler.dart |
| +++ b/site/try/src/caching_compiler.dart |
| @@ -17,7 +17,6 @@ import 'package:compiler/implementation/apiimpl.dart' show |
| Compiler; |
| import 'package:compiler/implementation/dart2jslib.dart' show |
| - LibraryLoaderTask, // TODO(ahe): Remove this import. |
|
ahe
2014/06/24 09:49:20
Changes in this file, LGTM!
|
| NullSink; |
| import 'package:compiler/implementation/js_backend/js_backend.dart' show |
| @@ -26,24 +25,6 @@ import 'package:compiler/implementation/js_backend/js_backend.dart' show |
| import 'package:compiler/implementation/elements/elements.dart' show |
| LibraryElement; |
| -void clearLibraryLoader(LibraryLoaderTask libraryLoader) { |
| - // TODO(ahe): Move this method to [LibraryLoader]. |
| - libraryLoader |
| - ..libraryResourceUriMap.clear() |
| - ..libraryNames.clear(); |
| -} |
| - |
| -void reuseLibrary( |
| - LibraryLoaderTask libraryLoader, |
| - LibraryElement library) { |
| - // TODO(ahe): Move this method to [LibraryLoader]. |
| - String name = library.getLibraryOrScriptName(); |
| - Uri resourceUri = library.entryCompilationUnit.script.resourceUri; |
| - libraryLoader |
| - ..libraryResourceUriMap[resourceUri] = library |
| - ..libraryNames[name] = library; |
| -} |
| - |
| Compiler reuseCompiler( |
| {DiagnosticHandler diagnosticHandler, |
| CompilerInputProvider inputProvider, |
| @@ -166,12 +147,12 @@ Compiler reuseCompiler( |
| Map libraries = new Map.from(compiler.libraries); |
| compiler.libraries.clear(); |
| - clearLibraryLoader(compiler.libraryLoader); |
| + compiler.libraryLoader.reset(); |
| libraries.forEach((String uri, LibraryElement library) { |
| if (library.isPlatformLibrary || |
| (packagesAreImmutable && library.isPackageLibrary)) { |
| compiler.libraries[uri] = library; |
| - reuseLibrary(compiler.libraryLoader, library); |
| + compiler.libraryLoader.reuseLibrary(library); |
| } |
| }); |
| } |