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

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

Issue 246733004: Don't use fatal errors in message_kind_test.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 6 years, 8 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 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 'memory_source_file_helper.dart'; 7 import 'memory_source_file_helper.dart';
8 8
9 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' 9 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'
10 show NullSink; 10 show NullSink;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 cachedCompiler.parser = null; 202 cachedCompiler.parser = null;
203 cachedCompiler.patchParser = null; 203 cachedCompiler.patchParser = null;
204 cachedCompiler.libraryLoader = null; 204 cachedCompiler.libraryLoader = null;
205 cachedCompiler.validator = null; 205 cachedCompiler.validator = null;
206 cachedCompiler.resolver = null; 206 cachedCompiler.resolver = null;
207 cachedCompiler.closureToClassMapper = null; 207 cachedCompiler.closureToClassMapper = null;
208 cachedCompiler.checker = null; 208 cachedCompiler.checker = null;
209 cachedCompiler.irBuilder = null; 209 cachedCompiler.irBuilder = null;
210 cachedCompiler.typesTask = null; 210 cachedCompiler.typesTask = null;
211 cachedCompiler.backend = null; 211 cachedCompiler.backend = null;
212 cachedCompiler.enqueuer = null; 212 // Don't null out the enqueuer as it prevents us from using cachedCompiler
213 // more than once.
213 cachedCompiler.deferredLoadTask = null; 214 cachedCompiler.deferredLoadTask = null;
214 cachedCompiler.mirrorUsageAnalyzerTask = null; 215 cachedCompiler.mirrorUsageAnalyzerTask = null;
215 cachedCompiler.dumpInfoTask = null; 216 cachedCompiler.dumpInfoTask = null;
216 cachedCompiler.buildId = null; 217 cachedCompiler.buildId = null;
217 } 218 }
218 return compiler; 219 return compiler;
219 } 220 }
220 221
221 Future<MirrorSystem> mirrorSystemFor(Map<String,String> memorySourceFiles, 222 Future<MirrorSystem> mirrorSystemFor(Map<String,String> memorySourceFiles,
222 {DiagnosticHandler diagnosticHandler, 223 {DiagnosticHandler diagnosticHandler,
223 List<String> options: const [], 224 List<String> options: const [],
224 bool showDiagnostics: true}) { 225 bool showDiagnostics: true}) {
225 Uri libraryRoot = Uri.base.resolve('sdk/'); 226 Uri libraryRoot = Uri.base.resolve('sdk/');
226 Uri packageRoot = Uri.base.resolve('${Platform.packageRoot}/'); 227 Uri packageRoot = Uri.base.resolve('${Platform.packageRoot}/');
227 Uri script = Uri.base.resolveUri(Platform.script); 228 Uri script = Uri.base.resolveUri(Platform.script);
228 229
229 var provider = new MemorySourceFileProvider(memorySourceFiles); 230 var provider = new MemorySourceFileProvider(memorySourceFiles);
230 var handler = 231 var handler =
231 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); 232 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics);
232 233
233 List<Uri> libraries = <Uri>[]; 234 List<Uri> libraries = <Uri>[];
234 memorySourceFiles.forEach((String path, _) { 235 memorySourceFiles.forEach((String path, _) {
235 libraries.add(new Uri(scheme: 'memory', path: path)); 236 libraries.add(new Uri(scheme: 'memory', path: path));
236 }); 237 });
237 238
238 return analyze(libraries, libraryRoot, packageRoot, 239 return analyze(libraries, libraryRoot, packageRoot,
239 provider, handler, options); 240 provider, handler, options);
240 } 241 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698