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

Unified Diff: utils/kernel-service/kernel-service.dart

Issue 2682993002: Pay some naming debt. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/test/fasta/testing.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/kernel-service/kernel-service.dart
diff --git a/utils/kernel-service/kernel-service.dart b/utils/kernel-service/kernel-service.dart
index 1965ecaed7068836d5bd1908e8a19f8f8e23a032..b52dcaee67d3cffa366f6a7eb93141793ca93f21 100644
--- a/utils/kernel-service/kernel-service.dart
+++ b/utils/kernel-service/kernel-service.dart
@@ -52,7 +52,7 @@ import 'package:front_end/src/fasta/dill/dill_target.dart' show DillTarget;
import 'package:front_end/src/fasta/translate_uri.dart' show TranslateUri;
import 'package:front_end/src/fasta/ticker.dart' show Ticker;
import 'package:front_end/src/fasta/kernel/kernel_target.dart'
- show KernelSourceTarget;
+ show KernelTarget;
import 'package:front_end/src/fasta/ast_kind.dart' show AstKind;
import 'package:front_end/src/fasta/errors.dart' show InputError;
@@ -162,15 +162,15 @@ Future<CompilationResult> parseScriptImpl(DartLoaderBatch batch_loader,
final Ticker ticker = new Ticker(isVerbose: verbose);
final DillTarget dillTarget = new DillTarget(ticker, uriTranslator);
dillTarget.read(new Uri.directory(sdkPath).resolve('platform.dill'));
- final KernelSourceTarget sourceTarget =
- new KernelSourceTarget(dillTarget, uriTranslator);
+ final KernelTarget kernelTarget =
+ new KernelTarget(dillTarget, uriTranslator);
try {
- sourceTarget.read(fileName);
+ kernelTarget.read(fileName);
await dillTarget.writeOutline(null);
- program = await sourceTarget.writeOutline(null);
- program = await sourceTarget.writeProgram(null, AstKind.Kernel);
- if (sourceTarget.errors.isNotEmpty) {
- return new CompilationError(sourceTarget.errors
+ program = await kernelTarget.writeOutline(null);
+ program = await kernelTarget.writeProgram(null, AstKind.Kernel);
+ if (kernelTarget.errors.isNotEmpty) {
+ return new CompilationError(kernelTarget.errors
.map((err) => err.toString())
.toList(growable: false));
}
@@ -347,7 +347,7 @@ void startBatchServer() {
} else {
request.response.statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
request.response.headers.contentType = ContentType.TEXT;
- request.response.write(JSON.encode(result.toJson()));
+ request.response.write(JSON.encode(result));
ahe 2017/02/08 16:55:29 JSON.encode calls toJson implicitly, and it isn't
Vyacheslav Egorov (Google) 2017/02/09 09:26:38 Sweet. I did not know that. Thanks for fixing.
request.response.close();
}
});
@@ -391,7 +391,7 @@ main([args]) {
// This duplicates functionality from the Loader which we can't easily
// access from here.
-Uri _findPackagesFile(Uri base) async {
+Future<Uri> _findPackagesFile(Uri base) async {
var dir = new File.fromUri(base).parent;
while (true) {
final packagesFile = dir.uri.resolve(".packages");
« no previous file with comments | « pkg/front_end/test/fasta/testing.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698