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

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: fixes compiler tests 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..b6e5394b8903fa4e8cbf63888cc634347559d15b 100644
--- a/sdk/lib/_internal/compiler/compiler.dart
+++ b/sdk/lib/_internal/compiler/compiler.dart
@@ -11,11 +11,20 @@ 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
+ * a [String].
+ *
+ * The following text is non-normative:
+ *
+ * It is recommended to return a UTF-8 encoded list of bytes because the scanner
+ * is more efficient in this case. In either case, 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