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

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

Issue 22909059: Some more removals of dart:utf. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Change ArgumentError to FormatException. Created 7 years, 4 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 3188a3e159ba5dcdf1b87956b004b170a84a4a32..ca48fda6604213e825de9370ec84ce16a4187aff 100644
--- a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
+++ b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
@@ -5,8 +5,8 @@
library source_file_provider;
import 'dart:async';
+import 'dart:convert';
import 'dart:io';
-import 'dart:utf';
import '../compiler.dart' as api show Diagnostic;
import 'dart2js.dart' show AbortLeg;
@@ -21,7 +21,7 @@ String readAll(String filename) {
var buffer = new List<int>(length);
var bytes = file.readIntoSync(buffer, 0, length);
file.closeSync();
- return new String.fromCharCodes(new Utf8Decoder(buffer).decodeRest());
+ return UTF8.decode(buffer);
}
class SourceFileProvider {

Powered by Google App Engine
This is Rietveld 408576698