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

Side by Side Diff: pkg/kernel/lib/kernel.dart

Issue 2561723003: Merge kernel closure conversion into the Dart SDK (Closed)
Patch Set: Remove path constraint Created 4 years 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 /// Conventions for paths: 5 /// Conventions for paths:
6 /// 6 ///
7 /// - Use the [Uri] class for paths that may have the `file`, `dart` or 7 /// - Use the [Uri] class for paths that may have the `file`, `dart` or
8 /// `package` scheme. Never use [Uri] for relative paths. 8 /// `package` scheme. Never use [Uri] for relative paths.
9 /// - Use [String]s for all filenames and paths that have no scheme prefix. 9 /// - Use [String]s for all filenames and paths that have no scheme prefix.
10 /// - Never translate a `dart:` or `package:` URI into a `file:` URI, instead 10 /// - Never translate a `dart:` or `package:` URI into a `file:` URI, instead
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 void writeLibraryToText(Library library, {String path}) { 43 void writeLibraryToText(Library library, {String path}) {
44 StringBuffer buffer = new StringBuffer(); 44 StringBuffer buffer = new StringBuffer();
45 new Printer(buffer).writeLibraryFile(library); 45 new Printer(buffer).writeLibraryFile(library);
46 if (path == null) { 46 if (path == null) {
47 print(buffer); 47 print(buffer);
48 } else { 48 } else {
49 new File(path).writeAsStringSync('$buffer'); 49 new File(path).writeAsStringSync('$buffer');
50 } 50 }
51 } 51 }
52 52
53 void writeProgramToText(Program program, {String path, bool showExternal: false} ) { 53 void writeProgramToText(Program program,
54 {String path, bool showExternal: false}) {
54 StringBuffer buffer = new StringBuffer(); 55 StringBuffer buffer = new StringBuffer();
55 new Printer(buffer, showExternal: showExternal).writeProgramFile(program); 56 new Printer(buffer, showExternal: showExternal).writeProgramFile(program);
56 if (path == null) { 57 if (path == null) {
57 print(buffer); 58 print(buffer);
58 } else { 59 } else {
59 new File(path).writeAsStringSync('$buffer'); 60 new File(path).writeAsStringSync('$buffer');
60 } 61 }
61 } 62 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/frontend/super_initializers.dart ('k') | pkg/kernel/lib/transformations/async.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698