| 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 dart2js.test.memory_compiler; | 5 library dart2js.test.memory_compiler; |
| 6 | 6 |
| 7 import 'memory_source_file_helper.dart'; | 7 import 'memory_source_file_helper.dart'; |
| 8 | 8 |
| 9 import 'package:compiler/implementation/dart2jslib.dart' | 9 import 'package:compiler/implementation/dart2jslib.dart' |
| 10 show NullSink; | 10 show NullSink; |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 packageRoot, | 163 packageRoot, |
| 164 options, | 164 options, |
| 165 {}); | 165 {}); |
| 166 if (cachedCompiler != null) { | 166 if (cachedCompiler != null) { |
| 167 compiler.coreLibrary = | 167 compiler.coreLibrary = |
| 168 cachedCompiler.libraryLoader.lookupLibrary(Uri.parse('dart:core')); | 168 cachedCompiler.libraryLoader.lookupLibrary(Uri.parse('dart:core')); |
| 169 compiler.types = cachedCompiler.types.copy(compiler); | 169 compiler.types = cachedCompiler.types.copy(compiler); |
| 170 Map copiedLibraries = {}; | 170 Map copiedLibraries = {}; |
| 171 cachedCompiler.libraryLoader.libraries.forEach((library) { | 171 cachedCompiler.libraryLoader.libraries.forEach((library) { |
| 172 if (library.isPlatformLibrary) { | 172 if (library.isPlatformLibrary) { |
| 173 compiler.libraryLoader.mapLibrary(library); | 173 var libraryLoader = compiler.libraryLoader; |
| 174 libraryLoader.mapLibrary(library); |
| 174 compiler.onLibraryCreated(library); | 175 compiler.onLibraryCreated(library); |
| 175 compiler.onLibraryScanned(library, null); | 176 compiler.onLibraryScanned(library, null); |
| 176 if (library.isPatched) { | 177 if (library.isPatched) { |
| 177 var patchLibrary = library.patch; | 178 var patchLibrary = library.patch; |
| 178 compiler.onLibraryCreated(patchLibrary); | 179 compiler.onLibraryCreated(patchLibrary); |
| 179 compiler.onLibraryScanned(patchLibrary, null); | 180 compiler.onLibraryScanned(patchLibrary, null); |
| 180 } | 181 } |
| 181 copiedLibraries[library.canonicalUri] = library; | 182 copiedLibraries[library.canonicalUri] = library; |
| 182 } | 183 } |
| 183 }); | 184 }); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); | 245 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); |
| 245 | 246 |
| 246 List<Uri> libraries = <Uri>[]; | 247 List<Uri> libraries = <Uri>[]; |
| 247 memorySourceFiles.forEach((String path, _) { | 248 memorySourceFiles.forEach((String path, _) { |
| 248 libraries.add(new Uri(scheme: 'memory', path: path)); | 249 libraries.add(new Uri(scheme: 'memory', path: path)); |
| 249 }); | 250 }); |
| 250 | 251 |
| 251 return analyze(libraries, libraryRoot, packageRoot, | 252 return analyze(libraries, libraryRoot, packageRoot, |
| 252 provider, handler, options); | 253 provider, handler, options); |
| 253 } | 254 } |
| OLD | NEW |