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

Side by Side Diff: sdk/lib/typed_data/dart2js/typed_data_dart2js.dart

Issue 98103004: Dart2js: Make Int64List and Uint64List abstract. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Indentation Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Specialized integers and floating point numbers, 6 * Specialized integers and floating point numbers,
7 * with SIMD support and efficient lists. 7 * with SIMD support and efficient lists.
8 */ 8 */
9 library dart.typed_data; 9 library dart.typed_data;
10 10
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 static Uint8List _create3(arg1, arg2, arg3) => 1118 static Uint8List _create3(arg1, arg2, arg3) =>
1119 JS('Uint8List', 'new Uint8Array(#, #, #)', arg1, arg2, arg3); 1119 JS('Uint8List', 'new Uint8Array(#, #, #)', arg1, arg2, arg3);
1120 } 1120 }
1121 1121
1122 1122
1123 /** 1123 /**
1124 * A fixed-length list of 64-bit signed integers that is viewable as a 1124 * A fixed-length list of 64-bit signed integers that is viewable as a
1125 * [TypedData]. For long lists, this implementation can be considerably 1125 * [TypedData]. For long lists, this implementation can be considerably
1126 * more space- and time-efficient than the default [List] implementation. 1126 * more space- and time-efficient than the default [List] implementation.
1127 */ 1127 */
1128 class Int64List extends TypedData implements JavaScriptIndexingBehavior, List<in t> { 1128 abstract class Int64List extends TypedData
1129 implements JavaScriptIndexingBehavior, List<int> {
1129 /** 1130 /**
1130 * Creates an [Int64List] of the specified length (in elements), all of 1131 * Creates an [Int64List] of the specified length (in elements), all of
1131 * whose elements are initially zero. 1132 * whose elements are initially zero.
1132 */ 1133 */
1133 factory Int64List(int length) { 1134 factory Int64List(int length) {
1134 throw new UnsupportedError("Int64List not supported by dart2js."); 1135 throw new UnsupportedError("Int64List not supported by dart2js.");
1135 } 1136 }
1136 1137
1137 /** 1138 /**
1138 * Creates a [Int64List] with the same size as the [elements] list 1139 * Creates a [Int64List] with the same size as the [elements] list
(...skipping 24 matching lines...) Expand all
1163 1164
1164 static const int BYTES_PER_ELEMENT = 8; 1165 static const int BYTES_PER_ELEMENT = 8;
1165 } 1166 }
1166 1167
1167 1168
1168 /** 1169 /**
1169 * A fixed-length list of 64-bit unsigned integers that is viewable as a 1170 * A fixed-length list of 64-bit unsigned integers that is viewable as a
1170 * [TypedData]. For long lists, this implementation can be considerably 1171 * [TypedData]. For long lists, this implementation can be considerably
1171 * more space- and time-efficient than the default [List] implementation. 1172 * more space- and time-efficient than the default [List] implementation.
1172 */ 1173 */
1173 class Uint64List extends TypedData implements JavaScriptIndexingBehavior, List<i nt> { 1174 abstract class Uint64List extends TypedData
1175 implements JavaScriptIndexingBehavior, List<int> {
1174 /** 1176 /**
1175 * Creates a [Uint64List] of the specified length (in elements), all 1177 * Creates a [Uint64List] of the specified length (in elements), all
1176 * of whose elements are initially zero. 1178 * of whose elements are initially zero.
1177 */ 1179 */
1178 factory Uint64List(int length) { 1180 factory Uint64List(int length) {
1179 throw new UnsupportedError("Uint64List not supported by dart2js."); 1181 throw new UnsupportedError("Uint64List not supported by dart2js.");
1180 } 1182 }
1181 1183
1182 /** 1184 /**
1183 * Creates a [Uint64List] with the same size as the [elements] list 1185 * Creates a [Uint64List] with the same size as the [elements] list
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
2530 int _w = (cmw & stw) | (~cmw & sfw); 2532 int _w = (cmw & stw) | (~cmw & sfw);
2531 var r = new Float32x4(0.0, 0.0, 0.0, 0.0); 2533 var r = new Float32x4(0.0, 0.0, 0.0, 0.0);
2532 var rView = new Int32List.view(r._storage.buffer); 2534 var rView = new Int32List.view(r._storage.buffer);
2533 rView[0] = _x; 2535 rView[0] = _x;
2534 rView[1] = _y; 2536 rView[1] = _y;
2535 rView[2] = _z; 2537 rView[2] = _z;
2536 rView[3] = _w; 2538 rView[3] = _w;
2537 return r; 2539 return r;
2538 } 2540 }
2539 } 2541 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698