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

Side by Side Diff: pkg/dev_compiler/tool/global_compile.dart

Issue 2830503002: Run formatter on dev_compiler. (Closed)
Patch Set: Run formatter on dev_compiler. 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 import 'dart:async'; 6 import 'dart:async';
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:analyzer/analyzer.dart' 9 import 'package:analyzer/analyzer.dart'
10 show 10 show
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 linearizerMap[module] = last; 101 linearizerMap[module] = last;
102 var completer = new Completer(); 102 var completer = new Completer();
103 completerMap[module] = completer; 103 completerMap[module] = completer;
104 last = completer.future; 104 last = completer.future;
105 } 105 }
106 106
107 // Build modules asynchronously 107 // Build modules asynchronously
108 var tmpdir = (tmp == null) 108 var tmpdir = (tmp == null)
109 ? Directory.systemTemp 109 ? Directory.systemTemp
110 .createTempSync(outfile.replaceAll(path.separator, '__')) 110 .createTempSync(outfile.replaceAll(path.separator, '__'))
111 : new Directory(tmp)..createSync(); 111 : new Directory(tmp)
112 ..createSync();
112 for (var module in orderedModules) { 113 for (var module in orderedModules) {
113 var file = tmpdir.path + path.separator + module + '.js'; 114 var file = tmpdir.path + path.separator + module + '.js';
114 var command = template.toList()..addAll(['-o', file]); 115 var command = template.toList()..addAll(['-o', file]);
115 var dependences = transitiveDependenceMap[module]; 116 var dependences = transitiveDependenceMap[module];
116 for (var dependence in dependences) { 117 for (var dependence in dependences) {
117 var summary = tmpdir.path + path.separator + dependence + '.sum'; 118 var summary = tmpdir.path + path.separator + dependence + '.sum';
118 command.addAll(['-s', summary]); 119 command.addAll(['-s', summary]);
119 } 120 }
120 var infiles = fileMap[module]; 121 var infiles = fileMap[module];
121 command.addAll(infiles); 122 command.addAll(infiles);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 var uri = _resolveDirective(d); 284 var uri = _resolveDirective(d);
284 processDependence(entryPoint, canonicalize(uri, entryDir)); 285 processDependence(entryPoint, canonicalize(uri, entryDir));
285 transitiveFiles(uri, entryDir, packageRoot); 286 transitiveFiles(uri, entryDir, packageRoot);
286 } else if (d is PartDirective) { 287 } else if (d is PartDirective) {
287 var uri = _resolveDirective(d); 288 var uri = _resolveDirective(d);
288 processFile(canonicalize(uri, entryDir)); 289 processFile(canonicalize(uri, entryDir));
289 } 290 }
290 } 291 }
291 } 292 }
292 } 293 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698