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

Side by Side Diff: tests/compiler/dart2js/memory_compiler.dart

Issue 51953009: Add new argument to compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import 'memory_source_file_helper.dart'; 8 import 'memory_source_file_helper.dart';
9 9
10 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' 10 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 EventSink<String> outputProvider(String name, String extension) { 90 EventSink<String> outputProvider(String name, String extension) {
91 if (name != '') throw 'Attempt to output file "$name.$extension"'; 91 if (name != '') throw 'Attempt to output file "$name.$extension"';
92 return new NullSink('$name.$extension'); 92 return new NullSink('$name.$extension');
93 } 93 }
94 94
95 Compiler compiler = new Compiler(provider.readStringFromUri, 95 Compiler compiler = new Compiler(provider.readStringFromUri,
96 outputProvider, 96 outputProvider,
97 handler, 97 handler,
98 libraryRoot, 98 libraryRoot,
99 packageRoot, 99 packageRoot,
100 options); 100 options,
101 {});
101 if (cachedCompiler != null) { 102 if (cachedCompiler != null) {
102 compiler.coreLibrary = cachedCompiler.libraries['dart:core']; 103 compiler.coreLibrary = cachedCompiler.libraries['dart:core'];
103 compiler.types = cachedCompiler.types; 104 compiler.types = cachedCompiler.types;
104 cachedCompiler.libraries.forEach((String uri, library) { 105 cachedCompiler.libraries.forEach((String uri, library) {
105 if (library.isPlatformLibrary) { 106 if (library.isPlatformLibrary) {
106 compiler.libraries[uri] = library; 107 compiler.libraries[uri] = library;
107 compiler.onLibraryLoaded(library, library.canonicalUri); 108 compiler.onLibraryLoaded(library, library.canonicalUri);
108 } 109 }
109 }); 110 });
110 111
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); 146 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics);
146 147
147 List<Uri> libraries = <Uri>[]; 148 List<Uri> libraries = <Uri>[];
148 memorySourceFiles.forEach((String path, _) { 149 memorySourceFiles.forEach((String path, _) {
149 libraries.add(new Uri(scheme: 'memory', path: path)); 150 libraries.add(new Uri(scheme: 'memory', path: path));
150 }); 151 });
151 152
152 return analyze(libraries, libraryRoot, packageRoot, 153 return analyze(libraries, libraryRoot, packageRoot,
153 provider, handler, options); 154 provider, handler, options);
154 } 155 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/diagnose_ambiguous_test.dart ('k') | tests/compiler/dart2js/mirror_tree_shaking_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698