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

Unified Diff: client/dom/generated/src/frog/Int8Array.dart

Issue 8883007: Revert "Revert "Implement typed array constructors."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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
« no previous file with comments | « client/dom/generated/src/frog/Int32Array.dart ('k') | client/dom/generated/src/frog/MediaList.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/generated/src/frog/Int8Array.dart
diff --git a/client/dom/generated/src/frog/Int8Array.dart b/client/dom/generated/src/frog/Int8Array.dart
index edb2e569ea9fdd6708d18bfb016f7a2ab439e4ad..cec32afc5dd6cdcb78609feabee2076791da9d9f 100644
--- a/client/dom/generated/src/frog/Int8Array.dart
+++ b/client/dom/generated/src/frog/Int8Array.dart
@@ -1,9 +1,21 @@
-class Int8Array extends ArrayBufferView native "*Int8Array" {
+class Int8Array extends ArrayBufferView implements List<int> native "Int8Array" {
+
+ factory Int8Array(int length) => _construct(length);
+
+ factory Int8Array.fromList(List<int> list) => _construct(list);
+
+ factory Int8Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer);
+
+ static _construct(arg) native 'return new Int8Array(arg);';
static final int BYTES_PER_ELEMENT = 1;
int length;
+ int operator[](int index) native;
+
+ void operator[]=(int index, int value) native;
+
Int8Array subarray(int start, [int end = null]) native;
}
« no previous file with comments | « client/dom/generated/src/frog/Int32Array.dart ('k') | client/dom/generated/src/frog/MediaList.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698