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

Unified Diff: client/dom/generated/src/frog/Int16Array.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/HTMLCollection.dart ('k') | client/dom/generated/src/frog/Int32Array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/generated/src/frog/Int16Array.dart
diff --git a/client/dom/generated/src/frog/Int16Array.dart b/client/dom/generated/src/frog/Int16Array.dart
index 879e237122a4c967be9cd121a0ba3cb416618920..b00788b44fc8592650b6aa4d0757b90971f31d3e 100644
--- a/client/dom/generated/src/frog/Int16Array.dart
+++ b/client/dom/generated/src/frog/Int16Array.dart
@@ -1,9 +1,21 @@
-class Int16Array extends ArrayBufferView native "*Int16Array" {
+class Int16Array extends ArrayBufferView implements List<int> native "Int16Array" {
+
+ factory Int16Array(int length) => _construct(length);
+
+ factory Int16Array.fromList(List<int> list) => _construct(list);
+
+ factory Int16Array.fromBuffer(ArrayBuffer buffer) => _construct(buffer);
+
+ static _construct(arg) native 'return new Int16Array(arg);';
static final int BYTES_PER_ELEMENT = 2;
int length;
+ int operator[](int index) native;
+
+ void operator[]=(int index, int value) native;
+
Int16Array subarray(int start, [int end = null]) native;
}
« no previous file with comments | « client/dom/generated/src/frog/HTMLCollection.dart ('k') | client/dom/generated/src/frog/Int32Array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698