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

Side by Side Diff: pkg/front_end/lib/src/fasta/fasta.dart

Issue 2978243002: Mark outline as external
Patch Set: Created 3 years, 5 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 | « no previous file | 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 fasta; 5 library fasta;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'dart:convert' show JSON; 9 import 'dart:convert' show JSON;
10 10
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 140 }
141 String argument = c.options.arguments.first; 141 String argument = c.options.arguments.first;
142 Uri uri = Uri.base.resolve(argument); 142 Uri uri = Uri.base.resolve(argument);
143 String path = uriTranslator.translate(uri)?.path ?? argument; 143 String path = uriTranslator.translate(uri)?.path ?? argument;
144 if (path.endsWith(".dart")) { 144 if (path.endsWith(".dart")) {
145 kernelTarget.read(uri); 145 kernelTarget.read(uri);
146 } else { 146 } else {
147 deprecated_inputError(uri, -1, "Unexpected input: $uri"); 147 deprecated_inputError(uri, -1, "Unexpected input: $uri");
148 } 148 }
149 await dillTarget.buildOutlines(); 149 await dillTarget.buildOutlines();
150 dillTarget.loader.libraries.forEach((lib) => lib.isExternal = true);
150 var outline = await kernelTarget.buildOutlines(); 151 var outline = await kernelTarget.buildOutlines();
151 if (c.options.dumpIr && output != null) { 152 if (c.options.dumpIr && output != null) {
152 printProgramText(outline, libraryFilter: kernelTarget.isSourceLibrary); 153 printProgramText(outline, libraryFilter: kernelTarget.isSourceLibrary);
153 } 154 }
154 if (output != null) { 155 if (output != null) {
155 await writeProgramToFile(outline, output); 156 await writeProgramToFile(outline, output);
156 ticker.logMs("Wrote outline to ${output.toFilePath()}"); 157 ticker.logMs("Wrote outline to ${output.toFilePath()}");
157 } 158 }
158 return kernelTarget; 159 return kernelTarget;
159 } 160 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 final BytesBuilder builder = new BytesBuilder(); 242 final BytesBuilder builder = new BytesBuilder();
242 243
243 void add(List<int> data) { 244 void add(List<int> data) {
244 builder.add(data); 245 builder.add(data);
245 } 246 }
246 247
247 void close() { 248 void close() {
248 // Nothing to do. 249 // Nothing to do.
249 } 250 }
250 } 251 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698