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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart2js.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
Index: sdk/lib/_internal/compiler/implementation/dart2js.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart
index c4687ba66651e56ba02028b203f148f005f0d5e5..62286a07529c38c2a4dd5c804a6ba73332ec3c3b 100644
--- a/sdk/lib/_internal/compiler/implementation/dart2js.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart
@@ -4,6 +4,7 @@
library dart2js;
+import 'dart:async';
import 'dart:io';
import 'dart:uri';
import 'dart:utf';
@@ -287,8 +288,8 @@ void compile(List<String> argv) {
// TODO(ahe): We expect the future to be complete and call value
// directly. In effect, we don't support truly asynchronous API.
- String code = api.compile(uri, libraryRoot, packageRoot, provider, handler,
- options).value;
+ String code = deprecatedFutureValue(
+ api.compile(uri, libraryRoot, packageRoot, provider, handler, options));
if (code == null) {
fail('Error: Compilation failed.');
}
@@ -325,7 +326,7 @@ void writeString(Uri uri, String text) {
String readAll(String filename) {
var file = (new File(filename)).openSync(FileMode.READ);
var length = file.lengthSync();
- var buffer = new List<int>(length);
+ var buffer = new List<int>.fixedLength(length);
var bytes = file.readListSync(buffer, 0, length);
file.closeSync();
return new String.fromCharCodes(new Utf8Decoder(buffer).decodeRest());

Powered by Google App Engine
This is Rietveld 408576698