OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:compiler/compiler.dart' show | 9 import 'package:compiler/compiler.dart' show |
10 DiagnosticHandler; | 10 DiagnosticHandler; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 } | 174 } |
175 copiedLibraries[library.canonicalUri] = library; | 175 copiedLibraries[library.canonicalUri] = library; |
176 } | 176 } |
177 }); | 177 }); |
178 // TODO(johnniwinther): Assert that no libraries are loaded lazily from | 178 // TODO(johnniwinther): Assert that no libraries are loaded lazily from |
179 // this call. | 179 // this call. |
180 compiler.onLibrariesLoaded(new MemoryLoadedLibraries(copiedLibraries)); | 180 compiler.onLibrariesLoaded(new MemoryLoadedLibraries(copiedLibraries)); |
181 | 181 |
182 compiler.backend.constantCompilerTask.copyConstantValues( | 182 compiler.backend.constantCompilerTask.copyConstantValues( |
183 cachedCompiler.backend.constantCompilerTask); | 183 cachedCompiler.backend.constantCompilerTask); |
184 compiler.symbolConstructor = cachedCompiler.symbolConstructor; | |
185 compiler.mirrorSystemClass = cachedCompiler.mirrorSystemClass; | 184 compiler.mirrorSystemClass = cachedCompiler.mirrorSystemClass; |
186 compiler.mirrorsUsedClass = cachedCompiler.mirrorsUsedClass; | 185 compiler.mirrorsUsedClass = cachedCompiler.mirrorsUsedClass; |
187 compiler.mirrorSystemGetNameFunction = | 186 compiler.mirrorSystemGetNameFunction = |
188 cachedCompiler.mirrorSystemGetNameFunction; | 187 cachedCompiler.mirrorSystemGetNameFunction; |
189 compiler.symbolImplementationClass = | |
190 cachedCompiler.symbolImplementationClass; | |
191 compiler.symbolValidatedConstructor = | |
192 cachedCompiler.symbolValidatedConstructor; | |
193 compiler.mirrorsUsedConstructor = cachedCompiler.mirrorsUsedConstructor; | 188 compiler.mirrorsUsedConstructor = cachedCompiler.mirrorsUsedConstructor; |
194 compiler.deferredLibraryClass = cachedCompiler.deferredLibraryClass; | 189 compiler.deferredLibraryClass = cachedCompiler.deferredLibraryClass; |
195 | 190 |
196 Iterable cachedTreeElements = | 191 Iterable cachedTreeElements = |
197 cachedCompiler.enqueuer.resolution.processedElements; | 192 cachedCompiler.enqueuer.resolution.processedElements; |
198 cachedTreeElements.forEach((element) { | 193 cachedTreeElements.forEach((element) { |
199 if (element.library.isPlatformLibrary) { | 194 if (element.library.isPlatformLibrary) { |
200 compiler.enqueuer.resolution.registerProcessedElement(element); | 195 compiler.enqueuer.resolution.registerProcessedElement(element); |
201 } | 196 } |
202 }); | 197 }); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); | 272 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); |
278 | 273 |
279 List<Uri> libraries = <Uri>[]; | 274 List<Uri> libraries = <Uri>[]; |
280 memorySourceFiles.forEach((String path, _) { | 275 memorySourceFiles.forEach((String path, _) { |
281 libraries.add(new Uri(scheme: 'memory', path: path)); | 276 libraries.add(new Uri(scheme: 'memory', path: path)); |
282 }); | 277 }); |
283 | 278 |
284 return analyze(libraries, libraryRoot, packageRoot, | 279 return analyze(libraries, libraryRoot, packageRoot, |
285 provider, handler, options); | 280 provider, handler, options); |
286 } | 281 } |
OLD | NEW |