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

Side by Side Diff: utils/compiler/build_helper.dart

Issue 10021048: Remove need to instantiate Platform and make methods static. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add stable test binaries. Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/test_suite.dart ('k') | utils/tests/pub/test_pub.dart » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #import('dart:io'); 5 #import('dart:io');
6 #import('dart:uri'); 6 #import('dart:uri');
7 7
8 main() { 8 main() {
9 List<String> arguments = new Options().arguments; 9 List<String> arguments = new Options().arguments;
10 Uri uri = new Uri(scheme: 'file', path: '${arguments[0]}/'); 10 Uri uri = new Uri(scheme: 'file', path: '${arguments[0]}/');
(...skipping 13 matching lines...) Expand all
24 writeScript(Uri uri, List<String> chunks) { 24 writeScript(Uri uri, List<String> chunks) {
25 var f = new File(uri.path); 25 var f = new File(uri.path);
26 var stream = f.openSync(FileMode.WRITE); 26 var stream = f.openSync(FileMode.WRITE);
27 for (String chunk in chunks) { 27 for (String chunk in chunks) {
28 stream.writeStringSync(chunk); 28 stream.writeStringSync(chunk);
29 } 29 }
30 stream.closeSync(); 30 stream.closeSync();
31 31
32 // TODO(ahe): Also make a .bat file for Windows. 32 // TODO(ahe): Also make a .bat file for Windows.
33 33
34 if (new Platform().operatingSystem() != 'windows') { 34 if (Platform.operatingSystem() != 'windows') {
35 onExit(int exitCode, String stdout, String stderr) { 35 onExit(int exitCode, String stdout, String stderr) {
36 if (exitCode != 0) { 36 if (exitCode != 0) {
37 print(stdout); 37 print(stdout);
38 print(stderr); 38 print(stderr);
39 exit(exitCode); 39 exit(exitCode);
40 } 40 }
41 } 41 }
42 new Process.run('/bin/chmod', ['+x', uri.path], null, onExit); 42 new Process.run('/bin/chmod', ['+x', uri.path], null, onExit);
43 } 43 }
44 } 44 }
(...skipping 30 matching lines...) Expand all
75 } 75 }
76 } 76 }
77 } 77 }
78 } 78 }
79 79
80 void main() { 80 void main() {
81 new Helper().run(); 81 new Helper().run();
82 } 82 }
83 """; 83 """;
84 } 84 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_suite.dart ('k') | utils/tests/pub/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698