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

Unified Diff: utils/compiler/create_snapshot.dart

Issue 2827793002: Format all files under tools and utils directory. (Closed)
Patch Set: Format all files under tools and utils directory. Created 3 years, 8 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 | « tools/yaml2json.dart ('k') | utils/compiler/create_snapshot_entry.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/compiler/create_snapshot.dart
diff --git a/utils/compiler/create_snapshot.dart b/utils/compiler/create_snapshot.dart
index c2ca95e2944703ca4731d4515638d2db3078d502..d36b792167bf0508ccf051c1ffa7bf35cbf1c286 100644
--- a/utils/compiler/create_snapshot.dart
+++ b/utils/compiler/create_snapshot.dart
@@ -7,8 +7,8 @@ import 'dart:io';
Future<String> getVersion(var rootPath) {
var suffix = Platform.operatingSystem == 'windows' ? '.exe' : '';
var printVersionScript = rootPath.resolve("tools/print_version.py");
- return Process.run("python$suffix",
- [printVersionScript.toFilePath()]).then((result) {
+ return Process
+ .run("python$suffix", [printVersionScript.toFilePath()]).then((result) {
if (result.exitCode != 0) {
throw "Could not generate version";
}
@@ -19,8 +19,7 @@ Future<String> getVersion(var rootPath) {
Future<String> getSnapshotGenerationFile(var args, var rootPath) {
var dart2js = rootPath.resolve(args["dart2js_main"]);
return getVersion(rootPath).then((version) {
- var snapshotGenerationText =
-"""
+ var snapshotGenerationText = """
import '${dart2js.toFilePath(windows: false)}' as dart2jsMain;
import 'dart:io';
@@ -41,8 +40,7 @@ void main(List<String> arguments) {
Future<String> getDart2jsSnapshotGenerationFile(var args, var rootPath) {
var dart2js = rootPath.resolve(args["dart2js_main"]);
return getVersion(rootPath).then((version) {
- var snapshotGenerationText =
-"""
+ var snapshotGenerationText = """
import '${dart2js.toFilePath(windows: false)}' as dart2jsMain;
void main(List<String> arguments) {
@@ -55,25 +53,25 @@ void main(List<String> arguments) {
}
void writeSnapshotFile(var path, var content) {
- File file = new File(path);
- var writer = file.openSync(mode: FileMode.WRITE);
- writer.writeStringSync(content);
- writer.close();
+ File file = new File(path);
+ var writer = file.openSync(mode: FileMode.WRITE);
+ writer.writeStringSync(content);
+ writer.close();
}
Future createSnapshot(var dart_file) {
- return Process.run(Platform.executable,
- ["--packages=../../.packages",
- "--snapshot=$dart_file.snapshot",
- dart_file])
- .then((result) {
- if (result.exitCode != 0) {
- print("Could not generate snapshot: result code ${result.exitCode}");
- print(result.stdout);
- print(result.stderr);
- throw "Could not generate snapshot";
- }
- });
+ return Process.run(Platform.executable, [
+ "--packages=../../.packages",
+ "--snapshot=$dart_file.snapshot",
+ dart_file
+ ]).then((result) {
+ if (result.exitCode != 0) {
+ print("Could not generate snapshot: result code ${result.exitCode}");
+ print(result.stdout);
+ print(result.stderr);
+ throw "Could not generate snapshot";
+ }
+ });
}
/**
@@ -109,5 +107,4 @@ void main(List<String> arguments) {
writeSnapshotFile(wrapper, result);
createSnapshot(wrapper);
});
-
}
« no previous file with comments | « tools/yaml2json.dart ('k') | utils/compiler/create_snapshot_entry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698