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

Side by Side Diff: sdk/lib/_internal/compiler/compiler.dart

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. Created 7 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
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 library compiler; 5 library compiler;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:uri'; 8 import 'dart:uri';
9 import 'implementation/apiimpl.dart'; 9 import 'implementation/apiimpl.dart';
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 if (code != null && outputProvider != null) { 98 if (code != null && outputProvider != null) {
99 String outputType = 'js'; 99 String outputType = 'js';
100 if (options.contains('--output-type=dart')) { 100 if (options.contains('--output-type=dart')) {
101 outputType = 'dart'; 101 outputType = 'dart';
102 } 102 }
103 outputProvider('', outputType) 103 outputProvider('', outputType)
104 ..add(code) 104 ..add(code)
105 ..close(); 105 ..close();
106 code = ''; // Non-null signals success. 106 code = ''; // Non-null signals success.
107 } 107 }
108 return new Future.immediate(code); 108 return new Future.value(code);
109 } 109 }
110 110
111 /** 111 /**
112 * Kind of diagnostics that the compiler can report. 112 * Kind of diagnostics that the compiler can report.
113 */ 113 */
114 class Diagnostic { 114 class Diagnostic {
115 /** 115 /**
116 * An error as identified by the "Dart Programming Language 116 * An error as identified by the "Dart Programming Language
117 * Specification" [http://www.dartlang.org/docs/spec/]. 117 * Specification" [http://www.dartlang.org/docs/spec/].
118 * 118 *
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 final String name; 168 final String name;
169 169
170 /** 170 /**
171 * This constructor is not private to support user-defined 171 * This constructor is not private to support user-defined
172 * diagnostic kinds. 172 * diagnostic kinds.
173 */ 173 */
174 const Diagnostic(this.ordinal, this.name); 174 const Diagnostic(this.ordinal, this.name);
175 175
176 String toString() => name; 176 String toString() => name;
177 } 177 }
OLDNEW
« no previous file with comments | « samples/tests/samples/lib/layout/layout_test.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698