| OLD | NEW |
| 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 // patch classes for Int8List ..... Float64List and ByteData implementations. | 5 // patch classes for Int8List ..... Float64List and ByteData implementations. |
| 6 | 6 |
| 7 import "dart:_internal"; | 7 import "dart:_internal"; |
| 8 import 'dart:math' show Random; | 8 import 'dart:math' show Random; |
| 9 | 9 |
| 10 patch class Int8List { | 10 patch class Int8List { |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 _setUint16(byteStart + i * Uint16List.BYTES_PER_ELEMENT, | 920 _setUint16(byteStart + i * Uint16List.BYTES_PER_ELEMENT, |
| 921 string.codeUnitAt(skipCount + i)); | 921 string.codeUnitAt(skipCount + i)); |
| 922 } | 922 } |
| 923 } | 923 } |
| 924 } | 924 } |
| 925 | 925 |
| 926 | 926 |
| 927 class _Int8Array extends _TypedList with _IntListMixin implements Int8List { | 927 class _Int8Array extends _TypedList with _IntListMixin implements Int8List { |
| 928 // Factory constructors. | 928 // Factory constructors. |
| 929 | 929 |
| 930 factory _Int8Array(int length) { | 930 factory _Int8Array(int length) native "TypedData_Int8Array_new"; |
| 931 return _new(length); | |
| 932 } | |
| 933 | |
| 934 | 931 |
| 935 // Method(s) implementing List interface. | 932 // Method(s) implementing List interface. |
| 936 | 933 |
| 937 int operator[](int index) { | 934 int operator[](int index) { |
| 938 if (index < 0 || index >= length) { | 935 if (index < 0 || index >= length) { |
| 939 throw new RangeError.index(index, this, "index"); | 936 throw new RangeError.index(index, this, "index"); |
| 940 } | 937 } |
| 941 return _getInt8(index); | 938 return _getInt8(index); |
| 942 } | 939 } |
| 943 | 940 |
| 944 void operator[]=(int index, int value) { | 941 void operator[]=(int index, int value) { |
| 945 if (index < 0 || index >= length) { | 942 if (index < 0 || index >= length) { |
| 946 throw new RangeError.index(index, this, "index"); | 943 throw new RangeError.index(index, this, "index"); |
| 947 } | 944 } |
| 948 _setInt8(index, _toInt8(value)); | 945 _setInt8(index, _toInt8(value)); |
| 949 } | 946 } |
| 950 | 947 |
| 951 | 948 |
| 952 // Method(s) implementing TypedData interface. | 949 // Method(s) implementing TypedData interface. |
| 953 | 950 |
| 954 int get elementSizeInBytes { | 951 int get elementSizeInBytes { |
| 955 return Int8List.BYTES_PER_ELEMENT; | 952 return Int8List.BYTES_PER_ELEMENT; |
| 956 } | 953 } |
| 957 | 954 |
| 958 | 955 |
| 959 // Internal utility methods. | 956 // Internal utility methods. |
| 960 | 957 |
| 961 _Int8Array _createList(int length) { | 958 _Int8Array _createList(int length) { |
| 962 return _new(length); | 959 return new _Int8Array(length); |
| 963 } | 960 } |
| 964 | |
| 965 static _Int8Array _new(int length) native "TypedData_Int8Array_new"; | |
| 966 } | 961 } |
| 967 | 962 |
| 968 | 963 |
| 969 class _Uint8Array extends _TypedList with _IntListMixin implements Uint8List { | 964 class _Uint8Array extends _TypedList with _IntListMixin implements Uint8List { |
| 970 // Factory constructors. | 965 // Factory constructors. |
| 971 | 966 |
| 972 factory _Uint8Array(int length) { | 967 factory _Uint8Array(int length) native "TypedData_Uint8Array_new"; |
| 973 return _new(length); | |
| 974 } | |
| 975 | |
| 976 | 968 |
| 977 // Methods implementing List interface. | 969 // Methods implementing List interface. |
| 978 int operator[](int index) { | 970 int operator[](int index) { |
| 979 if (index < 0 || index >= length) { | 971 if (index < 0 || index >= length) { |
| 980 throw new RangeError.index(index, this, "index"); | 972 throw new RangeError.index(index, this, "index"); |
| 981 } | 973 } |
| 982 return _getUint8(index); | 974 return _getUint8(index); |
| 983 } | 975 } |
| 984 | 976 |
| 985 void operator[]=(int index, int value) { | 977 void operator[]=(int index, int value) { |
| 986 if (index < 0 || index >= length) { | 978 if (index < 0 || index >= length) { |
| 987 throw new RangeError.index(index, this, "index"); | 979 throw new RangeError.index(index, this, "index"); |
| 988 } | 980 } |
| 989 _setUint8(index, _toUint8(value)); | 981 _setUint8(index, _toUint8(value)); |
| 990 } | 982 } |
| 991 | 983 |
| 992 | 984 |
| 993 // Methods implementing TypedData interface. | 985 // Methods implementing TypedData interface. |
| 994 int get elementSizeInBytes { | 986 int get elementSizeInBytes { |
| 995 return Uint8List.BYTES_PER_ELEMENT; | 987 return Uint8List.BYTES_PER_ELEMENT; |
| 996 } | 988 } |
| 997 | 989 |
| 998 | 990 |
| 999 // Internal utility methods. | 991 // Internal utility methods. |
| 1000 | 992 |
| 1001 _Uint8Array _createList(int length) { | 993 _Uint8Array _createList(int length) { |
| 1002 return _new(length); | 994 return new _Uint8Array(length); |
| 1003 } | 995 } |
| 1004 | |
| 1005 static _Uint8Array _new(int length) native "TypedData_Uint8Array_new"; | |
| 1006 } | 996 } |
| 1007 | 997 |
| 1008 | 998 |
| 1009 class _Uint8ClampedArray extends _TypedList with _IntListMixin implements Uint8C
lampedList { | 999 class _Uint8ClampedArray extends _TypedList with _IntListMixin implements Uint8C
lampedList { |
| 1010 // Factory constructors. | 1000 // Factory constructors. |
| 1011 | 1001 |
| 1012 factory _Uint8ClampedArray(int length) { | 1002 factory _Uint8ClampedArray(int length) native "TypedData_Uint8ClampedArray_new
"; |
| 1013 return _new(length); | |
| 1014 } | |
| 1015 | 1003 |
| 1016 // Methods implementing List interface. | 1004 // Methods implementing List interface. |
| 1017 | 1005 |
| 1018 int operator[](int index) { | 1006 int operator[](int index) { |
| 1019 if (index < 0 || index >= length) { | 1007 if (index < 0 || index >= length) { |
| 1020 throw new RangeError.index(index, this, "index"); | 1008 throw new RangeError.index(index, this, "index"); |
| 1021 } | 1009 } |
| 1022 return _getUint8(index); | 1010 return _getUint8(index); |
| 1023 } | 1011 } |
| 1024 | 1012 |
| 1025 void operator[]=(int index, int value) { | 1013 void operator[]=(int index, int value) { |
| 1026 if (index < 0 || index >= length) { | 1014 if (index < 0 || index >= length) { |
| 1027 throw new RangeError.index(index, this, "index"); | 1015 throw new RangeError.index(index, this, "index"); |
| 1028 } | 1016 } |
| 1029 _setUint8(index, _toClampedUint8(value)); | 1017 _setUint8(index, _toClampedUint8(value)); |
| 1030 } | 1018 } |
| 1031 | 1019 |
| 1032 | 1020 |
| 1033 // Methods implementing TypedData interface. | 1021 // Methods implementing TypedData interface. |
| 1034 int get elementSizeInBytes { | 1022 int get elementSizeInBytes { |
| 1035 return Uint8List.BYTES_PER_ELEMENT; | 1023 return Uint8List.BYTES_PER_ELEMENT; |
| 1036 } | 1024 } |
| 1037 | 1025 |
| 1038 | 1026 |
| 1039 // Internal utility methods. | 1027 // Internal utility methods. |
| 1040 | 1028 |
| 1041 _Uint8ClampedArray _createList(int length) { | 1029 _Uint8ClampedArray _createList(int length) { |
| 1042 return _new(length); | 1030 return new _Uint8ClampedArray(length); |
| 1043 } | 1031 } |
| 1044 | |
| 1045 static _Uint8ClampedArray _new(int length) | |
| 1046 native "TypedData_Uint8ClampedArray_new"; | |
| 1047 } | 1032 } |
| 1048 | 1033 |
| 1049 | 1034 |
| 1050 class _Int16Array extends _TypedList with _IntListMixin implements Int16List { | 1035 class _Int16Array extends _TypedList with _IntListMixin implements Int16List { |
| 1051 // Factory constructors. | 1036 // Factory constructors. |
| 1052 | 1037 |
| 1053 factory _Int16Array(int length) { | 1038 factory _Int16Array(int length) native "TypedData_Int16Array_new"; |
| 1054 return _new(length); | |
| 1055 } | |
| 1056 | |
| 1057 | 1039 |
| 1058 // Method(s) implementing List interface. | 1040 // Method(s) implementing List interface. |
| 1059 | 1041 |
| 1060 int operator[](int index) { | 1042 int operator[](int index) { |
| 1061 if (index < 0 || index >= length) { | 1043 if (index < 0 || index >= length) { |
| 1062 throw new RangeError.index(index, this, "index"); | 1044 throw new RangeError.index(index, this, "index"); |
| 1063 } | 1045 } |
| 1064 return _getIndexedInt16(index); | 1046 return _getIndexedInt16(index); |
| 1065 } | 1047 } |
| 1066 | 1048 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1085 // Method(s) implementing TypedData interface. | 1067 // Method(s) implementing TypedData interface. |
| 1086 | 1068 |
| 1087 int get elementSizeInBytes { | 1069 int get elementSizeInBytes { |
| 1088 return Int16List.BYTES_PER_ELEMENT; | 1070 return Int16List.BYTES_PER_ELEMENT; |
| 1089 } | 1071 } |
| 1090 | 1072 |
| 1091 | 1073 |
| 1092 // Internal utility methods. | 1074 // Internal utility methods. |
| 1093 | 1075 |
| 1094 _Int16Array _createList(int length) { | 1076 _Int16Array _createList(int length) { |
| 1095 return _new(length); | 1077 return new _Int16Array(length); |
| 1096 } | 1078 } |
| 1097 | 1079 |
| 1098 int _getIndexedInt16(int index) { | 1080 int _getIndexedInt16(int index) { |
| 1099 return _getInt16(index * Int16List.BYTES_PER_ELEMENT); | 1081 return _getInt16(index * Int16List.BYTES_PER_ELEMENT); |
| 1100 } | 1082 } |
| 1101 | 1083 |
| 1102 void _setIndexedInt16(int index, int value) { | 1084 void _setIndexedInt16(int index, int value) { |
| 1103 _setInt16(index * Int16List.BYTES_PER_ELEMENT, value); | 1085 _setInt16(index * Int16List.BYTES_PER_ELEMENT, value); |
| 1104 } | 1086 } |
| 1105 | |
| 1106 static _Int16Array _new(int length) native "TypedData_Int16Array_new"; | |
| 1107 } | 1087 } |
| 1108 | 1088 |
| 1109 | 1089 |
| 1110 class _Uint16Array extends _TypedList with _IntListMixin implements Uint16List { | 1090 class _Uint16Array extends _TypedList with _IntListMixin implements Uint16List { |
| 1111 // Factory constructors. | 1091 // Factory constructors. |
| 1112 | 1092 |
| 1113 factory _Uint16Array(int length) { | 1093 factory _Uint16Array(int length) native "TypedData_Uint16Array_new"; |
| 1114 return _new(length); | |
| 1115 } | |
| 1116 | |
| 1117 | 1094 |
| 1118 // Method(s) implementing the List interface. | 1095 // Method(s) implementing the List interface. |
| 1119 | 1096 |
| 1120 int operator[](int index) { | 1097 int operator[](int index) { |
| 1121 if (index < 0 || index >= length) { | 1098 if (index < 0 || index >= length) { |
| 1122 throw new RangeError.index(index, this, "index"); | 1099 throw new RangeError.index(index, this, "index"); |
| 1123 } | 1100 } |
| 1124 return _getIndexedUint16(index); | 1101 return _getIndexedUint16(index); |
| 1125 } | 1102 } |
| 1126 | 1103 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1145 // Method(s) implementing the TypedData interface. | 1122 // Method(s) implementing the TypedData interface. |
| 1146 | 1123 |
| 1147 int get elementSizeInBytes { | 1124 int get elementSizeInBytes { |
| 1148 return Uint16List.BYTES_PER_ELEMENT; | 1125 return Uint16List.BYTES_PER_ELEMENT; |
| 1149 } | 1126 } |
| 1150 | 1127 |
| 1151 | 1128 |
| 1152 // Internal utility methods. | 1129 // Internal utility methods. |
| 1153 | 1130 |
| 1154 _Uint16Array _createList(int length) { | 1131 _Uint16Array _createList(int length) { |
| 1155 return _new(length); | 1132 return new _Uint16Array(length); |
| 1156 } | 1133 } |
| 1157 | 1134 |
| 1158 int _getIndexedUint16(int index) { | 1135 int _getIndexedUint16(int index) { |
| 1159 return _getUint16(index * Uint16List.BYTES_PER_ELEMENT); | 1136 return _getUint16(index * Uint16List.BYTES_PER_ELEMENT); |
| 1160 } | 1137 } |
| 1161 | 1138 |
| 1162 void _setIndexedUint16(int index, int value) { | 1139 void _setIndexedUint16(int index, int value) { |
| 1163 _setUint16(index * Uint16List.BYTES_PER_ELEMENT, value); | 1140 _setUint16(index * Uint16List.BYTES_PER_ELEMENT, value); |
| 1164 } | 1141 } |
| 1165 | |
| 1166 static _Uint16Array _new(int length) native "TypedData_Uint16Array_new"; | |
| 1167 } | 1142 } |
| 1168 | 1143 |
| 1169 | 1144 |
| 1170 class _Int32Array extends _TypedList with _IntListMixin implements Int32List { | 1145 class _Int32Array extends _TypedList with _IntListMixin implements Int32List { |
| 1171 // Factory constructors. | 1146 // Factory constructors. |
| 1172 | 1147 |
| 1173 factory _Int32Array(int length) { | 1148 factory _Int32Array(int length) native "TypedData_Int32Array_new"; |
| 1174 return _new(length); | |
| 1175 } | |
| 1176 | |
| 1177 | 1149 |
| 1178 // Method(s) implementing the List interface. | 1150 // Method(s) implementing the List interface. |
| 1179 | 1151 |
| 1180 int operator[](int index) { | 1152 int operator[](int index) { |
| 1181 if (index < 0 || index >= length) { | 1153 if (index < 0 || index >= length) { |
| 1182 throw new RangeError.index(index, this, "index"); | 1154 throw new RangeError.index(index, this, "index"); |
| 1183 } | 1155 } |
| 1184 return _getIndexedInt32(index); | 1156 return _getIndexedInt32(index); |
| 1185 } | 1157 } |
| 1186 | 1158 |
| 1187 void operator[]=(int index, int value) { | 1159 void operator[]=(int index, int value) { |
| 1188 if (index < 0 || index >= length) { | 1160 if (index < 0 || index >= length) { |
| 1189 throw new RangeError.index(index, this, "index"); | 1161 throw new RangeError.index(index, this, "index"); |
| 1190 } | 1162 } |
| 1191 _setIndexedInt32(index, _toInt32(value)); | 1163 _setIndexedInt32(index, _toInt32(value)); |
| 1192 } | 1164 } |
| 1193 | 1165 |
| 1194 | 1166 |
| 1195 // Method(s) implementing TypedData interface. | 1167 // Method(s) implementing TypedData interface. |
| 1196 | 1168 |
| 1197 int get elementSizeInBytes { | 1169 int get elementSizeInBytes { |
| 1198 return Int32List.BYTES_PER_ELEMENT; | 1170 return Int32List.BYTES_PER_ELEMENT; |
| 1199 } | 1171 } |
| 1200 | 1172 |
| 1201 | 1173 |
| 1202 // Internal utility methods. | 1174 // Internal utility methods. |
| 1203 | 1175 |
| 1204 _Int32Array _createList(int length) { | 1176 _Int32Array _createList(int length) { |
| 1205 return _new(length); | 1177 return new _Int32Array(length); |
| 1206 } | 1178 } |
| 1207 | 1179 |
| 1208 int _getIndexedInt32(int index) { | 1180 int _getIndexedInt32(int index) { |
| 1209 return _getInt32(index * Int32List.BYTES_PER_ELEMENT); | 1181 return _getInt32(index * Int32List.BYTES_PER_ELEMENT); |
| 1210 } | 1182 } |
| 1211 | 1183 |
| 1212 void _setIndexedInt32(int index, int value) { | 1184 void _setIndexedInt32(int index, int value) { |
| 1213 _setInt32(index * Int32List.BYTES_PER_ELEMENT, value); | 1185 _setInt32(index * Int32List.BYTES_PER_ELEMENT, value); |
| 1214 } | 1186 } |
| 1215 | 1187 |
| 1216 static _Int32Array _new(int length) native "TypedData_Int32Array_new"; | |
| 1217 } | 1188 } |
| 1218 | 1189 |
| 1219 | 1190 |
| 1220 class _Uint32Array extends _TypedList with _IntListMixin implements Uint32List { | 1191 class _Uint32Array extends _TypedList with _IntListMixin implements Uint32List { |
| 1221 // Factory constructors. | 1192 // Factory constructors. |
| 1222 | 1193 |
| 1223 factory _Uint32Array(int length) { | 1194 factory _Uint32Array(int length) native "TypedData_Uint32Array_new"; |
| 1224 return _new(length); | |
| 1225 } | |
| 1226 | |
| 1227 | 1195 |
| 1228 // Method(s) implementing the List interface. | 1196 // Method(s) implementing the List interface. |
| 1229 | 1197 |
| 1230 int operator[](int index) { | 1198 int operator[](int index) { |
| 1231 if (index < 0 || index >= length) { | 1199 if (index < 0 || index >= length) { |
| 1232 throw new RangeError.index(index, this, "index"); | 1200 throw new RangeError.index(index, this, "index"); |
| 1233 } | 1201 } |
| 1234 return _getIndexedUint32(index); | 1202 return _getIndexedUint32(index); |
| 1235 } | 1203 } |
| 1236 | 1204 |
| 1237 void operator[]=(int index, int value) { | 1205 void operator[]=(int index, int value) { |
| 1238 if (index < 0 || index >= length) { | 1206 if (index < 0 || index >= length) { |
| 1239 throw new RangeError.index(index, this, "index"); | 1207 throw new RangeError.index(index, this, "index"); |
| 1240 } | 1208 } |
| 1241 _setIndexedUint32(index, _toUint32(value)); | 1209 _setIndexedUint32(index, _toUint32(value)); |
| 1242 } | 1210 } |
| 1243 | 1211 |
| 1244 | 1212 |
| 1245 // Method(s) implementing the TypedData interface. | 1213 // Method(s) implementing the TypedData interface. |
| 1246 | 1214 |
| 1247 int get elementSizeInBytes { | 1215 int get elementSizeInBytes { |
| 1248 return Uint32List.BYTES_PER_ELEMENT; | 1216 return Uint32List.BYTES_PER_ELEMENT; |
| 1249 } | 1217 } |
| 1250 | 1218 |
| 1251 | 1219 |
| 1252 // Internal utility methods. | 1220 // Internal utility methods. |
| 1253 | 1221 |
| 1254 _Uint32Array _createList(int length) { | 1222 _Uint32Array _createList(int length) { |
| 1255 return _new(length); | 1223 return new _Uint32Array(length); |
| 1256 } | 1224 } |
| 1257 | 1225 |
| 1258 int _getIndexedUint32(int index) { | 1226 int _getIndexedUint32(int index) { |
| 1259 return _getUint32(index * Uint32List.BYTES_PER_ELEMENT); | 1227 return _getUint32(index * Uint32List.BYTES_PER_ELEMENT); |
| 1260 } | 1228 } |
| 1261 | 1229 |
| 1262 void _setIndexedUint32(int index, int value) { | 1230 void _setIndexedUint32(int index, int value) { |
| 1263 _setUint32(index * Uint32List.BYTES_PER_ELEMENT, value); | 1231 _setUint32(index * Uint32List.BYTES_PER_ELEMENT, value); |
| 1264 } | 1232 } |
| 1265 | |
| 1266 static _Uint32Array _new(int length) native "TypedData_Uint32Array_new"; | |
| 1267 } | 1233 } |
| 1268 | 1234 |
| 1269 | 1235 |
| 1270 class _Int64Array extends _TypedList with _IntListMixin implements Int64List { | 1236 class _Int64Array extends _TypedList with _IntListMixin implements Int64List { |
| 1271 // Factory constructors. | 1237 // Factory constructors. |
| 1272 | 1238 |
| 1273 factory _Int64Array(int length) { | 1239 factory _Int64Array(int length) native "TypedData_Int64Array_new"; |
| 1274 return _new(length); | |
| 1275 } | |
| 1276 | |
| 1277 | 1240 |
| 1278 // Method(s) implementing the List interface. | 1241 // Method(s) implementing the List interface. |
| 1279 | 1242 |
| 1280 int operator[](int index) { | 1243 int operator[](int index) { |
| 1281 if (index < 0 || index >= length) { | 1244 if (index < 0 || index >= length) { |
| 1282 throw new RangeError.index(index, this, "index"); | 1245 throw new RangeError.index(index, this, "index"); |
| 1283 } | 1246 } |
| 1284 return _getIndexedInt64(index); | 1247 return _getIndexedInt64(index); |
| 1285 } | 1248 } |
| 1286 | 1249 |
| 1287 void operator[]=(int index, int value) { | 1250 void operator[]=(int index, int value) { |
| 1288 if (index < 0 || index >= length) { | 1251 if (index < 0 || index >= length) { |
| 1289 throw new RangeError.index(index, this, "index"); | 1252 throw new RangeError.index(index, this, "index"); |
| 1290 } | 1253 } |
| 1291 _setIndexedInt64(index, _toInt64(value)); | 1254 _setIndexedInt64(index, _toInt64(value)); |
| 1292 } | 1255 } |
| 1293 | 1256 |
| 1294 | 1257 |
| 1295 // Method(s) implementing the TypedData interface. | 1258 // Method(s) implementing the TypedData interface. |
| 1296 | 1259 |
| 1297 int get elementSizeInBytes { | 1260 int get elementSizeInBytes { |
| 1298 return Int64List.BYTES_PER_ELEMENT; | 1261 return Int64List.BYTES_PER_ELEMENT; |
| 1299 } | 1262 } |
| 1300 | 1263 |
| 1301 | 1264 |
| 1302 // Internal utility methods. | 1265 // Internal utility methods. |
| 1303 | 1266 |
| 1304 _Int64Array _createList(int length) { | 1267 _Int64Array _createList(int length) { |
| 1305 return _new(length); | 1268 return new _Int64Array(length); |
| 1306 } | 1269 } |
| 1307 | 1270 |
| 1308 int _getIndexedInt64(int index) { | 1271 int _getIndexedInt64(int index) { |
| 1309 return _getInt64(index * Int64List.BYTES_PER_ELEMENT); | 1272 return _getInt64(index * Int64List.BYTES_PER_ELEMENT); |
| 1310 } | 1273 } |
| 1311 | 1274 |
| 1312 void _setIndexedInt64(int index, int value) { | 1275 void _setIndexedInt64(int index, int value) { |
| 1313 _setInt64(index * Int64List.BYTES_PER_ELEMENT, value); | 1276 _setInt64(index * Int64List.BYTES_PER_ELEMENT, value); |
| 1314 } | 1277 } |
| 1315 | |
| 1316 static _Int64Array _new(int length) native "TypedData_Int64Array_new"; | |
| 1317 } | 1278 } |
| 1318 | 1279 |
| 1319 | 1280 |
| 1320 class _Uint64Array extends _TypedList with _IntListMixin implements Uint64List { | 1281 class _Uint64Array extends _TypedList with _IntListMixin implements Uint64List { |
| 1321 // Factory constructors. | 1282 // Factory constructors. |
| 1322 | 1283 |
| 1323 factory _Uint64Array(int length) { | 1284 factory _Uint64Array(int length) native "TypedData_Uint64Array_new"; |
| 1324 return _new(length); | |
| 1325 } | |
| 1326 | |
| 1327 | 1285 |
| 1328 // Method(s) implementing the List interface. | 1286 // Method(s) implementing the List interface. |
| 1329 | 1287 |
| 1330 int operator[](int index) { | 1288 int operator[](int index) { |
| 1331 if (index < 0 || index >= length) { | 1289 if (index < 0 || index >= length) { |
| 1332 throw new RangeError.index(index, this, "index"); | 1290 throw new RangeError.index(index, this, "index"); |
| 1333 } | 1291 } |
| 1334 return _getIndexedUint64(index); | 1292 return _getIndexedUint64(index); |
| 1335 } | 1293 } |
| 1336 | 1294 |
| 1337 void operator[]=(int index, int value) { | 1295 void operator[]=(int index, int value) { |
| 1338 if (index < 0 || index >= length) { | 1296 if (index < 0 || index >= length) { |
| 1339 throw new RangeError.index(index, this, "index"); | 1297 throw new RangeError.index(index, this, "index"); |
| 1340 } | 1298 } |
| 1341 _setIndexedUint64(index, _toUint64(value)); | 1299 _setIndexedUint64(index, _toUint64(value)); |
| 1342 } | 1300 } |
| 1343 | 1301 |
| 1344 | 1302 |
| 1345 // Method(s) implementing the TypedData interface. | 1303 // Method(s) implementing the TypedData interface. |
| 1346 | 1304 |
| 1347 int get elementSizeInBytes { | 1305 int get elementSizeInBytes { |
| 1348 return Uint64List.BYTES_PER_ELEMENT; | 1306 return Uint64List.BYTES_PER_ELEMENT; |
| 1349 } | 1307 } |
| 1350 | 1308 |
| 1351 | 1309 |
| 1352 // Internal utility methods. | 1310 // Internal utility methods. |
| 1353 | 1311 |
| 1354 _Uint64Array _createList(int length) { | 1312 _Uint64Array _createList(int length) { |
| 1355 return _new(length); | 1313 return new _Uint64Array(length); |
| 1356 } | 1314 } |
| 1357 | 1315 |
| 1358 int _getIndexedUint64(int index) { | 1316 int _getIndexedUint64(int index) { |
| 1359 return _getUint64(index * Uint64List.BYTES_PER_ELEMENT); | 1317 return _getUint64(index * Uint64List.BYTES_PER_ELEMENT); |
| 1360 } | 1318 } |
| 1361 | 1319 |
| 1362 void _setIndexedUint64(int index, int value) { | 1320 void _setIndexedUint64(int index, int value) { |
| 1363 _setUint64(index * Uint64List.BYTES_PER_ELEMENT, value); | 1321 _setUint64(index * Uint64List.BYTES_PER_ELEMENT, value); |
| 1364 } | 1322 } |
| 1365 | |
| 1366 static _Uint64Array _new(int length) native "TypedData_Uint64Array_new"; | |
| 1367 } | 1323 } |
| 1368 | 1324 |
| 1369 | 1325 |
| 1370 class _Float32Array extends _TypedList with _DoubleListMixin implements Float32L
ist { | 1326 class _Float32Array extends _TypedList with _DoubleListMixin implements Float32L
ist { |
| 1371 // Factory constructors. | 1327 // Factory constructors. |
| 1372 | 1328 |
| 1373 factory _Float32Array(int length) { | 1329 factory _Float32Array(int length) native "TypedData_Float32Array_new"; |
| 1374 return _new(length); | |
| 1375 } | |
| 1376 | |
| 1377 | 1330 |
| 1378 // Method(s) implementing the List interface. | 1331 // Method(s) implementing the List interface. |
| 1379 | 1332 |
| 1380 double operator[](int index) { | 1333 double operator[](int index) { |
| 1381 if (index < 0 || index >= length) { | 1334 if (index < 0 || index >= length) { |
| 1382 throw new RangeError.index(index, this, "index"); | 1335 throw new RangeError.index(index, this, "index"); |
| 1383 } | 1336 } |
| 1384 return _getIndexedFloat32(index); | 1337 return _getIndexedFloat32(index); |
| 1385 } | 1338 } |
| 1386 | 1339 |
| 1387 void operator[]=(int index, double value) { | 1340 void operator[]=(int index, double value) { |
| 1388 if (index < 0 || index >= length) { | 1341 if (index < 0 || index >= length) { |
| 1389 throw new RangeError.index(index, this, "index"); | 1342 throw new RangeError.index(index, this, "index"); |
| 1390 } | 1343 } |
| 1391 _setIndexedFloat32(index, value); | 1344 _setIndexedFloat32(index, value); |
| 1392 } | 1345 } |
| 1393 | 1346 |
| 1394 | 1347 |
| 1395 // Method(s) implementing the TypedData interface. | 1348 // Method(s) implementing the TypedData interface. |
| 1396 | 1349 |
| 1397 int get elementSizeInBytes { | 1350 int get elementSizeInBytes { |
| 1398 return Float32List.BYTES_PER_ELEMENT; | 1351 return Float32List.BYTES_PER_ELEMENT; |
| 1399 } | 1352 } |
| 1400 | 1353 |
| 1401 | 1354 |
| 1402 // Internal utility methods. | 1355 // Internal utility methods. |
| 1403 | 1356 |
| 1404 _Float32Array _createList(int length) { | 1357 _Float32Array _createList(int length) { |
| 1405 return _new(length); | 1358 return new _Float32Array(length); |
| 1406 } | 1359 } |
| 1407 | 1360 |
| 1408 double _getIndexedFloat32(int index) { | 1361 double _getIndexedFloat32(int index) { |
| 1409 return _getFloat32(index * Float32List.BYTES_PER_ELEMENT); | 1362 return _getFloat32(index * Float32List.BYTES_PER_ELEMENT); |
| 1410 } | 1363 } |
| 1411 | 1364 |
| 1412 void _setIndexedFloat32(int index, double value) { | 1365 void _setIndexedFloat32(int index, double value) { |
| 1413 _setFloat32(index * Float32List.BYTES_PER_ELEMENT, value); | 1366 _setFloat32(index * Float32List.BYTES_PER_ELEMENT, value); |
| 1414 } | 1367 } |
| 1415 | |
| 1416 static _Float32Array _new(int length) native "TypedData_Float32Array_new"; | |
| 1417 } | 1368 } |
| 1418 | 1369 |
| 1419 | 1370 |
| 1420 class _Float64Array extends _TypedList with _DoubleListMixin implements Float64L
ist { | 1371 class _Float64Array extends _TypedList with _DoubleListMixin implements Float64L
ist { |
| 1421 // Factory constructors. | 1372 // Factory constructors. |
| 1422 | 1373 |
| 1423 factory _Float64Array(int length) { | 1374 factory _Float64Array(int length) native "TypedData_Float64Array_new"; |
| 1424 return _new(length); | |
| 1425 } | |
| 1426 | |
| 1427 | 1375 |
| 1428 // Method(s) implementing the List interface. | 1376 // Method(s) implementing the List interface. |
| 1429 | 1377 |
| 1430 double operator[](int index) { | 1378 double operator[](int index) { |
| 1431 if (index < 0 || index >= length) { | 1379 if (index < 0 || index >= length) { |
| 1432 throw new RangeError.index(index, this, "index"); | 1380 throw new RangeError.index(index, this, "index"); |
| 1433 } | 1381 } |
| 1434 return _getIndexedFloat64(index); | 1382 return _getIndexedFloat64(index); |
| 1435 } | 1383 } |
| 1436 | 1384 |
| 1437 void operator[]=(int index, double value) { | 1385 void operator[]=(int index, double value) { |
| 1438 if (index < 0 || index >= length) { | 1386 if (index < 0 || index >= length) { |
| 1439 throw new RangeError.index(index, this, "index"); | 1387 throw new RangeError.index(index, this, "index"); |
| 1440 } | 1388 } |
| 1441 _setIndexedFloat64(index, value); | 1389 _setIndexedFloat64(index, value); |
| 1442 } | 1390 } |
| 1443 | 1391 |
| 1444 | 1392 |
| 1445 // Method(s) implementing the TypedData interface. | 1393 // Method(s) implementing the TypedData interface. |
| 1446 | 1394 |
| 1447 int get elementSizeInBytes { | 1395 int get elementSizeInBytes { |
| 1448 return Float64List.BYTES_PER_ELEMENT; | 1396 return Float64List.BYTES_PER_ELEMENT; |
| 1449 } | 1397 } |
| 1450 | 1398 |
| 1451 | 1399 |
| 1452 // Internal utility methods. | 1400 // Internal utility methods. |
| 1453 | 1401 |
| 1454 _Float64Array _createList(int length) { | 1402 _Float64Array _createList(int length) { |
| 1455 return _new(length); | 1403 return new _Float64Array(length); |
| 1456 } | 1404 } |
| 1457 | 1405 |
| 1458 double _getIndexedFloat64(int index) { | 1406 double _getIndexedFloat64(int index) { |
| 1459 return _getFloat64(index * Float64List.BYTES_PER_ELEMENT); | 1407 return _getFloat64(index * Float64List.BYTES_PER_ELEMENT); |
| 1460 } | 1408 } |
| 1461 | 1409 |
| 1462 void _setIndexedFloat64(int index, double value) { | 1410 void _setIndexedFloat64(int index, double value) { |
| 1463 _setFloat64(index * Float64List.BYTES_PER_ELEMENT, value); | 1411 _setFloat64(index * Float64List.BYTES_PER_ELEMENT, value); |
| 1464 } | 1412 } |
| 1465 | |
| 1466 static _Float64Array _new(int length) native "TypedData_Float64Array_new"; | |
| 1467 } | 1413 } |
| 1468 | 1414 |
| 1469 | 1415 |
| 1470 class _Float32x4Array extends _TypedList with _Float32x4ListMixin implements Flo
at32x4List { | 1416 class _Float32x4Array extends _TypedList with _Float32x4ListMixin implements Flo
at32x4List { |
| 1471 // Factory constructors. | 1417 // Factory constructors. |
| 1472 | 1418 |
| 1473 factory _Float32x4Array(int length) { | 1419 factory _Float32x4Array(int length) native "TypedData_Float32x4Array_new"; |
| 1474 return _new(length); | |
| 1475 } | |
| 1476 | |
| 1477 | 1420 |
| 1478 Float32x4 operator[](int index) { | 1421 Float32x4 operator[](int index) { |
| 1479 if (index < 0 || index >= length) { | 1422 if (index < 0 || index >= length) { |
| 1480 throw new RangeError.index(index, this, "index"); | 1423 throw new RangeError.index(index, this, "index"); |
| 1481 } | 1424 } |
| 1482 return _getIndexedFloat32x4(index); | 1425 return _getIndexedFloat32x4(index); |
| 1483 } | 1426 } |
| 1484 | 1427 |
| 1485 void operator[]=(int index, Float32x4 value) { | 1428 void operator[]=(int index, Float32x4 value) { |
| 1486 if (index < 0 || index >= length) { | 1429 if (index < 0 || index >= length) { |
| 1487 throw new RangeError.index(index, this, "index"); | 1430 throw new RangeError.index(index, this, "index"); |
| 1488 } | 1431 } |
| 1489 _setIndexedFloat32x4(index, value); | 1432 _setIndexedFloat32x4(index, value); |
| 1490 } | 1433 } |
| 1491 | 1434 |
| 1492 | 1435 |
| 1493 // Method(s) implementing the TypedData interface. | 1436 // Method(s) implementing the TypedData interface. |
| 1494 | 1437 |
| 1495 int get elementSizeInBytes { | 1438 int get elementSizeInBytes { |
| 1496 return Float32x4List.BYTES_PER_ELEMENT; | 1439 return Float32x4List.BYTES_PER_ELEMENT; |
| 1497 } | 1440 } |
| 1498 | 1441 |
| 1499 | 1442 |
| 1500 // Internal utility methods. | 1443 // Internal utility methods. |
| 1501 | 1444 |
| 1502 _Float32x4Array _createList(int length) { | 1445 _Float32x4Array _createList(int length) { |
| 1503 return _new(length); | 1446 return new _Float32x4Array(length); |
| 1504 } | 1447 } |
| 1505 | 1448 |
| 1506 Float32x4 _getIndexedFloat32x4(int index) { | 1449 Float32x4 _getIndexedFloat32x4(int index) { |
| 1507 return _getFloat32x4(index * Float32x4List.BYTES_PER_ELEMENT); | 1450 return _getFloat32x4(index * Float32x4List.BYTES_PER_ELEMENT); |
| 1508 } | 1451 } |
| 1509 | 1452 |
| 1510 void _setIndexedFloat32x4(int index, Float32x4 value) { | 1453 void _setIndexedFloat32x4(int index, Float32x4 value) { |
| 1511 _setFloat32x4(index * Float32x4List.BYTES_PER_ELEMENT, value); | 1454 _setFloat32x4(index * Float32x4List.BYTES_PER_ELEMENT, value); |
| 1512 } | 1455 } |
| 1513 | |
| 1514 static _Float32x4Array _new(int length) native "TypedData_Float32x4Array_new"; | |
| 1515 } | 1456 } |
| 1516 | 1457 |
| 1517 | 1458 |
| 1518 class _Int32x4Array extends _TypedList with _Int32x4ListMixin implements Int32x4
List { | 1459 class _Int32x4Array extends _TypedList with _Int32x4ListMixin implements Int32x4
List { |
| 1519 // Factory constructors. | 1460 // Factory constructors. |
| 1520 | 1461 |
| 1521 factory _Int32x4Array(int length) { | 1462 factory _Int32x4Array(int length) native "TypedData_Int32x4Array_new"; |
| 1522 return _new(length); | |
| 1523 } | |
| 1524 | |
| 1525 | 1463 |
| 1526 Int32x4 operator[](int index) { | 1464 Int32x4 operator[](int index) { |
| 1527 if (index < 0 || index >= length) { | 1465 if (index < 0 || index >= length) { |
| 1528 throw new RangeError.index(index, this, "index"); | 1466 throw new RangeError.index(index, this, "index"); |
| 1529 } | 1467 } |
| 1530 return _getIndexedInt32x4(index); | 1468 return _getIndexedInt32x4(index); |
| 1531 } | 1469 } |
| 1532 | 1470 |
| 1533 void operator[]=(int index, Int32x4 value) { | 1471 void operator[]=(int index, Int32x4 value) { |
| 1534 if (index < 0 || index >= length) { | 1472 if (index < 0 || index >= length) { |
| 1535 throw new RangeError.index(index, this, "index"); | 1473 throw new RangeError.index(index, this, "index"); |
| 1536 } | 1474 } |
| 1537 _setIndexedInt32x4(index, value); | 1475 _setIndexedInt32x4(index, value); |
| 1538 } | 1476 } |
| 1539 | 1477 |
| 1540 | 1478 |
| 1541 // Method(s) implementing the TypedData interface. | 1479 // Method(s) implementing the TypedData interface. |
| 1542 | 1480 |
| 1543 int get elementSizeInBytes { | 1481 int get elementSizeInBytes { |
| 1544 return Int32x4List.BYTES_PER_ELEMENT; | 1482 return Int32x4List.BYTES_PER_ELEMENT; |
| 1545 } | 1483 } |
| 1546 | 1484 |
| 1547 | 1485 |
| 1548 // Internal utility methods. | 1486 // Internal utility methods. |
| 1549 | 1487 |
| 1550 _Int32x4Array _createList(int length) { | 1488 _Int32x4Array _createList(int length) { |
| 1551 return _new(length); | 1489 return new _Int32x4Array(length); |
| 1552 } | 1490 } |
| 1553 | 1491 |
| 1554 Int32x4 _getIndexedInt32x4(int index) { | 1492 Int32x4 _getIndexedInt32x4(int index) { |
| 1555 return _getInt32x4(index * Int32x4List.BYTES_PER_ELEMENT); | 1493 return _getInt32x4(index * Int32x4List.BYTES_PER_ELEMENT); |
| 1556 } | 1494 } |
| 1557 | 1495 |
| 1558 void _setIndexedInt32x4(int index, Int32x4 value) { | 1496 void _setIndexedInt32x4(int index, Int32x4 value) { |
| 1559 _setInt32x4(index * Int32x4List.BYTES_PER_ELEMENT, value); | 1497 _setInt32x4(index * Int32x4List.BYTES_PER_ELEMENT, value); |
| 1560 } | 1498 } |
| 1561 | |
| 1562 static _Int32x4Array _new(int length) native "TypedData_Int32x4Array_new"; | |
| 1563 } | 1499 } |
| 1564 | 1500 |
| 1565 | 1501 |
| 1566 class _Float64x2Array extends _TypedList with _Float64x2ListMixin implements Flo
at64x2List { | 1502 class _Float64x2Array extends _TypedList with _Float64x2ListMixin implements Flo
at64x2List { |
| 1567 // Factory constructors. | 1503 // Factory constructors. |
| 1568 | 1504 |
| 1569 factory _Float64x2Array(int length) { | 1505 factory _Float64x2Array(int length) native "TypedData_Float64x2Array_new"; |
| 1570 return _new(length); | |
| 1571 } | |
| 1572 | |
| 1573 | 1506 |
| 1574 Float64x2 operator[](int index) { | 1507 Float64x2 operator[](int index) { |
| 1575 if (index < 0 || index >= length) { | 1508 if (index < 0 || index >= length) { |
| 1576 throw new RangeError.index(index, this, "index"); | 1509 throw new RangeError.index(index, this, "index"); |
| 1577 } | 1510 } |
| 1578 return _getIndexedFloat64x2(index); | 1511 return _getIndexedFloat64x2(index); |
| 1579 } | 1512 } |
| 1580 | 1513 |
| 1581 void operator[]=(int index, Float64x2 value) { | 1514 void operator[]=(int index, Float64x2 value) { |
| 1582 if (index < 0 || index >= length) { | 1515 if (index < 0 || index >= length) { |
| 1583 throw new RangeError.index(index, this, "index"); | 1516 throw new RangeError.index(index, this, "index"); |
| 1584 } | 1517 } |
| 1585 _setIndexedFloat64x2(index, value); | 1518 _setIndexedFloat64x2(index, value); |
| 1586 } | 1519 } |
| 1587 | 1520 |
| 1588 | 1521 |
| 1589 // Method(s) implementing the TypedData interface. | 1522 // Method(s) implementing the TypedData interface. |
| 1590 | 1523 |
| 1591 int get elementSizeInBytes { | 1524 int get elementSizeInBytes { |
| 1592 return Float64x2List.BYTES_PER_ELEMENT; | 1525 return Float64x2List.BYTES_PER_ELEMENT; |
| 1593 } | 1526 } |
| 1594 | 1527 |
| 1595 | 1528 |
| 1596 // Internal utility methods. | 1529 // Internal utility methods. |
| 1597 | 1530 |
| 1598 _Float64x2Array _createList(int length) { | 1531 _Float64x2Array _createList(int length) { |
| 1599 return _new(length); | 1532 return new _Float64x2Array(length); |
| 1600 } | 1533 } |
| 1601 | 1534 |
| 1602 Float64x2 _getIndexedFloat64x2(int index) { | 1535 Float64x2 _getIndexedFloat64x2(int index) { |
| 1603 return _getFloat64x2(index * Float64x2List.BYTES_PER_ELEMENT); | 1536 return _getFloat64x2(index * Float64x2List.BYTES_PER_ELEMENT); |
| 1604 } | 1537 } |
| 1605 | 1538 |
| 1606 void _setIndexedFloat64x2(int index, Float64x2 value) { | 1539 void _setIndexedFloat64x2(int index, Float64x2 value) { |
| 1607 _setFloat64x2(index * Float64x2List.BYTES_PER_ELEMENT, value); | 1540 _setFloat64x2(index * Float64x2List.BYTES_PER_ELEMENT, value); |
| 1608 } | 1541 } |
| 1609 | |
| 1610 static _Float64x2Array _new(int length) native "TypedData_Float64x2Array_new"; | |
| 1611 } | 1542 } |
| 1612 | 1543 |
| 1613 | 1544 |
| 1614 class _ExternalInt8Array extends _TypedList with _IntListMixin implements Int8Li
st { | 1545 class _ExternalInt8Array extends _TypedList with _IntListMixin implements Int8Li
st { |
| 1615 // Factory constructors. | 1546 // Factory constructors. |
| 1616 | 1547 |
| 1617 factory _ExternalInt8Array(int length) { | 1548 factory _ExternalInt8Array(int length) native "ExternalTypedData_Int8Array_new
"; |
| 1618 return _new(length); | |
| 1619 } | |
| 1620 | |
| 1621 | 1549 |
| 1622 // Method(s) implementing the List interface. | 1550 // Method(s) implementing the List interface. |
| 1623 int operator[](int index) { | 1551 int operator[](int index) { |
| 1624 if (index < 0 || index >= length) { | 1552 if (index < 0 || index >= length) { |
| 1625 throw new RangeError.index(index, this, "index"); | 1553 throw new RangeError.index(index, this, "index"); |
| 1626 } | 1554 } |
| 1627 return _getInt8(index); | 1555 return _getInt8(index); |
| 1628 } | 1556 } |
| 1629 | 1557 |
| 1630 void operator[]=(int index, int value) { | 1558 void operator[]=(int index, int value) { |
| 1631 if (index < 0 || index >= length) { | 1559 if (index < 0 || index >= length) { |
| 1632 throw new RangeError.index(index, this, "index"); | 1560 throw new RangeError.index(index, this, "index"); |
| 1633 } | 1561 } |
| 1634 _setInt8(index, value); | 1562 _setInt8(index, value); |
| 1635 } | 1563 } |
| 1636 | 1564 |
| 1637 | 1565 |
| 1638 // Method(s) implementing the TypedData interface. | 1566 // Method(s) implementing the TypedData interface. |
| 1639 | 1567 |
| 1640 int get elementSizeInBytes { | 1568 int get elementSizeInBytes { |
| 1641 return Int8List.BYTES_PER_ELEMENT; | 1569 return Int8List.BYTES_PER_ELEMENT; |
| 1642 } | 1570 } |
| 1643 | 1571 |
| 1644 | 1572 |
| 1645 // Internal utility methods. | 1573 // Internal utility methods. |
| 1646 | 1574 |
| 1647 Int8List _createList(int length) { | 1575 Int8List _createList(int length) { |
| 1648 return new Int8List(length); | 1576 return new Int8List(length); |
| 1649 } | 1577 } |
| 1650 | |
| 1651 static _ExternalInt8Array _new(int length) native | |
| 1652 "ExternalTypedData_Int8Array_new"; | |
| 1653 } | 1578 } |
| 1654 | 1579 |
| 1655 | 1580 |
| 1656 class _ExternalUint8Array extends _TypedList with _IntListMixin implements Uint8
List { | 1581 class _ExternalUint8Array extends _TypedList with _IntListMixin implements Uint8
List { |
| 1657 // Factory constructors. | 1582 // Factory constructors. |
| 1658 | 1583 |
| 1659 factory _ExternalUint8Array(int length) { | 1584 factory _ExternalUint8Array(int length) native "ExternalTypedData_Uint8Array_n
ew"; |
| 1660 return _new(length); | |
| 1661 } | |
| 1662 | |
| 1663 | 1585 |
| 1664 // Method(s) implementing the List interface. | 1586 // Method(s) implementing the List interface. |
| 1665 | 1587 |
| 1666 int operator[](int index) { | 1588 int operator[](int index) { |
| 1667 if (index < 0 || index >= length) { | 1589 if (index < 0 || index >= length) { |
| 1668 throw new RangeError.index(index, this, "index"); | 1590 throw new RangeError.index(index, this, "index"); |
| 1669 } | 1591 } |
| 1670 return _getUint8(index); | 1592 return _getUint8(index); |
| 1671 } | 1593 } |
| 1672 | 1594 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1683 int get elementSizeInBytes { | 1605 int get elementSizeInBytes { |
| 1684 return Uint8List.BYTES_PER_ELEMENT; | 1606 return Uint8List.BYTES_PER_ELEMENT; |
| 1685 } | 1607 } |
| 1686 | 1608 |
| 1687 | 1609 |
| 1688 // Internal utility methods. | 1610 // Internal utility methods. |
| 1689 | 1611 |
| 1690 Uint8List _createList(int length) { | 1612 Uint8List _createList(int length) { |
| 1691 return new Uint8List(length); | 1613 return new Uint8List(length); |
| 1692 } | 1614 } |
| 1693 | |
| 1694 static _ExternalUint8Array _new(int length) native | |
| 1695 "ExternalTypedData_Uint8Array_new"; | |
| 1696 } | 1615 } |
| 1697 | 1616 |
| 1698 | 1617 |
| 1699 class _ExternalUint8ClampedArray extends _TypedList with _IntListMixin implement
s Uint8ClampedList { | 1618 class _ExternalUint8ClampedArray extends _TypedList with _IntListMixin implement
s Uint8ClampedList { |
| 1700 // Factory constructors. | 1619 // Factory constructors. |
| 1701 | 1620 |
| 1702 factory _ExternalUint8ClampedArray(int length) { | 1621 factory _ExternalUint8ClampedArray(int length) native "ExternalTypedData_Uint8
ClampedArray_new"; |
| 1703 return _new(length); | |
| 1704 } | |
| 1705 | 1622 |
| 1706 // Method(s) implementing the List interface. | 1623 // Method(s) implementing the List interface. |
| 1707 | 1624 |
| 1708 int operator[](int index) { | 1625 int operator[](int index) { |
| 1709 if (index < 0 || index >= length) { | 1626 if (index < 0 || index >= length) { |
| 1710 throw new RangeError.index(index, this, "index"); | 1627 throw new RangeError.index(index, this, "index"); |
| 1711 } | 1628 } |
| 1712 return _getUint8(index); | 1629 return _getUint8(index); |
| 1713 } | 1630 } |
| 1714 | 1631 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1725 int get elementSizeInBytes { | 1642 int get elementSizeInBytes { |
| 1726 return Uint8List.BYTES_PER_ELEMENT; | 1643 return Uint8List.BYTES_PER_ELEMENT; |
| 1727 } | 1644 } |
| 1728 | 1645 |
| 1729 | 1646 |
| 1730 // Internal utility methods. | 1647 // Internal utility methods. |
| 1731 | 1648 |
| 1732 Uint8ClampedList _createList(int length) { | 1649 Uint8ClampedList _createList(int length) { |
| 1733 return new Uint8ClampedList(length); | 1650 return new Uint8ClampedList(length); |
| 1734 } | 1651 } |
| 1735 | |
| 1736 static _ExternalUint8ClampedArray _new(int length) native | |
| 1737 "ExternalTypedData_Uint8ClampedArray_new"; | |
| 1738 } | 1652 } |
| 1739 | 1653 |
| 1740 | 1654 |
| 1741 class _ExternalInt16Array extends _TypedList with _IntListMixin implements Int16
List { | 1655 class _ExternalInt16Array extends _TypedList with _IntListMixin implements Int16
List { |
| 1742 // Factory constructors. | 1656 // Factory constructors. |
| 1743 | 1657 |
| 1744 factory _ExternalInt16Array(int length) { | 1658 factory _ExternalInt16Array(int length) native "ExternalTypedData_Int16Array_n
ew"; |
| 1745 return _new(length); | |
| 1746 } | |
| 1747 | |
| 1748 | 1659 |
| 1749 // Method(s) implementing the List interface. | 1660 // Method(s) implementing the List interface. |
| 1750 | 1661 |
| 1751 int operator[](int index) { | 1662 int operator[](int index) { |
| 1752 if (index < 0 || index >= length) { | 1663 if (index < 0 || index >= length) { |
| 1753 throw new RangeError.index(index, this, "index"); | 1664 throw new RangeError.index(index, this, "index"); |
| 1754 } | 1665 } |
| 1755 return _getIndexedInt16(index); | 1666 return _getIndexedInt16(index); |
| 1756 } | 1667 } |
| 1757 | 1668 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1776 return new Int16List(length); | 1687 return new Int16List(length); |
| 1777 } | 1688 } |
| 1778 | 1689 |
| 1779 int _getIndexedInt16(int index) { | 1690 int _getIndexedInt16(int index) { |
| 1780 return _getInt16(index * Int16List.BYTES_PER_ELEMENT); | 1691 return _getInt16(index * Int16List.BYTES_PER_ELEMENT); |
| 1781 } | 1692 } |
| 1782 | 1693 |
| 1783 void _setIndexedInt16(int index, int value) { | 1694 void _setIndexedInt16(int index, int value) { |
| 1784 _setInt16(index * Int16List.BYTES_PER_ELEMENT, value); | 1695 _setInt16(index * Int16List.BYTES_PER_ELEMENT, value); |
| 1785 } | 1696 } |
| 1786 | |
| 1787 static _ExternalInt16Array _new(int length) native | |
| 1788 "ExternalTypedData_Int16Array_new"; | |
| 1789 } | 1697 } |
| 1790 | 1698 |
| 1791 | 1699 |
| 1792 class _ExternalUint16Array extends _TypedList with _IntListMixin implements Uint
16List { | 1700 class _ExternalUint16Array extends _TypedList with _IntListMixin implements Uint
16List { |
| 1793 // Factory constructors. | 1701 // Factory constructors. |
| 1794 | 1702 |
| 1795 factory _ExternalUint16Array(int length) { | 1703 factory _ExternalUint16Array(int length) native "ExternalTypedData_Uint16Array
_new"; |
| 1796 return _new(length); | |
| 1797 } | |
| 1798 | |
| 1799 | 1704 |
| 1800 // Method(s) implementing the List interface. | 1705 // Method(s) implementing the List interface. |
| 1801 | 1706 |
| 1802 int operator[](int index) { | 1707 int operator[](int index) { |
| 1803 if (index < 0 || index >= length) { | 1708 if (index < 0 || index >= length) { |
| 1804 throw new RangeError.index(index, this, "index"); | 1709 throw new RangeError.index(index, this, "index"); |
| 1805 } | 1710 } |
| 1806 return _getIndexedUint16(index); | 1711 return _getIndexedUint16(index); |
| 1807 } | 1712 } |
| 1808 | 1713 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1827 return new Uint16List(length); | 1732 return new Uint16List(length); |
| 1828 } | 1733 } |
| 1829 | 1734 |
| 1830 int _getIndexedUint16(int index) { | 1735 int _getIndexedUint16(int index) { |
| 1831 return _getUint16(index * Uint16List.BYTES_PER_ELEMENT); | 1736 return _getUint16(index * Uint16List.BYTES_PER_ELEMENT); |
| 1832 } | 1737 } |
| 1833 | 1738 |
| 1834 void _setIndexedUint16(int index, int value) { | 1739 void _setIndexedUint16(int index, int value) { |
| 1835 _setUint16(index * Uint16List.BYTES_PER_ELEMENT, value); | 1740 _setUint16(index * Uint16List.BYTES_PER_ELEMENT, value); |
| 1836 } | 1741 } |
| 1837 | |
| 1838 static _ExternalUint16Array _new(int length) native | |
| 1839 "ExternalTypedData_Uint16Array_new"; | |
| 1840 } | 1742 } |
| 1841 | 1743 |
| 1842 | 1744 |
| 1843 class _ExternalInt32Array extends _TypedList with _IntListMixin implements Int32
List { | 1745 class _ExternalInt32Array extends _TypedList with _IntListMixin implements Int32
List { |
| 1844 // Factory constructors. | 1746 // Factory constructors. |
| 1845 | 1747 |
| 1846 factory _ExternalInt32Array(int length) { | 1748 factory _ExternalInt32Array(int length) native "ExternalTypedData_Int32Array_n
ew"; |
| 1847 return _new(length); | |
| 1848 } | |
| 1849 | |
| 1850 | 1749 |
| 1851 // Method(s) implementing the List interface. | 1750 // Method(s) implementing the List interface. |
| 1852 | 1751 |
| 1853 int operator[](int index) { | 1752 int operator[](int index) { |
| 1854 if (index < 0 || index >= length) { | 1753 if (index < 0 || index >= length) { |
| 1855 throw new RangeError.index(index, this, "index"); | 1754 throw new RangeError.index(index, this, "index"); |
| 1856 } | 1755 } |
| 1857 return _getIndexedInt32(index); | 1756 return _getIndexedInt32(index); |
| 1858 } | 1757 } |
| 1859 | 1758 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1878 return new Int32List(length); | 1777 return new Int32List(length); |
| 1879 } | 1778 } |
| 1880 | 1779 |
| 1881 int _getIndexedInt32(int index) { | 1780 int _getIndexedInt32(int index) { |
| 1882 return _getInt32(index * Int32List.BYTES_PER_ELEMENT); | 1781 return _getInt32(index * Int32List.BYTES_PER_ELEMENT); |
| 1883 } | 1782 } |
| 1884 | 1783 |
| 1885 void _setIndexedInt32(int index, int value) { | 1784 void _setIndexedInt32(int index, int value) { |
| 1886 _setInt32(index * Int32List.BYTES_PER_ELEMENT, value); | 1785 _setInt32(index * Int32List.BYTES_PER_ELEMENT, value); |
| 1887 } | 1786 } |
| 1888 | |
| 1889 static _ExternalInt32Array _new(int length) native | |
| 1890 "ExternalTypedData_Int32Array_new"; | |
| 1891 } | 1787 } |
| 1892 | 1788 |
| 1893 | 1789 |
| 1894 class _ExternalUint32Array extends _TypedList with _IntListMixin implements Uint
32List { | 1790 class _ExternalUint32Array extends _TypedList with _IntListMixin implements Uint
32List { |
| 1895 // Factory constructors. | 1791 // Factory constructors. |
| 1896 | 1792 |
| 1897 factory _ExternalUint32Array(int length) { | 1793 factory _ExternalUint32Array(int length) native "ExternalTypedData_Uint32Array
_new"; |
| 1898 return _new(length); | |
| 1899 } | |
| 1900 | |
| 1901 | 1794 |
| 1902 // Method(s) implementing the List interface. | 1795 // Method(s) implementing the List interface. |
| 1903 | 1796 |
| 1904 int operator[](int index) { | 1797 int operator[](int index) { |
| 1905 if (index < 0 || index >= length) { | 1798 if (index < 0 || index >= length) { |
| 1906 throw new RangeError.index(index, this, "index"); | 1799 throw new RangeError.index(index, this, "index"); |
| 1907 } | 1800 } |
| 1908 return _getIndexedUint32(index); | 1801 return _getIndexedUint32(index); |
| 1909 } | 1802 } |
| 1910 | 1803 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1929 return new Uint32List(length); | 1822 return new Uint32List(length); |
| 1930 } | 1823 } |
| 1931 | 1824 |
| 1932 int _getIndexedUint32(int index) { | 1825 int _getIndexedUint32(int index) { |
| 1933 return _getUint32(index * Uint32List.BYTES_PER_ELEMENT); | 1826 return _getUint32(index * Uint32List.BYTES_PER_ELEMENT); |
| 1934 } | 1827 } |
| 1935 | 1828 |
| 1936 void _setIndexedUint32(int index, int value) { | 1829 void _setIndexedUint32(int index, int value) { |
| 1937 _setUint32(index * Uint32List.BYTES_PER_ELEMENT, value); | 1830 _setUint32(index * Uint32List.BYTES_PER_ELEMENT, value); |
| 1938 } | 1831 } |
| 1939 | |
| 1940 static _ExternalUint32Array _new(int length) native | |
| 1941 "ExternalTypedData_Uint32Array_new"; | |
| 1942 } | 1832 } |
| 1943 | 1833 |
| 1944 | 1834 |
| 1945 class _ExternalInt64Array extends _TypedList with _IntListMixin implements Int64
List { | 1835 class _ExternalInt64Array extends _TypedList with _IntListMixin implements Int64
List { |
| 1946 // Factory constructors. | 1836 // Factory constructors. |
| 1947 | 1837 |
| 1948 factory _ExternalInt64Array(int length) { | 1838 factory _ExternalInt64Array(int length) native "ExternalTypedData_Int64Array_n
ew"; |
| 1949 return _new(length); | |
| 1950 } | |
| 1951 | |
| 1952 | 1839 |
| 1953 // Method(s) implementing the List interface. | 1840 // Method(s) implementing the List interface. |
| 1954 | 1841 |
| 1955 int operator[](int index) { | 1842 int operator[](int index) { |
| 1956 if (index < 0 || index >= length) { | 1843 if (index < 0 || index >= length) { |
| 1957 throw new RangeError.index(index, this, "index"); | 1844 throw new RangeError.index(index, this, "index"); |
| 1958 } | 1845 } |
| 1959 return _getIndexedInt64(index); | 1846 return _getIndexedInt64(index); |
| 1960 } | 1847 } |
| 1961 | 1848 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1980 return new Int64List(length); | 1867 return new Int64List(length); |
| 1981 } | 1868 } |
| 1982 | 1869 |
| 1983 int _getIndexedInt64(int index) { | 1870 int _getIndexedInt64(int index) { |
| 1984 return _getInt64(index * Int64List.BYTES_PER_ELEMENT); | 1871 return _getInt64(index * Int64List.BYTES_PER_ELEMENT); |
| 1985 } | 1872 } |
| 1986 | 1873 |
| 1987 void _setIndexedInt64(int index, int value) { | 1874 void _setIndexedInt64(int index, int value) { |
| 1988 _setInt64(index * Int64List.BYTES_PER_ELEMENT, value); | 1875 _setInt64(index * Int64List.BYTES_PER_ELEMENT, value); |
| 1989 } | 1876 } |
| 1990 | |
| 1991 static _ExternalInt64Array _new(int length) native | |
| 1992 "ExternalTypedData_Int64Array_new"; | |
| 1993 } | 1877 } |
| 1994 | 1878 |
| 1995 | 1879 |
| 1996 class _ExternalUint64Array extends _TypedList with _IntListMixin implements Uint
64List { | 1880 class _ExternalUint64Array extends _TypedList with _IntListMixin implements Uint
64List { |
| 1997 // Factory constructors. | 1881 // Factory constructors. |
| 1998 | 1882 |
| 1999 factory _ExternalUint64Array(int length) { | 1883 factory _ExternalUint64Array(int length) native "ExternalTypedData_Uint64Array
_new"; |
| 2000 return _new(length); | |
| 2001 } | |
| 2002 | |
| 2003 | 1884 |
| 2004 // Method(s) implementing the List interface. | 1885 // Method(s) implementing the List interface. |
| 2005 | 1886 |
| 2006 int operator[](int index) { | 1887 int operator[](int index) { |
| 2007 if (index < 0 || index >= length) { | 1888 if (index < 0 || index >= length) { |
| 2008 throw new RangeError.index(index, this, "index"); | 1889 throw new RangeError.index(index, this, "index"); |
| 2009 } | 1890 } |
| 2010 return _getIndexedUint64(index); | 1891 return _getIndexedUint64(index); |
| 2011 } | 1892 } |
| 2012 | 1893 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2031 return new Uint64List(length); | 1912 return new Uint64List(length); |
| 2032 } | 1913 } |
| 2033 | 1914 |
| 2034 int _getIndexedUint64(int index) { | 1915 int _getIndexedUint64(int index) { |
| 2035 return _getUint64(index * Uint64List.BYTES_PER_ELEMENT); | 1916 return _getUint64(index * Uint64List.BYTES_PER_ELEMENT); |
| 2036 } | 1917 } |
| 2037 | 1918 |
| 2038 void _setIndexedUint64(int index, int value) { | 1919 void _setIndexedUint64(int index, int value) { |
| 2039 _setUint64(index * Uint64List.BYTES_PER_ELEMENT, value); | 1920 _setUint64(index * Uint64List.BYTES_PER_ELEMENT, value); |
| 2040 } | 1921 } |
| 2041 | |
| 2042 static _ExternalUint64Array _new(int length) native | |
| 2043 "ExternalTypedData_Uint64Array_new"; | |
| 2044 } | 1922 } |
| 2045 | 1923 |
| 2046 | 1924 |
| 2047 class _ExternalFloat32Array extends _TypedList with _DoubleListMixin implements
Float32List { | 1925 class _ExternalFloat32Array extends _TypedList with _DoubleListMixin implements
Float32List { |
| 2048 // Factory constructors. | 1926 // Factory constructors. |
| 2049 | 1927 |
| 2050 factory _ExternalFloat32Array(int length) { | 1928 factory _ExternalFloat32Array(int length) native "ExternalTypedData_Float32Arr
ay_new"; |
| 2051 return _new(length); | |
| 2052 } | |
| 2053 | |
| 2054 | 1929 |
| 2055 // Method(s) implementing the List interface. | 1930 // Method(s) implementing the List interface. |
| 2056 | 1931 |
| 2057 double operator[](int index) { | 1932 double operator[](int index) { |
| 2058 if (index < 0 || index >= length) { | 1933 if (index < 0 || index >= length) { |
| 2059 throw new RangeError.index(index, this, "index"); | 1934 throw new RangeError.index(index, this, "index"); |
| 2060 } | 1935 } |
| 2061 return _getIndexedFloat32(index); | 1936 return _getIndexedFloat32(index); |
| 2062 } | 1937 } |
| 2063 | 1938 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2082 return new Float32List(length); | 1957 return new Float32List(length); |
| 2083 } | 1958 } |
| 2084 | 1959 |
| 2085 double _getIndexedFloat32(int index) { | 1960 double _getIndexedFloat32(int index) { |
| 2086 return _getFloat32(index * Float32List.BYTES_PER_ELEMENT); | 1961 return _getFloat32(index * Float32List.BYTES_PER_ELEMENT); |
| 2087 } | 1962 } |
| 2088 | 1963 |
| 2089 void _setIndexedFloat32(int index, double value) { | 1964 void _setIndexedFloat32(int index, double value) { |
| 2090 _setFloat32(index * Float32List.BYTES_PER_ELEMENT, value); | 1965 _setFloat32(index * Float32List.BYTES_PER_ELEMENT, value); |
| 2091 } | 1966 } |
| 2092 | |
| 2093 static _ExternalFloat32Array _new(int length) native | |
| 2094 "ExternalTypedData_Float32Array_new"; | |
| 2095 } | 1967 } |
| 2096 | 1968 |
| 2097 | 1969 |
| 2098 class _ExternalFloat64Array extends _TypedList with _DoubleListMixin implements
Float64List { | 1970 class _ExternalFloat64Array extends _TypedList with _DoubleListMixin implements
Float64List { |
| 2099 // Factory constructors. | 1971 // Factory constructors. |
| 2100 | 1972 |
| 2101 factory _ExternalFloat64Array(int length) { | 1973 factory _ExternalFloat64Array(int length) native "ExternalTypedData_Float64Arr
ay_new"; |
| 2102 return _new(length); | |
| 2103 } | |
| 2104 | |
| 2105 | 1974 |
| 2106 // Method(s) implementing the List interface. | 1975 // Method(s) implementing the List interface. |
| 2107 | 1976 |
| 2108 double operator[](int index) { | 1977 double operator[](int index) { |
| 2109 if (index < 0 || index >= length) { | 1978 if (index < 0 || index >= length) { |
| 2110 throw new RangeError.index(index, this, "index"); | 1979 throw new RangeError.index(index, this, "index"); |
| 2111 } | 1980 } |
| 2112 return _getIndexedFloat64(index); | 1981 return _getIndexedFloat64(index); |
| 2113 } | 1982 } |
| 2114 | 1983 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2133 return new Float64List(length); | 2002 return new Float64List(length); |
| 2134 } | 2003 } |
| 2135 | 2004 |
| 2136 double _getIndexedFloat64(int index) { | 2005 double _getIndexedFloat64(int index) { |
| 2137 return _getFloat64(index * Float64List.BYTES_PER_ELEMENT); | 2006 return _getFloat64(index * Float64List.BYTES_PER_ELEMENT); |
| 2138 } | 2007 } |
| 2139 | 2008 |
| 2140 void _setIndexedFloat64(int index, double value) { | 2009 void _setIndexedFloat64(int index, double value) { |
| 2141 _setFloat64(index * Float64List.BYTES_PER_ELEMENT, value); | 2010 _setFloat64(index * Float64List.BYTES_PER_ELEMENT, value); |
| 2142 } | 2011 } |
| 2143 | |
| 2144 static _ExternalFloat64Array _new(int length) native | |
| 2145 "ExternalTypedData_Float64Array_new"; | |
| 2146 } | 2012 } |
| 2147 | 2013 |
| 2148 | 2014 |
| 2149 class _ExternalFloat32x4Array extends _TypedList with _Float32x4ListMixin implem
ents Float32x4List { | 2015 class _ExternalFloat32x4Array extends _TypedList with _Float32x4ListMixin implem
ents Float32x4List { |
| 2150 // Factory constructors. | 2016 // Factory constructors. |
| 2151 | 2017 |
| 2152 factory _ExternalFloat32x4Array(int length) { | 2018 factory _ExternalFloat32x4Array(int length) native "ExternalTypedData_Float32x
4Array_new"; |
| 2153 return _new(length); | |
| 2154 } | |
| 2155 | |
| 2156 | 2019 |
| 2157 // Method(s) implementing the List interface. | 2020 // Method(s) implementing the List interface. |
| 2158 | 2021 |
| 2159 Float32x4 operator[](int index) { | 2022 Float32x4 operator[](int index) { |
| 2160 if (index < 0 || index >= length) { | 2023 if (index < 0 || index >= length) { |
| 2161 throw new RangeError.index(index, this, "index"); | 2024 throw new RangeError.index(index, this, "index"); |
| 2162 } | 2025 } |
| 2163 return _getIndexedFloat32x4(index); | 2026 return _getIndexedFloat32x4(index); |
| 2164 } | 2027 } |
| 2165 | 2028 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2184 return new Float32x4List(length); | 2047 return new Float32x4List(length); |
| 2185 } | 2048 } |
| 2186 | 2049 |
| 2187 Float32x4 _getIndexedFloat32x4(int index) { | 2050 Float32x4 _getIndexedFloat32x4(int index) { |
| 2188 return _getFloat32x4(index * Float32x4List.BYTES_PER_ELEMENT); | 2051 return _getFloat32x4(index * Float32x4List.BYTES_PER_ELEMENT); |
| 2189 } | 2052 } |
| 2190 | 2053 |
| 2191 void _setIndexedFloat32x4(int index, Float32x4 value) { | 2054 void _setIndexedFloat32x4(int index, Float32x4 value) { |
| 2192 _setFloat32x4(index * Float32x4List.BYTES_PER_ELEMENT, value); | 2055 _setFloat32x4(index * Float32x4List.BYTES_PER_ELEMENT, value); |
| 2193 } | 2056 } |
| 2194 | |
| 2195 static _ExternalFloat32x4Array _new(int length) native | |
| 2196 "ExternalTypedData_Float32x4Array_new"; | |
| 2197 } | 2057 } |
| 2198 | 2058 |
| 2199 | 2059 |
| 2200 class _ExternalInt32x4Array extends _TypedList with _Int32x4ListMixin implements
Int32x4List { | 2060 class _ExternalInt32x4Array extends _TypedList with _Int32x4ListMixin implements
Int32x4List { |
| 2201 // Factory constructors. | 2061 // Factory constructors. |
| 2202 | 2062 |
| 2203 factory _ExternalInt32x4Array(int length) { | 2063 factory _ExternalInt32x4Array(int length) native "ExternalTypedData_Int32x4Arr
ay_new"; |
| 2204 return _new(length); | |
| 2205 } | |
| 2206 | |
| 2207 | 2064 |
| 2208 // Method(s) implementing the List interface. | 2065 // Method(s) implementing the List interface. |
| 2209 | 2066 |
| 2210 Int32x4 operator[](int index) { | 2067 Int32x4 operator[](int index) { |
| 2211 if (index < 0 || index >= length) { | 2068 if (index < 0 || index >= length) { |
| 2212 throw new RangeError.index(index, this, "index"); | 2069 throw new RangeError.index(index, this, "index"); |
| 2213 } | 2070 } |
| 2214 return _getIndexedInt32x4(index); | 2071 return _getIndexedInt32x4(index); |
| 2215 } | 2072 } |
| 2216 | 2073 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2235 return new Int32x4List(length); | 2092 return new Int32x4List(length); |
| 2236 } | 2093 } |
| 2237 | 2094 |
| 2238 Int32x4 _getIndexedInt32x4(int index) { | 2095 Int32x4 _getIndexedInt32x4(int index) { |
| 2239 return _getInt32x4(index * Int32x4List.BYTES_PER_ELEMENT); | 2096 return _getInt32x4(index * Int32x4List.BYTES_PER_ELEMENT); |
| 2240 } | 2097 } |
| 2241 | 2098 |
| 2242 void _setIndexedInt32x4(int index, Int32x4 value) { | 2099 void _setIndexedInt32x4(int index, Int32x4 value) { |
| 2243 _setInt32x4(index * Int32x4List.BYTES_PER_ELEMENT, value); | 2100 _setInt32x4(index * Int32x4List.BYTES_PER_ELEMENT, value); |
| 2244 } | 2101 } |
| 2245 | |
| 2246 static _ExternalInt32x4Array _new(int length) native | |
| 2247 "ExternalTypedData_Int32x4Array_new"; | |
| 2248 } | 2102 } |
| 2249 | 2103 |
| 2250 | 2104 |
| 2251 class _ExternalFloat64x2Array extends _TypedList with _Float64x2ListMixin implem
ents Float64x2List { | 2105 class _ExternalFloat64x2Array extends _TypedList with _Float64x2ListMixin implem
ents Float64x2List { |
| 2252 // Factory constructors. | 2106 // Factory constructors. |
| 2253 | 2107 |
| 2254 factory _ExternalFloat64x2Array(int length) { | 2108 factory _ExternalFloat64x2Array(int length) native "ExternalTypedData_Float64x
2Array_new"; |
| 2255 return _new(length); | |
| 2256 } | |
| 2257 | |
| 2258 | 2109 |
| 2259 // Method(s) implementing the List interface. | 2110 // Method(s) implementing the List interface. |
| 2260 | 2111 |
| 2261 Float64x2 operator[](int index) { | 2112 Float64x2 operator[](int index) { |
| 2262 if (index < 0 || index >= length) { | 2113 if (index < 0 || index >= length) { |
| 2263 throw new RangeError.index(index, this, "index"); | 2114 throw new RangeError.index(index, this, "index"); |
| 2264 } | 2115 } |
| 2265 return _getIndexedFloat64x2(index); | 2116 return _getIndexedFloat64x2(index); |
| 2266 } | 2117 } |
| 2267 | 2118 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2286 return new Float64x2List(length); | 2137 return new Float64x2List(length); |
| 2287 } | 2138 } |
| 2288 | 2139 |
| 2289 Float64x2 _getIndexedFloat64x2(int index) { | 2140 Float64x2 _getIndexedFloat64x2(int index) { |
| 2290 return _getFloat64x2(index * Float64x2List.BYTES_PER_ELEMENT); | 2141 return _getFloat64x2(index * Float64x2List.BYTES_PER_ELEMENT); |
| 2291 } | 2142 } |
| 2292 | 2143 |
| 2293 void _setIndexedFloat64x2(int index, Float64x2 value) { | 2144 void _setIndexedFloat64x2(int index, Float64x2 value) { |
| 2294 _setFloat64x2(index * Float64x2List.BYTES_PER_ELEMENT, value); | 2145 _setFloat64x2(index * Float64x2List.BYTES_PER_ELEMENT, value); |
| 2295 } | 2146 } |
| 2296 | |
| 2297 static _ExternalFloat64x2Array _new(int length) native | |
| 2298 "ExternalTypedData_Float64x2Array_new"; | |
| 2299 } | 2147 } |
| 2300 | 2148 |
| 2301 | 2149 |
| 2302 class _Float32x4 implements Float32x4 { | 2150 class _Float32x4 implements Float32x4 { |
| 2303 factory _Float32x4(double x, double y, double z, double w) | 2151 factory _Float32x4(double x, double y, double z, double w) |
| 2304 native "Float32x4_fromDoubles"; | 2152 native "Float32x4_fromDoubles"; |
| 2305 factory _Float32x4.splat(double v) native "Float32x4_splat"; | 2153 factory _Float32x4.splat(double v) native "Float32x4_splat"; |
| 2306 factory _Float32x4.zero() native "Float32x4_zero"; | 2154 factory _Float32x4.zero() native "Float32x4_zero"; |
| 2307 factory _Float32x4.fromInt32x4Bits(Int32x4 x) | 2155 factory _Float32x4.fromInt32x4Bits(Int32x4 x) |
| 2308 native "Float32x4_fromInt32x4Bits"; | 2156 native "Float32x4_fromInt32x4Bits"; |
| (...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3608 } | 3456 } |
| 3609 } | 3457 } |
| 3610 | 3458 |
| 3611 | 3459 |
| 3612 int _defaultIfNull(object, value) { | 3460 int _defaultIfNull(object, value) { |
| 3613 if (object == null) { | 3461 if (object == null) { |
| 3614 return value; | 3462 return value; |
| 3615 } | 3463 } |
| 3616 return object; | 3464 return object; |
| 3617 } | 3465 } |
| OLD | NEW |