OLD | NEW |
1 var typed_data = dart.defineLibrary(typed_data, {}); | 1 var typed_data = dart.defineLibrary(typed_data, {}); |
2 var core = dart.import(core); | 2 var core = dart.import(core); |
3 var _native_typed_data = dart.lazyImport(_native_typed_data); | 3 var _native_typed_data = dart.lazyImport(_native_typed_data); |
4 (function(exports, core, _native_typed_data) { | 4 (function(exports, core, _native_typed_data) { |
5 'use strict'; | 5 'use strict'; |
6 class ByteBuffer extends core.Object {} | 6 class ByteBuffer extends core.Object {} |
7 class TypedData extends core.Object {} | 7 class TypedData extends core.Object {} |
8 let _littleEndian = Symbol('_littleEndian'); | 8 let _littleEndian = Symbol('_littleEndian'); |
9 class Endianness extends core.Object { | 9 class Endianness extends core.Object { |
10 _(littleEndian) { | 10 _(littleEndian) { |
11 this[_littleEndian] = littleEndian; | 11 this[_littleEndian] = littleEndian; |
12 } | 12 } |
13 } | 13 } |
14 dart.defineNamedConstructor(Endianness, '_'); | 14 dart.defineNamedConstructor(Endianness, '_'); |
15 dart.setSignature(Endianness, { | 15 dart.setSignature(Endianness, { |
16 constructors: () => ({_: [Endianness, [core.bool]]}) | 16 constructors: () => ({_: [Endianness, [core.bool]]}) |
17 }); | 17 }); |
18 Endianness.BIG_ENDIAN = dart.const(new Endianness._(false)); | 18 Endianness.BIG_ENDIAN = dart.const(new Endianness._(false)); |
19 Endianness.LITTLE_ENDIAN = dart.const(new Endianness._(true)); | 19 Endianness.LITTLE_ENDIAN = dart.const(new Endianness._(true)); |
20 dart.defineLazyProperties(Endianness, { | 20 dart.defineLazyProperties(Endianness, { |
21 get HOST_ENDIAN() { | 21 get HOST_ENDIAN() { |
22 return new ByteData.view(new Uint16List.fromList(dart.setType([1], core.Li
st$(core.int))).buffer).getInt8(0) == 1 ? Endianness.LITTLE_ENDIAN : Endianness.
BIG_ENDIAN; | 22 return ByteData.view(Uint16List.fromList(dart.setType([1], core.List$(core
.int))).buffer).getInt8(0) == 1 ? Endianness.LITTLE_ENDIAN : Endianness.BIG_ENDI
AN; |
23 } | 23 } |
24 }); | 24 }); |
25 class ByteData extends core.Object { | 25 class ByteData extends core.Object { |
26 ByteData(length) { | 26 static new(length) { |
27 return new _native_typed_data.NativeByteData(length); | 27 return _native_typed_data.NativeByteData.new(length); |
28 } | 28 } |
29 view(buffer, offsetInBytes, length) { | 29 static view(buffer, offsetInBytes, length) { |
30 if (offsetInBytes === void 0) | 30 if (offsetInBytes === void 0) |
31 offsetInBytes = 0; | 31 offsetInBytes = 0; |
32 if (length === void 0) | 32 if (length === void 0) |
33 length = null; | 33 length = null; |
34 return buffer.asByteData(offsetInBytes, length); | 34 return buffer.asByteData(offsetInBytes, length); |
35 } | 35 } |
36 } | 36 } |
37 ByteData[dart.implements] = () => [TypedData]; | 37 ByteData[dart.implements] = () => [TypedData]; |
38 dart.defineNamedConstructor(ByteData, 'view'); | |
39 dart.setSignature(ByteData, { | 38 dart.setSignature(ByteData, { |
40 constructors: () => ({ | 39 constructors: () => ({ |
41 ByteData: [ByteData, [core.int]], | 40 new: [ByteData, [core.int]], |
42 view: [ByteData, [ByteBuffer], [core.int, core.int]] | 41 view: [ByteData, [ByteBuffer], [core.int, core.int]] |
43 }) | 42 }) |
44 }); | 43 }); |
45 class Int8List extends core.Object { | 44 class Int8List extends core.Object { |
46 Int8List(length) { | 45 static new(length) { |
47 return new _native_typed_data.NativeInt8List(length); | 46 return _native_typed_data.NativeInt8List.new(length); |
48 } | 47 } |
49 fromList(elements) { | 48 static fromList(elements) { |
50 return new _native_typed_data.NativeInt8List.fromList(elements); | 49 return _native_typed_data.NativeInt8List.fromList(elements); |
51 } | 50 } |
52 view(buffer, offsetInBytes, length) { | 51 static view(buffer, offsetInBytes, length) { |
53 if (offsetInBytes === void 0) | 52 if (offsetInBytes === void 0) |
54 offsetInBytes = 0; | 53 offsetInBytes = 0; |
55 if (length === void 0) | 54 if (length === void 0) |
56 length = null; | 55 length = null; |
57 return buffer.asInt8List(offsetInBytes, length); | 56 return buffer.asInt8List(offsetInBytes, length); |
58 } | 57 } |
59 } | 58 } |
60 Int8List[dart.implements] = () => [core.List$(core.int), TypedData]; | 59 Int8List[dart.implements] = () => [core.List$(core.int), TypedData]; |
61 dart.defineNamedConstructor(Int8List, 'fromList'); | |
62 dart.defineNamedConstructor(Int8List, 'view'); | |
63 dart.setSignature(Int8List, { | 60 dart.setSignature(Int8List, { |
64 constructors: () => ({ | 61 constructors: () => ({ |
65 Int8List: [Int8List, [core.int]], | 62 new: [Int8List, [core.int]], |
66 fromList: [Int8List, [core.List$(core.int)]], | 63 fromList: [Int8List, [core.List$(core.int)]], |
67 view: [Int8List, [ByteBuffer], [core.int, core.int]] | 64 view: [Int8List, [ByteBuffer], [core.int, core.int]] |
68 }) | 65 }) |
69 }); | 66 }); |
70 Int8List.BYTES_PER_ELEMENT = 1; | 67 Int8List.BYTES_PER_ELEMENT = 1; |
71 class Uint8List extends core.Object { | 68 class Uint8List extends core.Object { |
72 Uint8List(length) { | 69 static new(length) { |
73 return new _native_typed_data.NativeUint8List(length); | 70 return _native_typed_data.NativeUint8List.new(length); |
74 } | 71 } |
75 fromList(elements) { | 72 static fromList(elements) { |
76 return new _native_typed_data.NativeUint8List.fromList(elements); | 73 return _native_typed_data.NativeUint8List.fromList(elements); |
77 } | 74 } |
78 view(buffer, offsetInBytes, length) { | 75 static view(buffer, offsetInBytes, length) { |
79 if (offsetInBytes === void 0) | 76 if (offsetInBytes === void 0) |
80 offsetInBytes = 0; | 77 offsetInBytes = 0; |
81 if (length === void 0) | 78 if (length === void 0) |
82 length = null; | 79 length = null; |
83 return buffer.asUint8List(offsetInBytes, length); | 80 return buffer.asUint8List(offsetInBytes, length); |
84 } | 81 } |
85 } | 82 } |
86 Uint8List[dart.implements] = () => [core.List$(core.int), TypedData]; | 83 Uint8List[dart.implements] = () => [core.List$(core.int), TypedData]; |
87 dart.defineNamedConstructor(Uint8List, 'fromList'); | |
88 dart.defineNamedConstructor(Uint8List, 'view'); | |
89 dart.setSignature(Uint8List, { | 84 dart.setSignature(Uint8List, { |
90 constructors: () => ({ | 85 constructors: () => ({ |
91 Uint8List: [Uint8List, [core.int]], | 86 new: [Uint8List, [core.int]], |
92 fromList: [Uint8List, [core.List$(core.int)]], | 87 fromList: [Uint8List, [core.List$(core.int)]], |
93 view: [Uint8List, [ByteBuffer], [core.int, core.int]] | 88 view: [Uint8List, [ByteBuffer], [core.int, core.int]] |
94 }) | 89 }) |
95 }); | 90 }); |
96 Uint8List.BYTES_PER_ELEMENT = 1; | 91 Uint8List.BYTES_PER_ELEMENT = 1; |
97 class Uint8ClampedList extends core.Object { | 92 class Uint8ClampedList extends core.Object { |
98 Uint8ClampedList(length) { | 93 static new(length) { |
99 return new _native_typed_data.NativeUint8ClampedList(length); | 94 return _native_typed_data.NativeUint8ClampedList.new(length); |
100 } | 95 } |
101 fromList(elements) { | 96 static fromList(elements) { |
102 return new _native_typed_data.NativeUint8ClampedList.fromList(elements); | 97 return _native_typed_data.NativeUint8ClampedList.fromList(elements); |
103 } | 98 } |
104 view(buffer, offsetInBytes, length) { | 99 static view(buffer, offsetInBytes, length) { |
105 if (offsetInBytes === void 0) | 100 if (offsetInBytes === void 0) |
106 offsetInBytes = 0; | 101 offsetInBytes = 0; |
107 if (length === void 0) | 102 if (length === void 0) |
108 length = null; | 103 length = null; |
109 return buffer.asUint8ClampedList(offsetInBytes, length); | 104 return buffer.asUint8ClampedList(offsetInBytes, length); |
110 } | 105 } |
111 } | 106 } |
112 Uint8ClampedList[dart.implements] = () => [core.List$(core.int), TypedData]; | 107 Uint8ClampedList[dart.implements] = () => [core.List$(core.int), TypedData]; |
113 dart.defineNamedConstructor(Uint8ClampedList, 'fromList'); | |
114 dart.defineNamedConstructor(Uint8ClampedList, 'view'); | |
115 dart.setSignature(Uint8ClampedList, { | 108 dart.setSignature(Uint8ClampedList, { |
116 constructors: () => ({ | 109 constructors: () => ({ |
117 Uint8ClampedList: [Uint8ClampedList, [core.int]], | 110 new: [Uint8ClampedList, [core.int]], |
118 fromList: [Uint8ClampedList, [core.List$(core.int)]], | 111 fromList: [Uint8ClampedList, [core.List$(core.int)]], |
119 view: [Uint8ClampedList, [ByteBuffer], [core.int, core.int]] | 112 view: [Uint8ClampedList, [ByteBuffer], [core.int, core.int]] |
120 }) | 113 }) |
121 }); | 114 }); |
122 Uint8ClampedList.BYTES_PER_ELEMENT = 1; | 115 Uint8ClampedList.BYTES_PER_ELEMENT = 1; |
123 class Int16List extends core.Object { | 116 class Int16List extends core.Object { |
124 Int16List(length) { | 117 static new(length) { |
125 return new _native_typed_data.NativeInt16List(length); | 118 return _native_typed_data.NativeInt16List.new(length); |
126 } | 119 } |
127 fromList(elements) { | 120 static fromList(elements) { |
128 return new _native_typed_data.NativeInt16List.fromList(elements); | 121 return _native_typed_data.NativeInt16List.fromList(elements); |
129 } | 122 } |
130 view(buffer, offsetInBytes, length) { | 123 static view(buffer, offsetInBytes, length) { |
131 if (offsetInBytes === void 0) | 124 if (offsetInBytes === void 0) |
132 offsetInBytes = 0; | 125 offsetInBytes = 0; |
133 if (length === void 0) | 126 if (length === void 0) |
134 length = null; | 127 length = null; |
135 return buffer.asInt16List(offsetInBytes, length); | 128 return buffer.asInt16List(offsetInBytes, length); |
136 } | 129 } |
137 } | 130 } |
138 Int16List[dart.implements] = () => [core.List$(core.int), TypedData]; | 131 Int16List[dart.implements] = () => [core.List$(core.int), TypedData]; |
139 dart.defineNamedConstructor(Int16List, 'fromList'); | |
140 dart.defineNamedConstructor(Int16List, 'view'); | |
141 dart.setSignature(Int16List, { | 132 dart.setSignature(Int16List, { |
142 constructors: () => ({ | 133 constructors: () => ({ |
143 Int16List: [Int16List, [core.int]], | 134 new: [Int16List, [core.int]], |
144 fromList: [Int16List, [core.List$(core.int)]], | 135 fromList: [Int16List, [core.List$(core.int)]], |
145 view: [Int16List, [ByteBuffer], [core.int, core.int]] | 136 view: [Int16List, [ByteBuffer], [core.int, core.int]] |
146 }) | 137 }) |
147 }); | 138 }); |
148 Int16List.BYTES_PER_ELEMENT = 2; | 139 Int16List.BYTES_PER_ELEMENT = 2; |
149 class Uint16List extends core.Object { | 140 class Uint16List extends core.Object { |
150 Uint16List(length) { | 141 static new(length) { |
151 return new _native_typed_data.NativeUint16List(length); | 142 return _native_typed_data.NativeUint16List.new(length); |
152 } | 143 } |
153 fromList(elements) { | 144 static fromList(elements) { |
154 return new _native_typed_data.NativeUint16List.fromList(elements); | 145 return _native_typed_data.NativeUint16List.fromList(elements); |
155 } | 146 } |
156 view(buffer, offsetInBytes, length) { | 147 static view(buffer, offsetInBytes, length) { |
157 if (offsetInBytes === void 0) | 148 if (offsetInBytes === void 0) |
158 offsetInBytes = 0; | 149 offsetInBytes = 0; |
159 if (length === void 0) | 150 if (length === void 0) |
160 length = null; | 151 length = null; |
161 return buffer.asUint16List(offsetInBytes, length); | 152 return buffer.asUint16List(offsetInBytes, length); |
162 } | 153 } |
163 } | 154 } |
164 Uint16List[dart.implements] = () => [core.List$(core.int), TypedData]; | 155 Uint16List[dart.implements] = () => [core.List$(core.int), TypedData]; |
165 dart.defineNamedConstructor(Uint16List, 'fromList'); | |
166 dart.defineNamedConstructor(Uint16List, 'view'); | |
167 dart.setSignature(Uint16List, { | 156 dart.setSignature(Uint16List, { |
168 constructors: () => ({ | 157 constructors: () => ({ |
169 Uint16List: [Uint16List, [core.int]], | 158 new: [Uint16List, [core.int]], |
170 fromList: [Uint16List, [core.List$(core.int)]], | 159 fromList: [Uint16List, [core.List$(core.int)]], |
171 view: [Uint16List, [ByteBuffer], [core.int, core.int]] | 160 view: [Uint16List, [ByteBuffer], [core.int, core.int]] |
172 }) | 161 }) |
173 }); | 162 }); |
174 Uint16List.BYTES_PER_ELEMENT = 2; | 163 Uint16List.BYTES_PER_ELEMENT = 2; |
175 class Int32List extends core.Object { | 164 class Int32List extends core.Object { |
176 Int32List(length) { | 165 static new(length) { |
177 return new _native_typed_data.NativeInt32List(length); | 166 return _native_typed_data.NativeInt32List.new(length); |
178 } | 167 } |
179 fromList(elements) { | 168 static fromList(elements) { |
180 return new _native_typed_data.NativeInt32List.fromList(elements); | 169 return _native_typed_data.NativeInt32List.fromList(elements); |
181 } | 170 } |
182 view(buffer, offsetInBytes, length) { | 171 static view(buffer, offsetInBytes, length) { |
183 if (offsetInBytes === void 0) | 172 if (offsetInBytes === void 0) |
184 offsetInBytes = 0; | 173 offsetInBytes = 0; |
185 if (length === void 0) | 174 if (length === void 0) |
186 length = null; | 175 length = null; |
187 return buffer.asInt32List(offsetInBytes, length); | 176 return buffer.asInt32List(offsetInBytes, length); |
188 } | 177 } |
189 } | 178 } |
190 Int32List[dart.implements] = () => [core.List$(core.int), TypedData]; | 179 Int32List[dart.implements] = () => [core.List$(core.int), TypedData]; |
191 dart.defineNamedConstructor(Int32List, 'fromList'); | |
192 dart.defineNamedConstructor(Int32List, 'view'); | |
193 dart.setSignature(Int32List, { | 180 dart.setSignature(Int32List, { |
194 constructors: () => ({ | 181 constructors: () => ({ |
195 Int32List: [Int32List, [core.int]], | 182 new: [Int32List, [core.int]], |
196 fromList: [Int32List, [core.List$(core.int)]], | 183 fromList: [Int32List, [core.List$(core.int)]], |
197 view: [Int32List, [ByteBuffer], [core.int, core.int]] | 184 view: [Int32List, [ByteBuffer], [core.int, core.int]] |
198 }) | 185 }) |
199 }); | 186 }); |
200 Int32List.BYTES_PER_ELEMENT = 4; | 187 Int32List.BYTES_PER_ELEMENT = 4; |
201 class Uint32List extends core.Object { | 188 class Uint32List extends core.Object { |
202 Uint32List(length) { | 189 static new(length) { |
203 return new _native_typed_data.NativeUint32List(length); | 190 return _native_typed_data.NativeUint32List.new(length); |
204 } | 191 } |
205 fromList(elements) { | 192 static fromList(elements) { |
206 return new _native_typed_data.NativeUint32List.fromList(elements); | 193 return _native_typed_data.NativeUint32List.fromList(elements); |
207 } | 194 } |
208 view(buffer, offsetInBytes, length) { | 195 static view(buffer, offsetInBytes, length) { |
209 if (offsetInBytes === void 0) | 196 if (offsetInBytes === void 0) |
210 offsetInBytes = 0; | 197 offsetInBytes = 0; |
211 if (length === void 0) | 198 if (length === void 0) |
212 length = null; | 199 length = null; |
213 return buffer.asUint32List(offsetInBytes, length); | 200 return buffer.asUint32List(offsetInBytes, length); |
214 } | 201 } |
215 } | 202 } |
216 Uint32List[dart.implements] = () => [core.List$(core.int), TypedData]; | 203 Uint32List[dart.implements] = () => [core.List$(core.int), TypedData]; |
217 dart.defineNamedConstructor(Uint32List, 'fromList'); | |
218 dart.defineNamedConstructor(Uint32List, 'view'); | |
219 dart.setSignature(Uint32List, { | 204 dart.setSignature(Uint32List, { |
220 constructors: () => ({ | 205 constructors: () => ({ |
221 Uint32List: [Uint32List, [core.int]], | 206 new: [Uint32List, [core.int]], |
222 fromList: [Uint32List, [core.List$(core.int)]], | 207 fromList: [Uint32List, [core.List$(core.int)]], |
223 view: [Uint32List, [ByteBuffer], [core.int, core.int]] | 208 view: [Uint32List, [ByteBuffer], [core.int, core.int]] |
224 }) | 209 }) |
225 }); | 210 }); |
226 Uint32List.BYTES_PER_ELEMENT = 4; | 211 Uint32List.BYTES_PER_ELEMENT = 4; |
227 class Int64List extends core.Object { | 212 class Int64List extends core.Object { |
228 Int64List(length) { | 213 static new(length) { |
229 throw new core.UnsupportedError("Int64List not supported by dart2js."); | 214 throw new core.UnsupportedError("Int64List not supported by dart2js."); |
230 } | 215 } |
231 fromList(elements) { | 216 static fromList(elements) { |
232 throw new core.UnsupportedError("Int64List not supported by dart2js."); | 217 throw new core.UnsupportedError("Int64List not supported by dart2js."); |
233 } | 218 } |
234 view(buffer, offsetInBytes, length) { | 219 static view(buffer, offsetInBytes, length) { |
235 if (offsetInBytes === void 0) | 220 if (offsetInBytes === void 0) |
236 offsetInBytes = 0; | 221 offsetInBytes = 0; |
237 if (length === void 0) | 222 if (length === void 0) |
238 length = null; | 223 length = null; |
239 return buffer.asInt64List(offsetInBytes, length); | 224 return buffer.asInt64List(offsetInBytes, length); |
240 } | 225 } |
241 } | 226 } |
242 Int64List[dart.implements] = () => [core.List$(core.int), TypedData]; | 227 Int64List[dart.implements] = () => [core.List$(core.int), TypedData]; |
243 dart.defineNamedConstructor(Int64List, 'fromList'); | |
244 dart.defineNamedConstructor(Int64List, 'view'); | |
245 dart.setSignature(Int64List, { | 228 dart.setSignature(Int64List, { |
246 constructors: () => ({ | 229 constructors: () => ({ |
247 Int64List: [Int64List, [core.int]], | 230 new: [Int64List, [core.int]], |
248 fromList: [Int64List, [core.List$(core.int)]], | 231 fromList: [Int64List, [core.List$(core.int)]], |
249 view: [Int64List, [ByteBuffer], [core.int, core.int]] | 232 view: [Int64List, [ByteBuffer], [core.int, core.int]] |
250 }) | 233 }) |
251 }); | 234 }); |
252 Int64List.BYTES_PER_ELEMENT = 8; | 235 Int64List.BYTES_PER_ELEMENT = 8; |
253 class Uint64List extends core.Object { | 236 class Uint64List extends core.Object { |
254 Uint64List(length) { | 237 static new(length) { |
255 throw new core.UnsupportedError("Uint64List not supported by dart2js."); | 238 throw new core.UnsupportedError("Uint64List not supported by dart2js."); |
256 } | 239 } |
257 fromList(elements) { | 240 static fromList(elements) { |
258 throw new core.UnsupportedError("Uint64List not supported by dart2js."); | 241 throw new core.UnsupportedError("Uint64List not supported by dart2js."); |
259 } | 242 } |
260 view(buffer, offsetInBytes, length) { | 243 static view(buffer, offsetInBytes, length) { |
261 if (offsetInBytes === void 0) | 244 if (offsetInBytes === void 0) |
262 offsetInBytes = 0; | 245 offsetInBytes = 0; |
263 if (length === void 0) | 246 if (length === void 0) |
264 length = null; | 247 length = null; |
265 return buffer.asUint64List(offsetInBytes, length); | 248 return buffer.asUint64List(offsetInBytes, length); |
266 } | 249 } |
267 } | 250 } |
268 Uint64List[dart.implements] = () => [core.List$(core.int), TypedData]; | 251 Uint64List[dart.implements] = () => [core.List$(core.int), TypedData]; |
269 dart.defineNamedConstructor(Uint64List, 'fromList'); | |
270 dart.defineNamedConstructor(Uint64List, 'view'); | |
271 dart.setSignature(Uint64List, { | 252 dart.setSignature(Uint64List, { |
272 constructors: () => ({ | 253 constructors: () => ({ |
273 Uint64List: [Uint64List, [core.int]], | 254 new: [Uint64List, [core.int]], |
274 fromList: [Uint64List, [core.List$(core.int)]], | 255 fromList: [Uint64List, [core.List$(core.int)]], |
275 view: [Uint64List, [ByteBuffer], [core.int, core.int]] | 256 view: [Uint64List, [ByteBuffer], [core.int, core.int]] |
276 }) | 257 }) |
277 }); | 258 }); |
278 Uint64List.BYTES_PER_ELEMENT = 8; | 259 Uint64List.BYTES_PER_ELEMENT = 8; |
279 class Float32List extends core.Object { | 260 class Float32List extends core.Object { |
280 Float32List(length) { | 261 static new(length) { |
281 return new _native_typed_data.NativeFloat32List(length); | 262 return _native_typed_data.NativeFloat32List.new(length); |
282 } | 263 } |
283 fromList(elements) { | 264 static fromList(elements) { |
284 return new _native_typed_data.NativeFloat32List.fromList(elements); | 265 return _native_typed_data.NativeFloat32List.fromList(elements); |
285 } | 266 } |
286 view(buffer, offsetInBytes, length) { | 267 static view(buffer, offsetInBytes, length) { |
287 if (offsetInBytes === void 0) | 268 if (offsetInBytes === void 0) |
288 offsetInBytes = 0; | 269 offsetInBytes = 0; |
289 if (length === void 0) | 270 if (length === void 0) |
290 length = null; | 271 length = null; |
291 return buffer.asFloat32List(offsetInBytes, length); | 272 return buffer.asFloat32List(offsetInBytes, length); |
292 } | 273 } |
293 } | 274 } |
294 Float32List[dart.implements] = () => [core.List$(core.double), TypedData]; | 275 Float32List[dart.implements] = () => [core.List$(core.double), TypedData]; |
295 dart.defineNamedConstructor(Float32List, 'fromList'); | |
296 dart.defineNamedConstructor(Float32List, 'view'); | |
297 dart.setSignature(Float32List, { | 276 dart.setSignature(Float32List, { |
298 constructors: () => ({ | 277 constructors: () => ({ |
299 Float32List: [Float32List, [core.int]], | 278 new: [Float32List, [core.int]], |
300 fromList: [Float32List, [core.List$(core.double)]], | 279 fromList: [Float32List, [core.List$(core.double)]], |
301 view: [Float32List, [ByteBuffer], [core.int, core.int]] | 280 view: [Float32List, [ByteBuffer], [core.int, core.int]] |
302 }) | 281 }) |
303 }); | 282 }); |
304 Float32List.BYTES_PER_ELEMENT = 4; | 283 Float32List.BYTES_PER_ELEMENT = 4; |
305 class Float64List extends core.Object { | 284 class Float64List extends core.Object { |
306 Float64List(length) { | 285 static new(length) { |
307 return new _native_typed_data.NativeFloat64List(length); | 286 return _native_typed_data.NativeFloat64List.new(length); |
308 } | 287 } |
309 fromList(elements) { | 288 static fromList(elements) { |
310 return new _native_typed_data.NativeFloat64List.fromList(elements); | 289 return _native_typed_data.NativeFloat64List.fromList(elements); |
311 } | 290 } |
312 view(buffer, offsetInBytes, length) { | 291 static view(buffer, offsetInBytes, length) { |
313 if (offsetInBytes === void 0) | 292 if (offsetInBytes === void 0) |
314 offsetInBytes = 0; | 293 offsetInBytes = 0; |
315 if (length === void 0) | 294 if (length === void 0) |
316 length = null; | 295 length = null; |
317 return buffer.asFloat64List(offsetInBytes, length); | 296 return buffer.asFloat64List(offsetInBytes, length); |
318 } | 297 } |
319 } | 298 } |
320 Float64List[dart.implements] = () => [core.List$(core.double), TypedData]; | 299 Float64List[dart.implements] = () => [core.List$(core.double), TypedData]; |
321 dart.defineNamedConstructor(Float64List, 'fromList'); | |
322 dart.defineNamedConstructor(Float64List, 'view'); | |
323 dart.setSignature(Float64List, { | 300 dart.setSignature(Float64List, { |
324 constructors: () => ({ | 301 constructors: () => ({ |
325 Float64List: [Float64List, [core.int]], | 302 new: [Float64List, [core.int]], |
326 fromList: [Float64List, [core.List$(core.double)]], | 303 fromList: [Float64List, [core.List$(core.double)]], |
327 view: [Float64List, [ByteBuffer], [core.int, core.int]] | 304 view: [Float64List, [ByteBuffer], [core.int, core.int]] |
328 }) | 305 }) |
329 }); | 306 }); |
330 Float64List.BYTES_PER_ELEMENT = 8; | 307 Float64List.BYTES_PER_ELEMENT = 8; |
331 class Float32x4List extends core.Object { | 308 class Float32x4List extends core.Object { |
332 Float32x4List(length) { | 309 static new(length) { |
333 return new _native_typed_data.NativeFloat32x4List(length); | 310 return new _native_typed_data.NativeFloat32x4List(length); |
334 } | 311 } |
335 fromList(elements) { | 312 static fromList(elements) { |
336 return new _native_typed_data.NativeFloat32x4List.fromList(elements); | 313 return _native_typed_data.NativeFloat32x4List.fromList(elements); |
337 } | 314 } |
338 view(buffer, offsetInBytes, length) { | 315 static view(buffer, offsetInBytes, length) { |
339 if (offsetInBytes === void 0) | 316 if (offsetInBytes === void 0) |
340 offsetInBytes = 0; | 317 offsetInBytes = 0; |
341 if (length === void 0) | 318 if (length === void 0) |
342 length = null; | 319 length = null; |
343 return buffer.asFloat32x4List(offsetInBytes, length); | 320 return buffer.asFloat32x4List(offsetInBytes, length); |
344 } | 321 } |
345 } | 322 } |
346 Float32x4List[dart.implements] = () => [core.List$(Float32x4), TypedData]; | 323 Float32x4List[dart.implements] = () => [core.List$(Float32x4), TypedData]; |
347 dart.defineNamedConstructor(Float32x4List, 'fromList'); | |
348 dart.defineNamedConstructor(Float32x4List, 'view'); | |
349 dart.setSignature(Float32x4List, { | 324 dart.setSignature(Float32x4List, { |
350 constructors: () => ({ | 325 constructors: () => ({ |
351 Float32x4List: [Float32x4List, [core.int]], | 326 new: [Float32x4List, [core.int]], |
352 fromList: [Float32x4List, [core.List$(Float32x4)]], | 327 fromList: [Float32x4List, [core.List$(Float32x4)]], |
353 view: [Float32x4List, [ByteBuffer], [core.int, core.int]] | 328 view: [Float32x4List, [ByteBuffer], [core.int, core.int]] |
354 }) | 329 }) |
355 }); | 330 }); |
356 Float32x4List.BYTES_PER_ELEMENT = 16; | 331 Float32x4List.BYTES_PER_ELEMENT = 16; |
357 class Int32x4List extends core.Object { | 332 class Int32x4List extends core.Object { |
358 Int32x4List(length) { | 333 static new(length) { |
359 return new _native_typed_data.NativeInt32x4List(length); | 334 return new _native_typed_data.NativeInt32x4List(length); |
360 } | 335 } |
361 fromList(elements) { | 336 static fromList(elements) { |
362 return new _native_typed_data.NativeInt32x4List.fromList(elements); | 337 return _native_typed_data.NativeInt32x4List.fromList(elements); |
363 } | 338 } |
364 view(buffer, offsetInBytes, length) { | 339 static view(buffer, offsetInBytes, length) { |
365 if (offsetInBytes === void 0) | 340 if (offsetInBytes === void 0) |
366 offsetInBytes = 0; | 341 offsetInBytes = 0; |
367 if (length === void 0) | 342 if (length === void 0) |
368 length = null; | 343 length = null; |
369 return buffer.asInt32x4List(offsetInBytes, length); | 344 return buffer.asInt32x4List(offsetInBytes, length); |
370 } | 345 } |
371 } | 346 } |
372 Int32x4List[dart.implements] = () => [core.List$(Int32x4), TypedData]; | 347 Int32x4List[dart.implements] = () => [core.List$(Int32x4), TypedData]; |
373 dart.defineNamedConstructor(Int32x4List, 'fromList'); | |
374 dart.defineNamedConstructor(Int32x4List, 'view'); | |
375 dart.setSignature(Int32x4List, { | 348 dart.setSignature(Int32x4List, { |
376 constructors: () => ({ | 349 constructors: () => ({ |
377 Int32x4List: [Int32x4List, [core.int]], | 350 new: [Int32x4List, [core.int]], |
378 fromList: [Int32x4List, [core.List$(Int32x4)]], | 351 fromList: [Int32x4List, [core.List$(Int32x4)]], |
379 view: [Int32x4List, [ByteBuffer], [core.int, core.int]] | 352 view: [Int32x4List, [ByteBuffer], [core.int, core.int]] |
380 }) | 353 }) |
381 }); | 354 }); |
382 Int32x4List.BYTES_PER_ELEMENT = 16; | 355 Int32x4List.BYTES_PER_ELEMENT = 16; |
383 class Float64x2List extends core.Object { | 356 class Float64x2List extends core.Object { |
384 Float64x2List(length) { | 357 static new(length) { |
385 return new _native_typed_data.NativeFloat64x2List(length); | 358 return new _native_typed_data.NativeFloat64x2List(length); |
386 } | 359 } |
387 fromList(elements) { | 360 static fromList(elements) { |
388 return new _native_typed_data.NativeFloat64x2List.fromList(elements); | 361 return _native_typed_data.NativeFloat64x2List.fromList(elements); |
389 } | 362 } |
390 view(buffer, offsetInBytes, length) { | 363 static view(buffer, offsetInBytes, length) { |
391 if (offsetInBytes === void 0) | 364 if (offsetInBytes === void 0) |
392 offsetInBytes = 0; | 365 offsetInBytes = 0; |
393 if (length === void 0) | 366 if (length === void 0) |
394 length = null; | 367 length = null; |
395 return buffer.asFloat64x2List(offsetInBytes, length); | 368 return buffer.asFloat64x2List(offsetInBytes, length); |
396 } | 369 } |
397 } | 370 } |
398 Float64x2List[dart.implements] = () => [core.List$(Float64x2), TypedData]; | 371 Float64x2List[dart.implements] = () => [core.List$(Float64x2), TypedData]; |
399 dart.defineNamedConstructor(Float64x2List, 'fromList'); | |
400 dart.defineNamedConstructor(Float64x2List, 'view'); | |
401 dart.setSignature(Float64x2List, { | 372 dart.setSignature(Float64x2List, { |
402 constructors: () => ({ | 373 constructors: () => ({ |
403 Float64x2List: [Float64x2List, [core.int]], | 374 new: [Float64x2List, [core.int]], |
404 fromList: [Float64x2List, [core.List$(Float64x2)]], | 375 fromList: [Float64x2List, [core.List$(Float64x2)]], |
405 view: [Float64x2List, [ByteBuffer], [core.int, core.int]] | 376 view: [Float64x2List, [ByteBuffer], [core.int, core.int]] |
406 }) | 377 }) |
407 }); | 378 }); |
408 Float64x2List.BYTES_PER_ELEMENT = 16; | 379 Float64x2List.BYTES_PER_ELEMENT = 16; |
409 class Float32x4 extends core.Object { | 380 class Float32x4 extends core.Object { |
410 Float32x4(x, y, z, w) { | 381 static new(x, y, z, w) { |
411 return new _native_typed_data.NativeFloat32x4(x, y, z, w); | 382 return new _native_typed_data.NativeFloat32x4(x, y, z, w); |
412 } | 383 } |
413 splat(v) { | 384 static splat(v) { |
414 return new _native_typed_data.NativeFloat32x4.splat(v); | 385 return new _native_typed_data.NativeFloat32x4.splat(v); |
415 } | 386 } |
416 zero() { | 387 static zero() { |
417 return new _native_typed_data.NativeFloat32x4.zero(); | 388 return new _native_typed_data.NativeFloat32x4.zero(); |
418 } | 389 } |
419 fromInt32x4Bits(x) { | 390 static fromInt32x4Bits(x) { |
420 return new _native_typed_data.NativeFloat32x4.fromInt32x4Bits(x); | 391 return _native_typed_data.NativeFloat32x4.fromInt32x4Bits(x); |
421 } | 392 } |
422 fromFloat64x2(v) { | 393 static fromFloat64x2(v) { |
423 return new _native_typed_data.NativeFloat32x4.fromFloat64x2(v); | 394 return new _native_typed_data.NativeFloat32x4.fromFloat64x2(v); |
424 } | 395 } |
425 } | 396 } |
426 dart.defineNamedConstructor(Float32x4, 'splat'); | |
427 dart.defineNamedConstructor(Float32x4, 'zero'); | |
428 dart.defineNamedConstructor(Float32x4, 'fromInt32x4Bits'); | |
429 dart.defineNamedConstructor(Float32x4, 'fromFloat64x2'); | |
430 dart.setSignature(Float32x4, { | 397 dart.setSignature(Float32x4, { |
431 constructors: () => ({ | 398 constructors: () => ({ |
432 Float32x4: [Float32x4, [core.double, core.double, core.double, core.double
]], | 399 new: [Float32x4, [core.double, core.double, core.double, core.double]], |
433 splat: [Float32x4, [core.double]], | 400 splat: [Float32x4, [core.double]], |
434 zero: [Float32x4, []], | 401 zero: [Float32x4, []], |
435 fromInt32x4Bits: [Float32x4, [Int32x4]], | 402 fromInt32x4Bits: [Float32x4, [Int32x4]], |
436 fromFloat64x2: [Float32x4, [Float64x2]] | 403 fromFloat64x2: [Float32x4, [Float64x2]] |
437 }) | 404 }) |
438 }); | 405 }); |
439 Float32x4.XXXX = 0; | 406 Float32x4.XXXX = 0; |
440 Float32x4.XXXY = 64; | 407 Float32x4.XXXY = 64; |
441 Float32x4.XXXZ = 128; | 408 Float32x4.XXXZ = 128; |
442 Float32x4.XXXW = 192; | 409 Float32x4.XXXW = 192; |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 Float32x4.WWYW = 223; | 653 Float32x4.WWYW = 223; |
687 Float32x4.WWZX = 47; | 654 Float32x4.WWZX = 47; |
688 Float32x4.WWZY = 111; | 655 Float32x4.WWZY = 111; |
689 Float32x4.WWZZ = 175; | 656 Float32x4.WWZZ = 175; |
690 Float32x4.WWZW = 239; | 657 Float32x4.WWZW = 239; |
691 Float32x4.WWWX = 63; | 658 Float32x4.WWWX = 63; |
692 Float32x4.WWWY = 127; | 659 Float32x4.WWWY = 127; |
693 Float32x4.WWWZ = 191; | 660 Float32x4.WWWZ = 191; |
694 Float32x4.WWWW = 255; | 661 Float32x4.WWWW = 255; |
695 class Int32x4 extends core.Object { | 662 class Int32x4 extends core.Object { |
696 Int32x4(x, y, z, w) { | 663 static new(x, y, z, w) { |
697 return new _native_typed_data.NativeInt32x4(x, y, z, w); | 664 return new _native_typed_data.NativeInt32x4(x, y, z, w); |
698 } | 665 } |
699 bool(x, y, z, w) { | 666 static bool(x, y, z, w) { |
700 return new _native_typed_data.NativeInt32x4.bool(x, y, z, w); | 667 return new _native_typed_data.NativeInt32x4.bool(x, y, z, w); |
701 } | 668 } |
702 fromFloat32x4Bits(x) { | 669 static fromFloat32x4Bits(x) { |
703 return new _native_typed_data.NativeInt32x4.fromFloat32x4Bits(x); | 670 return _native_typed_data.NativeInt32x4.fromFloat32x4Bits(x); |
704 } | 671 } |
705 } | 672 } |
706 dart.defineNamedConstructor(Int32x4, 'bool'); | |
707 dart.defineNamedConstructor(Int32x4, 'fromFloat32x4Bits'); | |
708 dart.setSignature(Int32x4, { | 673 dart.setSignature(Int32x4, { |
709 constructors: () => ({ | 674 constructors: () => ({ |
710 Int32x4: [Int32x4, [core.int, core.int, core.int, core.int]], | 675 new: [Int32x4, [core.int, core.int, core.int, core.int]], |
711 bool: [Int32x4, [core.bool, core.bool, core.bool, core.bool]], | 676 bool: [Int32x4, [core.bool, core.bool, core.bool, core.bool]], |
712 fromFloat32x4Bits: [Int32x4, [Float32x4]] | 677 fromFloat32x4Bits: [Int32x4, [Float32x4]] |
713 }) | 678 }) |
714 }); | 679 }); |
715 Int32x4.XXXX = 0; | 680 Int32x4.XXXX = 0; |
716 Int32x4.XXXY = 64; | 681 Int32x4.XXXY = 64; |
717 Int32x4.XXXZ = 128; | 682 Int32x4.XXXZ = 128; |
718 Int32x4.XXXW = 192; | 683 Int32x4.XXXW = 192; |
719 Int32x4.XXYX = 16; | 684 Int32x4.XXYX = 16; |
720 Int32x4.XXYY = 80; | 685 Int32x4.XXYY = 80; |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 Int32x4.WWYW = 223; | 927 Int32x4.WWYW = 223; |
963 Int32x4.WWZX = 47; | 928 Int32x4.WWZX = 47; |
964 Int32x4.WWZY = 111; | 929 Int32x4.WWZY = 111; |
965 Int32x4.WWZZ = 175; | 930 Int32x4.WWZZ = 175; |
966 Int32x4.WWZW = 239; | 931 Int32x4.WWZW = 239; |
967 Int32x4.WWWX = 63; | 932 Int32x4.WWWX = 63; |
968 Int32x4.WWWY = 127; | 933 Int32x4.WWWY = 127; |
969 Int32x4.WWWZ = 191; | 934 Int32x4.WWWZ = 191; |
970 Int32x4.WWWW = 255; | 935 Int32x4.WWWW = 255; |
971 class Float64x2 extends core.Object { | 936 class Float64x2 extends core.Object { |
972 Float64x2(x, y) { | 937 static new(x, y) { |
973 return new _native_typed_data.NativeFloat64x2(x, y); | 938 return new _native_typed_data.NativeFloat64x2(x, y); |
974 } | 939 } |
975 splat(v) { | 940 static splat(v) { |
976 return new _native_typed_data.NativeFloat64x2.splat(v); | 941 return new _native_typed_data.NativeFloat64x2.splat(v); |
977 } | 942 } |
978 zero() { | 943 static zero() { |
979 return new _native_typed_data.NativeFloat64x2.zero(); | 944 return new _native_typed_data.NativeFloat64x2.zero(); |
980 } | 945 } |
981 fromFloat32x4(v) { | 946 static fromFloat32x4(v) { |
982 return new _native_typed_data.NativeFloat64x2.fromFloat32x4(v); | 947 return new _native_typed_data.NativeFloat64x2.fromFloat32x4(v); |
983 } | 948 } |
984 } | 949 } |
985 dart.defineNamedConstructor(Float64x2, 'splat'); | |
986 dart.defineNamedConstructor(Float64x2, 'zero'); | |
987 dart.defineNamedConstructor(Float64x2, 'fromFloat32x4'); | |
988 dart.setSignature(Float64x2, { | 950 dart.setSignature(Float64x2, { |
989 constructors: () => ({ | 951 constructors: () => ({ |
990 Float64x2: [Float64x2, [core.double, core.double]], | 952 new: [Float64x2, [core.double, core.double]], |
991 splat: [Float64x2, [core.double]], | 953 splat: [Float64x2, [core.double]], |
992 zero: [Float64x2, []], | 954 zero: [Float64x2, []], |
993 fromFloat32x4: [Float64x2, [Float32x4]] | 955 fromFloat32x4: [Float64x2, [Float32x4]] |
994 }) | 956 }) |
995 }); | 957 }); |
996 // Exports: | 958 // Exports: |
997 exports.ByteBuffer = ByteBuffer; | 959 exports.ByteBuffer = ByteBuffer; |
998 exports.TypedData = TypedData; | 960 exports.TypedData = TypedData; |
999 exports.Endianness = Endianness; | 961 exports.Endianness = Endianness; |
1000 exports.ByteData = ByteData; | 962 exports.ByteData = ByteData; |
1001 exports.Int8List = Int8List; | 963 exports.Int8List = Int8List; |
1002 exports.Uint8List = Uint8List; | 964 exports.Uint8List = Uint8List; |
1003 exports.Uint8ClampedList = Uint8ClampedList; | 965 exports.Uint8ClampedList = Uint8ClampedList; |
1004 exports.Int16List = Int16List; | 966 exports.Int16List = Int16List; |
1005 exports.Uint16List = Uint16List; | 967 exports.Uint16List = Uint16List; |
1006 exports.Int32List = Int32List; | 968 exports.Int32List = Int32List; |
1007 exports.Uint32List = Uint32List; | 969 exports.Uint32List = Uint32List; |
1008 exports.Int64List = Int64List; | 970 exports.Int64List = Int64List; |
1009 exports.Uint64List = Uint64List; | 971 exports.Uint64List = Uint64List; |
1010 exports.Float32List = Float32List; | 972 exports.Float32List = Float32List; |
1011 exports.Float64List = Float64List; | 973 exports.Float64List = Float64List; |
1012 exports.Float32x4List = Float32x4List; | 974 exports.Float32x4List = Float32x4List; |
1013 exports.Int32x4List = Int32x4List; | 975 exports.Int32x4List = Int32x4List; |
1014 exports.Float64x2List = Float64x2List; | 976 exports.Float64x2List = Float64x2List; |
1015 exports.Float32x4 = Float32x4; | 977 exports.Float32x4 = Float32x4; |
1016 exports.Int32x4 = Int32x4; | 978 exports.Int32x4 = Int32x4; |
1017 exports.Float64x2 = Float64x2; | 979 exports.Float64x2 = Float64x2; |
1018 })(typed_data, core, _native_typed_data); | 980 })(typed_data, core, _native_typed_data); |
OLD | NEW |