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

Unified Diff: sdk/lib/typed_data/typed_data.dart

Issue 138033002: Make VM TypedList not implement ByteBuffer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/typed_data/typed_data.dart
diff --git a/sdk/lib/typed_data/typed_data.dart b/sdk/lib/typed_data/typed_data.dart
index 9d37eb6830760eb3f83699c60121a9228a7be644..2b977f9b0fc3df1a3ac126c23b8839d4fa67aba5 100644
--- a/sdk/lib/typed_data/typed_data.dart
+++ b/sdk/lib/typed_data/typed_data.dart
@@ -12,13 +12,16 @@ import 'dart:math' show Random;
* A sequence of bytes underlying a typed data object.
* Used to process large quantities of binary or numerical data
* more efficiently using a typed view.
+ *
+ * The `ByteBuffer` instances created by this library are the only ones
+ * that will work with the `view` constructors.
+ * Creating a class implementing `ByteBuffer` will not make it usable.
*/
abstract class ByteBuffer {
/**
* Returns the length of this byte buffer, in bytes.
*/
int get lengthInBytes;
-
}
@@ -54,8 +57,6 @@ abstract class TypedData {
* sequence of bytes.
*/
class Endianness {
- const Endianness._(this._littleEndian);
-
static const Endianness BIG_ENDIAN = const Endianness._(false);
static const Endianness LITTLE_ENDIAN = const Endianness._(true);
static final Endianness HOST_ENDIAN =
@@ -63,6 +64,8 @@ class Endianness {
LITTLE_ENDIAN : BIG_ENDIAN;
final bool _littleEndian;
+
+ const Endianness._(this._littleEndian);
}
« runtime/vm/dart_api_impl.cc ('K') | « runtime/vm/symbols.h ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698