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

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

Issue 12328104: Change new List(n) to return fixed length list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 7 years, 10 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/source_file_provider.dart
diff --git a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
index c100694e0140304d68b541051f176a94c4697db8..fc4e9b24ac0de57f0c84d66e401006fba50e8f0a 100644
--- a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
+++ b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
@@ -19,7 +19,7 @@ import 'util/uri_extras.dart';
String readAll(String filename) {
var file = (new File(filename)).openSync(FileMode.READ);
var length = file.lengthSync();
- var buffer = new List<int>.fixedLength(length);
+ var buffer = new List<int>(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