Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(827)

Unified Diff: tests/compiler/dart2js/memory_compiler.dart

Issue 339563002: Remove scanBuiltinLibraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/memory_compiler.dart
diff --git a/tests/compiler/dart2js/memory_compiler.dart b/tests/compiler/dart2js/memory_compiler.dart
index 5d0431cbf833cb260ae73ed36aef6a9d87deae9f..ffa51249076464a7fb3aed4c5554b673fc180b6e 100644
--- a/tests/compiler/dart2js/memory_compiler.dart
+++ b/tests/compiler/dart2js/memory_compiler.dart
@@ -127,7 +127,7 @@ Compiler compilerFor(Map<String,String> memorySourceFiles,
Uri libraryRoot = Uri.base.resolve('sdk/');
Uri script = Uri.base.resolveUri(Platform.script);
if (packageRoot == null) {
- packageRoot = Uri.base.resolve('${Platform.packageRoot}/');
+ packageRoot = Uri.base.resolveUri(new Uri.file('${Platform.packageRoot}/'));
}
MemorySourceFileProvider provider;
@@ -166,12 +166,18 @@ Compiler compilerFor(Map<String,String> memorySourceFiles,
if (cachedCompiler != null) {
compiler.coreLibrary = cachedCompiler.libraries['dart:core'];
compiler.types = cachedCompiler.types.copy(compiler);
+ Map copiedLibraries = {};
cachedCompiler.libraries.forEach((String uri, library) {
if (library.isPlatformLibrary) {
+ compiler.onLibraryCreated(library);
compiler.libraries[uri] = library;
- compiler.onLibraryLoaded(library, library.canonicalUri);
+ compiler.onLibraryScanned(library);
+ copiedLibraries[library.canonicalUri] = library;
}
});
+ // TODO(johnniwinther): Assert that no libraries are loaded lazily from
+ // this call.
+ compiler.onLibrariesLoaded(copiedLibraries);
compiler.symbolConstructor = cachedCompiler.symbolConstructor;
compiler.mirrorSystemClass = cachedCompiler.mirrorSystemClass;
@@ -224,7 +230,8 @@ Future<MirrorSystem> mirrorSystemFor(Map<String,String> memorySourceFiles,
List<String> options: const [],
bool showDiagnostics: true}) {
Uri libraryRoot = Uri.base.resolve('sdk/');
- Uri packageRoot = Uri.base.resolve('${Platform.packageRoot}/');
+ Uri packageRoot = Uri.base.resolveUri(
+ new Uri.file('${Platform.packageRoot}/'));
Uri script = Uri.base.resolveUri(Platform.script);
var provider = new MemorySourceFileProvider(memorySourceFiles);

Powered by Google App Engine
This is Rietveld 408576698