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

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

Issue 27510003: Scanner for UTF-8 byte arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/compiler.dart
diff --git a/sdk/lib/_internal/compiler/compiler.dart b/sdk/lib/_internal/compiler/compiler.dart
index 215f248749e373a981a4d90e49b64be5ed20baaa..d3de8c0b33cf8c154cfec156630fb92cf61151dd 100644
--- a/sdk/lib/_internal/compiler/compiler.dart
+++ b/sdk/lib/_internal/compiler/compiler.dart
@@ -11,11 +11,18 @@ import 'implementation/apiimpl.dart';
// methods of library will result in an Error being thrown.
/**
- * Returns a future that completes to the source corresponding to
- * [uri]. If an exception occurs, the future completes with this
- * exception.
+ * Returns a future that completes to the source corresponding to [uri].
+ * If an exception occurs, the future completes with this exception.
+ *
+ * The source can be represented either as a [List<int>] of UTF-8 bytes or as
ahe 2013/10/16 14:26:04 I don't think you can say List<int> inside [].
lukas 2013/10/17 07:21:25 Done.
+ * a [String]. It is recommended to return a UTF-8 encoded list of bytes because
ahe 2013/10/16 14:26:04 Break before "It is recommended" and add "The foll
lukas 2013/10/17 07:21:25 Done.
+ * the scanner is more efficient in this case.
+ *
+ * In both cases, the data structure is expected to hold a zero element at the
+ * last position. If this is not the case, the entire data structure is copied
+ * before scanning.
*/
-typedef Future<String> CompilerInputProvider(Uri uri);
+typedef Future/*<String | List<int>>*/ CompilerInputProvider(Uri uri);
/// Deprecated, please use [CompilerInputProvider] instead.
typedef Future<String> ReadStringFromUri(Uri uri);

Powered by Google App Engine
This is Rietveld 408576698