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

Side by Side Diff: utils/kernel-service/kernel-service.dart

Issue 2720693003: VM: [Kernel] Pass correct parameters to fasta's TranslateUri.parse. (Closed)
Patch Set: Created 3 years, 9 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 /// This is an interface to the Dart Kernel parser and Kernel binary generator. 5 /// This is an interface to the Dart Kernel parser and Kernel binary generator.
6 /// 6 ///
7 /// It is used by the kernel-isolate to load Dart source code and generate 7 /// It is used by the kernel-isolate to load Dart source code and generate
8 /// Kernel binary format. 8 /// Kernel binary format.
9 /// 9 ///
10 /// This is either invoked as the root script of the Kernel isolate when used 10 /// This is either invoked as the root script of the Kernel isolate when used
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 throw "Input file '${fileName.path}' does not exist."; 106 throw "Input file '${fileName.path}' does not exist.";
107 } 107 }
108 108
109 if (!FileSystemEntity.isDirectorySync(sdkPath)) { 109 if (!FileSystemEntity.isDirectorySync(sdkPath)) {
110 throw "Patched sdk directory not found at $sdkPath"; 110 throw "Patched sdk directory not found at $sdkPath";
111 } 111 }
112 112
113 Target target = getTarget("vm", new TargetFlags(strongMode: false)); 113 Target target = getTarget("vm", new TargetFlags(strongMode: false));
114 114
115 Program program; 115 Program program;
116 final uriTranslator = await TranslateUri.parse(new Uri.file(packageConfig)); 116 final uriTranslator =
117 await TranslateUri.parse(null, new Uri.file(packageConfig));
117 final Ticker ticker = new Ticker(isVerbose: verbose); 118 final Ticker ticker = new Ticker(isVerbose: verbose);
118 final DillTarget dillTarget = new DillTarget(ticker, uriTranslator); 119 final DillTarget dillTarget = new DillTarget(ticker, uriTranslator);
119 dillTarget.read(new Uri.directory(sdkPath).resolve('platform.dill')); 120 dillTarget.read(new Uri.directory(sdkPath).resolve('platform.dill'));
120 final KernelTarget kernelTarget = 121 final KernelTarget kernelTarget =
121 new KernelTarget(dillTarget, uriTranslator); 122 new KernelTarget(dillTarget, uriTranslator);
122 try { 123 try {
123 kernelTarget.read(fileName); 124 kernelTarget.read(fileName);
124 await dillTarget.writeOutline(null); 125 await dillTarget.writeOutline(null);
125 program = await kernelTarget.writeOutline(null); 126 program = await kernelTarget.writeOutline(null);
126 program = await kernelTarget.writeProgram(null, AstKind.Kernel); 127 program = await kernelTarget.writeProgram(null, AstKind.Kernel);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 if (await new File.fromUri(packagesFile).exists()) { 271 if (await new File.fromUri(packagesFile).exists()) {
271 return packagesFile; 272 return packagesFile;
272 } 273 }
273 if (dir.parent.path == dir.path) { 274 if (dir.parent.path == dir.path) {
274 break; 275 break;
275 } 276 }
276 dir = dir.parent; 277 dir = dir.parent;
277 } 278 }
278 return null; 279 return null;
279 } 280 }
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