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

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

Issue 2722223006: Move all main methods to tool/. (Closed)
Patch Set: Update tools/patch_sdk.dart. 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
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 File, IOSink; 9 import 'dart:io' show File, IOSink;
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 null, 53 null,
54 null, 54 null,
55 "The environment variable '$name' has the value '$value', " 55 "The environment variable '$name' has the value '$value', "
56 "that's a directory that contains '$asyncSources', so it isn't a " 56 "that's a directory that contains '$asyncSources', so it isn't a "
57 "patched SDK. $what"); 57 "patched SDK. $what");
58 } 58 }
59 return null; 59 return null;
60 } 60 }
61 } 61 }
62 62
63 main(List<String> arguments) async { 63 mainEntryPoint(List<String> arguments) async {
64 Uri output = Uri.base.resolveUri(new Uri.file(arguments.single)); 64 Uri output = Uri.base.resolveUri(new Uri.file(arguments.single));
65 DartOptions options = new DartOptions( 65 DartOptions options = new DartOptions(
66 strongMode: false, sdk: await dartAotSdk.value, packagePath: null); 66 strongMode: false, sdk: await dartAotSdk.value, packagePath: null);
67 Program program = new Program(); 67 Program program = new Program();
68 DartLoader loader = new DartLoader(program, options, null, 68 DartLoader loader = new DartLoader(program, options, null,
69 ignoreRedirectingFactories: false, 69 ignoreRedirectingFactories: false,
70 dartSdk: createDartSdk(options.sdk, strongMode: options.strongMode)); 70 dartSdk: createDartSdk(options.sdk, strongMode: options.strongMode));
71 Target target = 71 Target target =
72 getTarget("vm", new TargetFlags(strongMode: options.strongMode)); 72 getTarget("vm", new TargetFlags(strongMode: options.strongMode));
73 loader.loadProgram(Uri.base.resolve("pkg/fasta/test/platform.dart"), 73 loader.loadProgram(Uri.base.resolve("pkg/fasta/test/platform.dart"),
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 isConst: true, 110 isConst: true,
111 initializer: literal, 111 initializer: literal,
112 fileUri: "${new Uri.file(source.fullName)}")..fileOffset = offset); 112 fileUri: "${new Uri.file(source.fullName)}")..fileOffset = offset);
113 } 113 }
114 } 114 }
115 115
116 IOSink sink = new File.fromUri(output).openWrite(); 116 IOSink sink = new File.fromUri(output).openWrite();
117 new BinaryPrinter(sink).writeProgramFile(program); 117 new BinaryPrinter(sink).writeProgramFile(program);
118 await sink.close(); 118 await sink.close();
119 } 119 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/analyzer/analyzer_compile.dart ('k') | pkg/front_end/lib/src/fasta/bin/compile.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698