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

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

Issue 2797443008: Reapply "Add "load from .dill" file capability and run a white-box test."" (Closed)
Patch Set: take two Created 3 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
« no previous file with comments | « tests/compiler/dart2js/dill_loader_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 DiagnosticHandler; 9 import 'package:compiler/compiler.dart' show DiagnosticHandler;
10 import 'package:compiler/compiler_new.dart' 10 import 'package:compiler/compiler_new.dart'
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 CompilerDiagnostics diagnosticHandler, 73 CompilerDiagnostics diagnosticHandler,
74 CompilerOutput outputProvider, 74 CompilerOutput outputProvider,
75 List<String> options: const <String>[], 75 List<String> options: const <String>[],
76 CompilerImpl cachedCompiler, 76 CompilerImpl cachedCompiler,
77 bool showDiagnostics: true, 77 bool showDiagnostics: true,
78 Uri packageRoot, 78 Uri packageRoot,
79 Uri packageConfig, 79 Uri packageConfig,
80 PackagesDiscoveryProvider packagesDiscoveryProvider, 80 PackagesDiscoveryProvider packagesDiscoveryProvider,
81 void beforeRun(CompilerImpl compiler)}) async { 81 void beforeRun(CompilerImpl compiler)}) async {
82 if (entryPoint == null) { 82 if (entryPoint == null) {
83 entryPoint = Uri.parse('memory:main.dart'); 83 if (options.contains('--read-dill')) {
84 entryPoint = Uri.parse('memory:main.dill');
85 } else {
86 entryPoint = Uri.parse('memory:main.dart');
87 }
84 } 88 }
85 CompilerImpl compiler = compilerFor( 89 CompilerImpl compiler = compilerFor(
86 entryPoint: entryPoint, 90 entryPoint: entryPoint,
87 resolutionInputs: resolutionInputs, 91 resolutionInputs: resolutionInputs,
88 memorySourceFiles: memorySourceFiles, 92 memorySourceFiles: memorySourceFiles,
89 diagnosticHandler: diagnosticHandler, 93 diagnosticHandler: diagnosticHandler,
90 outputProvider: outputProvider, 94 outputProvider: outputProvider,
91 options: options, 95 options: options,
92 cachedCompiler: cachedCompiler, 96 cachedCompiler: cachedCompiler,
93 showDiagnostics: showDiagnostics, 97 showDiagnostics: showDiagnostics,
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) { 247 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) {
244 diagnosticHandler(uri, begin, end, message, kind); 248 diagnosticHandler(uri, begin, end, message, kind);
245 formattingHandler(uri, begin, end, message, kind); 249 formattingHandler(uri, begin, end, message, kind);
246 }; 250 };
247 } 251 }
248 } else if (diagnosticHandler == null) { 252 } else if (diagnosticHandler == null) {
249 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) {}; 253 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) {};
250 } 254 }
251 return handler; 255 return handler;
252 } 256 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/dill_loader_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698