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

Side by Side Diff: lib/runtime/dart/typed_data.js

Issue 1043003002: keep mixin and interface implementation info at runtime (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/runtime/dart/math.js ('k') | lib/runtime/dart_runtime.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var typed_data; 1 var typed_data;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class ByteBuffer extends core.Object { 4 class ByteBuffer extends core.Object {
5 } 5 }
6 class TypedData extends core.Object { 6 class TypedData extends core.Object {
7 } 7 }
8 let _ = Symbol('_'); 8 let _ = Symbol('_');
9 let _littleEndian = Symbol('_littleEndian'); 9 let _littleEndian = Symbol('_littleEndian');
10 class Endianness extends core.Object { 10 class Endianness extends core.Object {
(...skipping 14 matching lines...) Expand all
25 return new _native_typed_data.NativeByteData(length); 25 return new _native_typed_data.NativeByteData(length);
26 } 26 }
27 view(buffer, offsetInBytes, length) { 27 view(buffer, offsetInBytes, length) {
28 if (offsetInBytes === void 0) 28 if (offsetInBytes === void 0)
29 offsetInBytes = 0; 29 offsetInBytes = 0;
30 if (length === void 0) 30 if (length === void 0)
31 length = null; 31 length = null;
32 return buffer.asByteData(offsetInBytes, length); 32 return buffer.asByteData(offsetInBytes, length);
33 } 33 }
34 } 34 }
35 ByteData[dart.implements] = [TypedData];
35 dart.defineNamedConstructor(ByteData, 'view'); 36 dart.defineNamedConstructor(ByteData, 'view');
36 class Int8List extends core.Object { 37 class Int8List extends core.Object {
37 Int8List(length) { 38 Int8List(length) {
38 return new _native_typed_data.NativeInt8List(length); 39 return new _native_typed_data.NativeInt8List(length);
39 } 40 }
40 fromList(elements) { 41 fromList(elements) {
41 return new _native_typed_data.NativeInt8List.fromList(elements); 42 return new _native_typed_data.NativeInt8List.fromList(elements);
42 } 43 }
43 view(buffer, offsetInBytes, length) { 44 view(buffer, offsetInBytes, length) {
44 if (offsetInBytes === void 0) 45 if (offsetInBytes === void 0)
45 offsetInBytes = 0; 46 offsetInBytes = 0;
46 if (length === void 0) 47 if (length === void 0)
47 length = null; 48 length = null;
48 return buffer.asInt8List(offsetInBytes, length); 49 return buffer.asInt8List(offsetInBytes, length);
49 } 50 }
50 } 51 }
52 Int8List[dart.implements] = [core.List$(core.int), TypedData];
51 dart.defineNamedConstructor(Int8List, 'fromList'); 53 dart.defineNamedConstructor(Int8List, 'fromList');
52 dart.defineNamedConstructor(Int8List, 'view'); 54 dart.defineNamedConstructor(Int8List, 'view');
53 Int8List.BYTES_PER_ELEMENT = 1; 55 Int8List.BYTES_PER_ELEMENT = 1;
54 class Uint8List extends core.Object { 56 class Uint8List extends core.Object {
55 Uint8List(length) { 57 Uint8List(length) {
56 return new _native_typed_data.NativeUint8List(length); 58 return new _native_typed_data.NativeUint8List(length);
57 } 59 }
58 fromList(elements) { 60 fromList(elements) {
59 return new _native_typed_data.NativeUint8List.fromList(elements); 61 return new _native_typed_data.NativeUint8List.fromList(elements);
60 } 62 }
61 view(buffer, offsetInBytes, length) { 63 view(buffer, offsetInBytes, length) {
62 if (offsetInBytes === void 0) 64 if (offsetInBytes === void 0)
63 offsetInBytes = 0; 65 offsetInBytes = 0;
64 if (length === void 0) 66 if (length === void 0)
65 length = null; 67 length = null;
66 return buffer.asUint8List(offsetInBytes, length); 68 return buffer.asUint8List(offsetInBytes, length);
67 } 69 }
68 } 70 }
71 Uint8List[dart.implements] = [core.List$(core.int), TypedData];
69 dart.defineNamedConstructor(Uint8List, 'fromList'); 72 dart.defineNamedConstructor(Uint8List, 'fromList');
70 dart.defineNamedConstructor(Uint8List, 'view'); 73 dart.defineNamedConstructor(Uint8List, 'view');
71 Uint8List.BYTES_PER_ELEMENT = 1; 74 Uint8List.BYTES_PER_ELEMENT = 1;
72 class Uint8ClampedList extends core.Object { 75 class Uint8ClampedList extends core.Object {
73 Uint8ClampedList(length) { 76 Uint8ClampedList(length) {
74 return new _native_typed_data.NativeUint8ClampedList(length); 77 return new _native_typed_data.NativeUint8ClampedList(length);
75 } 78 }
76 fromList(elements) { 79 fromList(elements) {
77 return new _native_typed_data.NativeUint8ClampedList.fromList(elements); 80 return new _native_typed_data.NativeUint8ClampedList.fromList(elements);
78 } 81 }
79 view(buffer, offsetInBytes, length) { 82 view(buffer, offsetInBytes, length) {
80 if (offsetInBytes === void 0) 83 if (offsetInBytes === void 0)
81 offsetInBytes = 0; 84 offsetInBytes = 0;
82 if (length === void 0) 85 if (length === void 0)
83 length = null; 86 length = null;
84 return buffer.asUint8ClampedList(offsetInBytes, length); 87 return buffer.asUint8ClampedList(offsetInBytes, length);
85 } 88 }
86 } 89 }
90 Uint8ClampedList[dart.implements] = [core.List$(core.int), TypedData];
87 dart.defineNamedConstructor(Uint8ClampedList, 'fromList'); 91 dart.defineNamedConstructor(Uint8ClampedList, 'fromList');
88 dart.defineNamedConstructor(Uint8ClampedList, 'view'); 92 dart.defineNamedConstructor(Uint8ClampedList, 'view');
89 Uint8ClampedList.BYTES_PER_ELEMENT = 1; 93 Uint8ClampedList.BYTES_PER_ELEMENT = 1;
90 class Int16List extends core.Object { 94 class Int16List extends core.Object {
91 Int16List(length) { 95 Int16List(length) {
92 return new _native_typed_data.NativeInt16List(length); 96 return new _native_typed_data.NativeInt16List(length);
93 } 97 }
94 fromList(elements) { 98 fromList(elements) {
95 return new _native_typed_data.NativeInt16List.fromList(elements); 99 return new _native_typed_data.NativeInt16List.fromList(elements);
96 } 100 }
97 view(buffer, offsetInBytes, length) { 101 view(buffer, offsetInBytes, length) {
98 if (offsetInBytes === void 0) 102 if (offsetInBytes === void 0)
99 offsetInBytes = 0; 103 offsetInBytes = 0;
100 if (length === void 0) 104 if (length === void 0)
101 length = null; 105 length = null;
102 return buffer.asInt16List(offsetInBytes, length); 106 return buffer.asInt16List(offsetInBytes, length);
103 } 107 }
104 } 108 }
109 Int16List[dart.implements] = [core.List$(core.int), TypedData];
105 dart.defineNamedConstructor(Int16List, 'fromList'); 110 dart.defineNamedConstructor(Int16List, 'fromList');
106 dart.defineNamedConstructor(Int16List, 'view'); 111 dart.defineNamedConstructor(Int16List, 'view');
107 Int16List.BYTES_PER_ELEMENT = 2; 112 Int16List.BYTES_PER_ELEMENT = 2;
108 class Uint16List extends core.Object { 113 class Uint16List extends core.Object {
109 Uint16List(length) { 114 Uint16List(length) {
110 return new _native_typed_data.NativeUint16List(length); 115 return new _native_typed_data.NativeUint16List(length);
111 } 116 }
112 fromList(elements) { 117 fromList(elements) {
113 return new _native_typed_data.NativeUint16List.fromList(elements); 118 return new _native_typed_data.NativeUint16List.fromList(elements);
114 } 119 }
115 view(buffer, offsetInBytes, length) { 120 view(buffer, offsetInBytes, length) {
116 if (offsetInBytes === void 0) 121 if (offsetInBytes === void 0)
117 offsetInBytes = 0; 122 offsetInBytes = 0;
118 if (length === void 0) 123 if (length === void 0)
119 length = null; 124 length = null;
120 return buffer.asUint16List(offsetInBytes, length); 125 return buffer.asUint16List(offsetInBytes, length);
121 } 126 }
122 } 127 }
128 Uint16List[dart.implements] = [core.List$(core.int), TypedData];
123 dart.defineNamedConstructor(Uint16List, 'fromList'); 129 dart.defineNamedConstructor(Uint16List, 'fromList');
124 dart.defineNamedConstructor(Uint16List, 'view'); 130 dart.defineNamedConstructor(Uint16List, 'view');
125 Uint16List.BYTES_PER_ELEMENT = 2; 131 Uint16List.BYTES_PER_ELEMENT = 2;
126 class Int32List extends core.Object { 132 class Int32List extends core.Object {
127 Int32List(length) { 133 Int32List(length) {
128 return new _native_typed_data.NativeInt32List(length); 134 return new _native_typed_data.NativeInt32List(length);
129 } 135 }
130 fromList(elements) { 136 fromList(elements) {
131 return new _native_typed_data.NativeInt32List.fromList(elements); 137 return new _native_typed_data.NativeInt32List.fromList(elements);
132 } 138 }
133 view(buffer, offsetInBytes, length) { 139 view(buffer, offsetInBytes, length) {
134 if (offsetInBytes === void 0) 140 if (offsetInBytes === void 0)
135 offsetInBytes = 0; 141 offsetInBytes = 0;
136 if (length === void 0) 142 if (length === void 0)
137 length = null; 143 length = null;
138 return buffer.asInt32List(offsetInBytes, length); 144 return buffer.asInt32List(offsetInBytes, length);
139 } 145 }
140 } 146 }
147 Int32List[dart.implements] = [core.List$(core.int), TypedData];
141 dart.defineNamedConstructor(Int32List, 'fromList'); 148 dart.defineNamedConstructor(Int32List, 'fromList');
142 dart.defineNamedConstructor(Int32List, 'view'); 149 dart.defineNamedConstructor(Int32List, 'view');
143 Int32List.BYTES_PER_ELEMENT = 4; 150 Int32List.BYTES_PER_ELEMENT = 4;
144 class Uint32List extends core.Object { 151 class Uint32List extends core.Object {
145 Uint32List(length) { 152 Uint32List(length) {
146 return new _native_typed_data.NativeUint32List(length); 153 return new _native_typed_data.NativeUint32List(length);
147 } 154 }
148 fromList(elements) { 155 fromList(elements) {
149 return new _native_typed_data.NativeUint32List.fromList(elements); 156 return new _native_typed_data.NativeUint32List.fromList(elements);
150 } 157 }
151 view(buffer, offsetInBytes, length) { 158 view(buffer, offsetInBytes, length) {
152 if (offsetInBytes === void 0) 159 if (offsetInBytes === void 0)
153 offsetInBytes = 0; 160 offsetInBytes = 0;
154 if (length === void 0) 161 if (length === void 0)
155 length = null; 162 length = null;
156 return buffer.asUint32List(offsetInBytes, length); 163 return buffer.asUint32List(offsetInBytes, length);
157 } 164 }
158 } 165 }
166 Uint32List[dart.implements] = [core.List$(core.int), TypedData];
159 dart.defineNamedConstructor(Uint32List, 'fromList'); 167 dart.defineNamedConstructor(Uint32List, 'fromList');
160 dart.defineNamedConstructor(Uint32List, 'view'); 168 dart.defineNamedConstructor(Uint32List, 'view');
161 Uint32List.BYTES_PER_ELEMENT = 4; 169 Uint32List.BYTES_PER_ELEMENT = 4;
162 class Int64List extends core.Object { 170 class Int64List extends core.Object {
163 Int64List(length) { 171 Int64List(length) {
164 throw new core.UnsupportedError("Int64List not supported by dart2js."); 172 throw new core.UnsupportedError("Int64List not supported by dart2js.");
165 } 173 }
166 fromList(elements) { 174 fromList(elements) {
167 throw new core.UnsupportedError("Int64List not supported by dart2js."); 175 throw new core.UnsupportedError("Int64List not supported by dart2js.");
168 } 176 }
169 view(buffer, offsetInBytes, length) { 177 view(buffer, offsetInBytes, length) {
170 if (offsetInBytes === void 0) 178 if (offsetInBytes === void 0)
171 offsetInBytes = 0; 179 offsetInBytes = 0;
172 if (length === void 0) 180 if (length === void 0)
173 length = null; 181 length = null;
174 return buffer.asInt64List(offsetInBytes, length); 182 return buffer.asInt64List(offsetInBytes, length);
175 } 183 }
176 } 184 }
185 Int64List[dart.implements] = [core.List$(core.int), TypedData];
177 dart.defineNamedConstructor(Int64List, 'fromList'); 186 dart.defineNamedConstructor(Int64List, 'fromList');
178 dart.defineNamedConstructor(Int64List, 'view'); 187 dart.defineNamedConstructor(Int64List, 'view');
179 Int64List.BYTES_PER_ELEMENT = 8; 188 Int64List.BYTES_PER_ELEMENT = 8;
180 class Uint64List extends core.Object { 189 class Uint64List extends core.Object {
181 Uint64List(length) { 190 Uint64List(length) {
182 throw new core.UnsupportedError("Uint64List not supported by dart2js."); 191 throw new core.UnsupportedError("Uint64List not supported by dart2js.");
183 } 192 }
184 fromList(elements) { 193 fromList(elements) {
185 throw new core.UnsupportedError("Uint64List not supported by dart2js."); 194 throw new core.UnsupportedError("Uint64List not supported by dart2js.");
186 } 195 }
187 view(buffer, offsetInBytes, length) { 196 view(buffer, offsetInBytes, length) {
188 if (offsetInBytes === void 0) 197 if (offsetInBytes === void 0)
189 offsetInBytes = 0; 198 offsetInBytes = 0;
190 if (length === void 0) 199 if (length === void 0)
191 length = null; 200 length = null;
192 return buffer.asUint64List(offsetInBytes, length); 201 return buffer.asUint64List(offsetInBytes, length);
193 } 202 }
194 } 203 }
204 Uint64List[dart.implements] = [core.List$(core.int), TypedData];
195 dart.defineNamedConstructor(Uint64List, 'fromList'); 205 dart.defineNamedConstructor(Uint64List, 'fromList');
196 dart.defineNamedConstructor(Uint64List, 'view'); 206 dart.defineNamedConstructor(Uint64List, 'view');
197 Uint64List.BYTES_PER_ELEMENT = 8; 207 Uint64List.BYTES_PER_ELEMENT = 8;
198 class Float32List extends core.Object { 208 class Float32List extends core.Object {
199 Float32List(length) { 209 Float32List(length) {
200 return new _native_typed_data.NativeFloat32List(length); 210 return new _native_typed_data.NativeFloat32List(length);
201 } 211 }
202 fromList(elements) { 212 fromList(elements) {
203 return new _native_typed_data.NativeFloat32List.fromList(elements); 213 return new _native_typed_data.NativeFloat32List.fromList(elements);
204 } 214 }
205 view(buffer, offsetInBytes, length) { 215 view(buffer, offsetInBytes, length) {
206 if (offsetInBytes === void 0) 216 if (offsetInBytes === void 0)
207 offsetInBytes = 0; 217 offsetInBytes = 0;
208 if (length === void 0) 218 if (length === void 0)
209 length = null; 219 length = null;
210 return buffer.asFloat32List(offsetInBytes, length); 220 return buffer.asFloat32List(offsetInBytes, length);
211 } 221 }
212 } 222 }
223 Float32List[dart.implements] = [core.List$(core.double), TypedData];
213 dart.defineNamedConstructor(Float32List, 'fromList'); 224 dart.defineNamedConstructor(Float32List, 'fromList');
214 dart.defineNamedConstructor(Float32List, 'view'); 225 dart.defineNamedConstructor(Float32List, 'view');
215 Float32List.BYTES_PER_ELEMENT = 4; 226 Float32List.BYTES_PER_ELEMENT = 4;
216 class Float64List extends core.Object { 227 class Float64List extends core.Object {
217 Float64List(length) { 228 Float64List(length) {
218 return new _native_typed_data.NativeFloat64List(length); 229 return new _native_typed_data.NativeFloat64List(length);
219 } 230 }
220 fromList(elements) { 231 fromList(elements) {
221 return new _native_typed_data.NativeFloat64List.fromList(elements); 232 return new _native_typed_data.NativeFloat64List.fromList(elements);
222 } 233 }
223 view(buffer, offsetInBytes, length) { 234 view(buffer, offsetInBytes, length) {
224 if (offsetInBytes === void 0) 235 if (offsetInBytes === void 0)
225 offsetInBytes = 0; 236 offsetInBytes = 0;
226 if (length === void 0) 237 if (length === void 0)
227 length = null; 238 length = null;
228 return buffer.asFloat64List(offsetInBytes, length); 239 return buffer.asFloat64List(offsetInBytes, length);
229 } 240 }
230 } 241 }
242 Float64List[dart.implements] = [core.List$(core.double), TypedData];
231 dart.defineNamedConstructor(Float64List, 'fromList'); 243 dart.defineNamedConstructor(Float64List, 'fromList');
232 dart.defineNamedConstructor(Float64List, 'view'); 244 dart.defineNamedConstructor(Float64List, 'view');
233 Float64List.BYTES_PER_ELEMENT = 8; 245 Float64List.BYTES_PER_ELEMENT = 8;
234 class Float32x4List extends core.Object { 246 class Float32x4List extends core.Object {
235 Float32x4List(length) { 247 Float32x4List(length) {
236 return new _native_typed_data.NativeFloat32x4List(length); 248 return new _native_typed_data.NativeFloat32x4List(length);
237 } 249 }
238 fromList(elements) { 250 fromList(elements) {
239 return new _native_typed_data.NativeFloat32x4List.fromList(elements); 251 return new _native_typed_data.NativeFloat32x4List.fromList(elements);
240 } 252 }
241 view(buffer, offsetInBytes, length) { 253 view(buffer, offsetInBytes, length) {
242 if (offsetInBytes === void 0) 254 if (offsetInBytes === void 0)
243 offsetInBytes = 0; 255 offsetInBytes = 0;
244 if (length === void 0) 256 if (length === void 0)
245 length = null; 257 length = null;
246 return buffer.asFloat32x4List(offsetInBytes, length); 258 return buffer.asFloat32x4List(offsetInBytes, length);
247 } 259 }
248 } 260 }
261 Float32x4List[dart.implements] = [core.List$(Float32x4), TypedData];
249 dart.defineNamedConstructor(Float32x4List, 'fromList'); 262 dart.defineNamedConstructor(Float32x4List, 'fromList');
250 dart.defineNamedConstructor(Float32x4List, 'view'); 263 dart.defineNamedConstructor(Float32x4List, 'view');
251 Float32x4List.BYTES_PER_ELEMENT = 16; 264 Float32x4List.BYTES_PER_ELEMENT = 16;
252 class Int32x4List extends core.Object { 265 class Int32x4List extends core.Object {
253 Int32x4List(length) { 266 Int32x4List(length) {
254 return new _native_typed_data.NativeInt32x4List(length); 267 return new _native_typed_data.NativeInt32x4List(length);
255 } 268 }
256 fromList(elements) { 269 fromList(elements) {
257 return new _native_typed_data.NativeInt32x4List.fromList(elements); 270 return new _native_typed_data.NativeInt32x4List.fromList(elements);
258 } 271 }
259 view(buffer, offsetInBytes, length) { 272 view(buffer, offsetInBytes, length) {
260 if (offsetInBytes === void 0) 273 if (offsetInBytes === void 0)
261 offsetInBytes = 0; 274 offsetInBytes = 0;
262 if (length === void 0) 275 if (length === void 0)
263 length = null; 276 length = null;
264 return buffer.asInt32x4List(offsetInBytes, length); 277 return buffer.asInt32x4List(offsetInBytes, length);
265 } 278 }
266 } 279 }
280 Int32x4List[dart.implements] = [core.List$(Int32x4), TypedData];
267 dart.defineNamedConstructor(Int32x4List, 'fromList'); 281 dart.defineNamedConstructor(Int32x4List, 'fromList');
268 dart.defineNamedConstructor(Int32x4List, 'view'); 282 dart.defineNamedConstructor(Int32x4List, 'view');
269 Int32x4List.BYTES_PER_ELEMENT = 16; 283 Int32x4List.BYTES_PER_ELEMENT = 16;
270 class Float64x2List extends core.Object { 284 class Float64x2List extends core.Object {
271 Float64x2List(length) { 285 Float64x2List(length) {
272 return new _native_typed_data.NativeFloat64x2List(length); 286 return new _native_typed_data.NativeFloat64x2List(length);
273 } 287 }
274 fromList(elements) { 288 fromList(elements) {
275 return new _native_typed_data.NativeFloat64x2List.fromList(elements); 289 return new _native_typed_data.NativeFloat64x2List.fromList(elements);
276 } 290 }
277 view(buffer, offsetInBytes, length) { 291 view(buffer, offsetInBytes, length) {
278 if (offsetInBytes === void 0) 292 if (offsetInBytes === void 0)
279 offsetInBytes = 0; 293 offsetInBytes = 0;
280 if (length === void 0) 294 if (length === void 0)
281 length = null; 295 length = null;
282 return buffer.asFloat64x2List(offsetInBytes, length); 296 return buffer.asFloat64x2List(offsetInBytes, length);
283 } 297 }
284 } 298 }
299 Float64x2List[dart.implements] = [core.List$(Float64x2), TypedData];
285 dart.defineNamedConstructor(Float64x2List, 'fromList'); 300 dart.defineNamedConstructor(Float64x2List, 'fromList');
286 dart.defineNamedConstructor(Float64x2List, 'view'); 301 dart.defineNamedConstructor(Float64x2List, 'view');
287 Float64x2List.BYTES_PER_ELEMENT = 16; 302 Float64x2List.BYTES_PER_ELEMENT = 16;
288 class Float32x4 extends core.Object { 303 class Float32x4 extends core.Object {
289 Float32x4(x, y, z, w) { 304 Float32x4(x, y, z, w) {
290 return new _native_typed_data.NativeFloat32x4(x, y, z, w); 305 return new _native_typed_data.NativeFloat32x4(x, y, z, w);
291 } 306 }
292 splat(v) { 307 splat(v) {
293 return new _native_typed_data.NativeFloat32x4.splat(v); 308 return new _native_typed_data.NativeFloat32x4.splat(v);
294 } 309 }
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 exports.Uint64List = Uint64List; 879 exports.Uint64List = Uint64List;
865 exports.Float32List = Float32List; 880 exports.Float32List = Float32List;
866 exports.Float64List = Float64List; 881 exports.Float64List = Float64List;
867 exports.Float32x4List = Float32x4List; 882 exports.Float32x4List = Float32x4List;
868 exports.Int32x4List = Int32x4List; 883 exports.Int32x4List = Int32x4List;
869 exports.Float64x2List = Float64x2List; 884 exports.Float64x2List = Float64x2List;
870 exports.Float32x4 = Float32x4; 885 exports.Float32x4 = Float32x4;
871 exports.Int32x4 = Int32x4; 886 exports.Int32x4 = Int32x4;
872 exports.Float64x2 = Float64x2; 887 exports.Float64x2 = Float64x2;
873 })(typed_data || (typed_data = {})); 888 })(typed_data || (typed_data = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/math.js ('k') | lib/runtime/dart_runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698