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

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

Issue 2895983002: Read SDK and patches from a JSON file. (Closed)
Patch Set: Merged with 1333f97b9a0e3805f991578ef83b0ec4553ecf33 Created 3 years, 7 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
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.compile_platform; 5 library fasta.compile_platform;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'dart:io' show exitCode; 9 import 'dart:io' show exitCode;
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 print("Note: strong mode support is preliminary and may not work."); 60 print("Note: strong mode support is preliminary and may not work.");
61 } 61 }
62 ticker.isVerbose = c.options.verbose; 62 ticker.isVerbose = c.options.verbose;
63 Uri deps = Uri.base.resolveUri(new Uri.file("${fullOutput.toFilePath()}.d")); 63 Uri deps = Uri.base.resolveUri(new Uri.file("${fullOutput.toFilePath()}.d"));
64 ticker.logMs("Parsed arguments"); 64 ticker.logMs("Parsed arguments");
65 if (ticker.isVerbose) { 65 if (ticker.isVerbose) {
66 print("Generating outline of $patchedSdk into $outlineOutput"); 66 print("Generating outline of $patchedSdk into $outlineOutput");
67 print("Compiling $patchedSdk to $fullOutput"); 67 print("Compiling $patchedSdk to $fullOutput");
68 } 68 }
69 69
70 TranslateUri uriTranslator = 70 TranslateUri uriTranslator = await TranslateUri
71 await TranslateUri.parse(c.fileSystem, patchedSdk, c.options.packages); 71 .parse(c.fileSystem, patchedSdk, packages: c.options.packages);
72 ticker.logMs("Read packages file"); 72 ticker.logMs("Read packages file");
73 73
74 DillTarget dillTarget = 74 DillTarget dillTarget =
75 new DillTarget(ticker, uriTranslator, c.options.target); 75 new DillTarget(ticker, uriTranslator, c.options.target);
76 KernelTarget kernelTarget = new KernelTarget(c.fileSystem, dillTarget, 76 KernelTarget kernelTarget = new KernelTarget(c.fileSystem, dillTarget,
77 uriTranslator, c.options.strongMode, c.uriToSource); 77 uriTranslator, c.options.strongMode, c.uriToSource);
78 78
79 kernelTarget.read(Uri.parse("dart:core")); 79 kernelTarget.read(Uri.parse("dart:core"));
80 await dillTarget.buildOutlines(); 80 await dillTarget.buildOutlines();
81 var outline = await kernelTarget.buildOutlines(); 81 var outline = await kernelTarget.buildOutlines();
82 82
83 await writeProgramToFile(outline, outlineOutput); 83 await writeProgramToFile(outline, outlineOutput);
84 ticker.logMs("Wrote outline to ${outlineOutput.toFilePath()}"); 84 ticker.logMs("Wrote outline to ${outlineOutput.toFilePath()}");
85 85
86 if (exitCode != 0) return null; 86 if (exitCode != 0) return null;
87 87
88 var program = await kernelTarget.buildProgram(verify: c.options.verify); 88 var program = await kernelTarget.buildProgram(verify: c.options.verify);
89 if (c.options.dumpIr) printProgramText(program); 89 if (c.options.dumpIr) printProgramText(program);
90 await writeProgramToFile(program, fullOutput); 90 await writeProgramToFile(program, fullOutput);
91 ticker.logMs("Wrote program to ${fullOutput.toFilePath()}"); 91 ticker.logMs("Wrote program to ${fullOutput.toFilePath()}");
92 await kernelTarget.writeDepsFile(fullOutput, deps); 92 await kernelTarget.writeDepsFile(fullOutput, deps);
93 } 93 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/base/processed_options.dart ('k') | pkg/front_end/lib/src/fasta/dill/dill_target.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698