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

Side by Side Diff: src/harmony-simd.js

Issue 1309513005: Revert of [simd.js] Update to spec version 0.8.2. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | « src/contexts.h ('k') | src/heap/heap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function(global, utils) { 5 (function(global, utils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
11 // ------------------------------------------------------------------- 11 // -------------------------------------------------------------------
12 // Imports 12 // Imports
13 13
14 var GlobalSIMD = global.SIMD; 14 var GlobalSIMD = global.SIMD;
15 15
16 macro SIMD_FLOAT_TYPES(FUNCTION) 16 macro SIMD_FLOAT_TYPES(FUNCTION)
17 FUNCTION(Float32x4, float32x4, 4) 17 FUNCTION(Float32x4, float32x4, 4)
18 endmacro 18 endmacro
19 19
20 macro SIMD_INT_TYPES(FUNCTION) 20 macro SIMD_INT_TYPES(FUNCTION)
21 FUNCTION(Int32x4, int32x4, 4) 21 FUNCTION(Int32x4, int32x4, 4)
22 FUNCTION(Int16x8, int16x8, 8) 22 FUNCTION(Int16x8, int16x8, 8)
23 FUNCTION(Int8x16, int8x16, 16) 23 FUNCTION(Int8x16, int8x16, 16)
24 endmacro 24 endmacro
25 25
26 macro SIMD_UINT_TYPES(FUNCTION)
27 FUNCTION(Uint32x4, uint32x4, 4)
28 FUNCTION(Uint16x8, uint16x8, 8)
29 FUNCTION(Uint8x16, uint8x16, 16)
30 endmacro
31
32 macro SIMD_BOOL_TYPES(FUNCTION) 26 macro SIMD_BOOL_TYPES(FUNCTION)
33 FUNCTION(Bool32x4, bool32x4, 4) 27 FUNCTION(Bool32x4, bool32x4, 4)
34 FUNCTION(Bool16x8, bool16x8, 8) 28 FUNCTION(Bool16x8, bool16x8, 8)
35 FUNCTION(Bool8x16, bool8x16, 16) 29 FUNCTION(Bool8x16, bool8x16, 16)
36 endmacro 30 endmacro
37 31
38 macro SIMD_ALL_TYPES(FUNCTION) 32 macro SIMD_ALL_TYPES(FUNCTION)
39 SIMD_FLOAT_TYPES(FUNCTION) 33 SIMD_FLOAT_TYPES(FUNCTION)
40 SIMD_INT_TYPES(FUNCTION) 34 SIMD_INT_TYPES(FUNCTION)
41 SIMD_UINT_TYPES(FUNCTION)
42 SIMD_BOOL_TYPES(FUNCTION) 35 SIMD_BOOL_TYPES(FUNCTION)
43 endmacro 36 endmacro
44 37
45 macro DECLARE_GLOBALS(NAME, TYPE, LANES) 38 macro DECLARE_GLOBALS(NAME, TYPE, LANES)
46 var GlobalNAME = GlobalSIMD.NAME; 39 var GlobalNAME = GlobalSIMD.NAME;
47 endmacro 40 endmacro
48 41
49 SIMD_ALL_TYPES(DECLARE_GLOBALS) 42 SIMD_ALL_TYPES(DECLARE_GLOBALS)
50 43
51 macro DECLARE_COMMON_FUNCTIONS(NAME, TYPE, LANES) 44 macro DECLARE_COMMON_FUNCTIONS(NAME, TYPE, LANES)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if (typeof(this) !== 'TYPE' && %_ClassOf(this) !== 'NAME') { 78 if (typeof(this) !== 'TYPE' && %_ClassOf(this) !== 'NAME') {
86 throw MakeTypeError(kIncompatibleMethodReceiver, 79 throw MakeTypeError(kIncompatibleMethodReceiver,
87 "NAME.prototype.valueOf", this); 80 "NAME.prototype.valueOf", this);
88 } 81 }
89 return %_ValueOf(this); 82 return %_ValueOf(this);
90 } 83 }
91 84
92 function NAMEExtractLaneJS(instance, lane) { 85 function NAMEExtractLaneJS(instance, lane) {
93 return %NAMEExtractLane(instance, lane); 86 return %NAMEExtractLane(instance, lane);
94 } 87 }
88
89 function NAMEEqualJS(a, b) {
90 return %NAMEEqual(a, b);
91 }
92
93 function NAMENotEqualJS(a, b) {
94 return %NAMENotEqual(a, b);
95 }
95 endmacro 96 endmacro
96 97
97 SIMD_ALL_TYPES(DECLARE_COMMON_FUNCTIONS) 98 SIMD_ALL_TYPES(DECLARE_COMMON_FUNCTIONS)
98 99
99 macro DECLARE_INT_FUNCTIONS(NAME, TYPE, LANES) 100 macro DECLARE_INT_FUNCTIONS(NAME, TYPE, LANES)
100 function NAMEShiftLeftByScalarJS(instance, shift) { 101 function NAMEShiftLeftByScalarJS(instance, shift) {
101 return %NAMEShiftLeftByScalar(instance, shift); 102 return %NAMEShiftLeftByScalar(instance, shift);
102 } 103 }
103 104
105 function NAMEShiftRightLogicalByScalarJS(instance, shift) {
106 return %NAMEShiftRightLogicalByScalar(instance, shift);
107 }
108
104 function NAMEShiftRightArithmeticByScalarJS(instance, shift) { 109 function NAMEShiftRightArithmeticByScalarJS(instance, shift) {
105 return %NAMEShiftRightArithmeticByScalar(instance, shift); 110 return %NAMEShiftRightArithmeticByScalar(instance, shift);
106 } 111 }
107 endmacro 112 endmacro
108 113
109 SIMD_INT_TYPES(DECLARE_INT_FUNCTIONS) 114 SIMD_INT_TYPES(DECLARE_INT_FUNCTIONS)
110 115
111 macro DECLARE_UINT_FUNCTIONS(NAME, TYPE, LANES)
112 function NAMEShiftLeftByScalarJS(instance, shift) {
113 return %NAMEShiftLeftByScalar(instance, shift);
114 }
115
116 function NAMEShiftRightLogicalByScalarJS(instance, shift) {
117 return %NAMEShiftRightLogicalByScalar(instance, shift);
118 }
119
120 function NAMEHorizontalSumJS(instance) {
121 return %NAMEHorizontalSum(instance);
122 }
123 endmacro
124
125 SIMD_UINT_TYPES(DECLARE_UINT_FUNCTIONS)
126
127 macro SIMD_SMALL_INT_TYPES(FUNCTION)
128 FUNCTION(Int16x8)
129 FUNCTION(Int8x16)
130 FUNCTION(Uint8x16)
131 FUNCTION(Uint16x8)
132 endmacro
133
134 macro DECLARE_SMALL_INT_FUNCTIONS(NAME)
135 function NAMEAddSaturateJS(a, b) {
136 return %NAMEAddSaturate(a, b);
137 }
138
139 function NAMESubSaturateJS(a, b) {
140 return %NAMESubSaturate(a, b);
141 }
142 endmacro
143
144 SIMD_SMALL_INT_TYPES(DECLARE_SMALL_INT_FUNCTIONS)
145
146 macro SIMD_SMALL_UINT_TYPES(FUNCTION)
147 FUNCTION(Uint8x16)
148 FUNCTION(Uint16x8)
149 endmacro
150
151 macro DECLARE_SMALL_UINT_FUNCTIONS(NAME)
152 function NAMEAbsoluteDifferenceJS(a, b) {
153 return %NAMEAbsoluteDifference(a, b);
154 }
155
156 function NAMEWidenedAbsoluteDifferenceJS(a, b) {
157 return %NAMEWidenedAbsoluteDifference(a, b);
158 }
159 endmacro
160
161 SIMD_SMALL_UINT_TYPES(DECLARE_SMALL_UINT_FUNCTIONS)
162
163 macro DECLARE_SIGNED_FUNCTIONS(NAME, TYPE, LANES)
164 function NAMENegJS(a) {
165 return %NAMENeg(a);
166 }
167 endmacro
168
169 SIMD_FLOAT_TYPES(DECLARE_SIGNED_FUNCTIONS)
170 SIMD_INT_TYPES(DECLARE_SIGNED_FUNCTIONS)
171
172 macro DECLARE_BOOL_FUNCTIONS(NAME, TYPE, LANES) 116 macro DECLARE_BOOL_FUNCTIONS(NAME, TYPE, LANES)
173 function NAMEReplaceLaneJS(instance, lane, value) { 117 function NAMEReplaceLaneJS(instance, lane, value) {
174 return %NAMEReplaceLane(instance, lane, value); 118 return %NAMEReplaceLane(instance, lane, value);
175 } 119 }
176 120
177 function NAMEAnyTrueJS(s) { 121 function NAMEAnyTrueJS(s) {
178 return %NAMEAnyTrue(s); 122 return %NAMEAnyTrue(s);
179 } 123 }
180 124
181 function NAMEAllTrueJS(s) { 125 function NAMEAllTrueJS(s) {
182 return %NAMEAllTrue(s); 126 return %NAMEAllTrue(s);
183 } 127 }
184 endmacro 128 endmacro
185 129
186 SIMD_BOOL_TYPES(DECLARE_BOOL_FUNCTIONS) 130 SIMD_BOOL_TYPES(DECLARE_BOOL_FUNCTIONS)
187 131
132 macro SIMD_UNSIGNED_INT_TYPES(FUNCTION)
133 FUNCTION(Int16x8)
134 FUNCTION(Int8x16)
135 endmacro
136
137 macro DECLARE_UNSIGNED_INT_FUNCTIONS(NAME)
138 function NAMEUnsignedExtractLaneJS(instance, lane) {
139 return %NAMEUnsignedExtractLane(instance, lane);
140 }
141 endmacro
142
143 SIMD_UNSIGNED_INT_TYPES(DECLARE_UNSIGNED_INT_FUNCTIONS)
144
188 macro SIMD_NUMERIC_TYPES(FUNCTION) 145 macro SIMD_NUMERIC_TYPES(FUNCTION)
189 SIMD_FLOAT_TYPES(FUNCTION) 146 SIMD_FLOAT_TYPES(FUNCTION)
190 SIMD_INT_TYPES(FUNCTION) 147 SIMD_INT_TYPES(FUNCTION)
191 SIMD_UINT_TYPES(FUNCTION)
192 endmacro 148 endmacro
193 149
194 macro DECLARE_NUMERIC_FUNCTIONS(NAME, TYPE, LANES) 150 macro DECLARE_NUMERIC_FUNCTIONS(NAME, TYPE, LANES)
195 function NAMEReplaceLaneJS(instance, lane, value) { 151 function NAMEReplaceLaneJS(instance, lane, value) {
196 return %NAMEReplaceLane(instance, lane, TO_NUMBER_INLINE(value)); 152 return %NAMEReplaceLane(instance, lane, TO_NUMBER_INLINE(value));
197 } 153 }
198 154
199 function NAMESelectJS(selector, a, b) { 155 function NAMESelectJS(selector, a, b) {
200 return %NAMESelect(selector, a, b); 156 return %NAMESelect(selector, a, b);
201 } 157 }
202 158
159 function NAMENegJS(a) {
160 return %NAMENeg(a);
161 }
162
203 function NAMEAddJS(a, b) { 163 function NAMEAddJS(a, b) {
204 return %NAMEAdd(a, b); 164 return %NAMEAdd(a, b);
205 } 165 }
206 166
207 function NAMESubJS(a, b) { 167 function NAMESubJS(a, b) {
208 return %NAMESub(a, b); 168 return %NAMESub(a, b);
209 } 169 }
210 170
211 function NAMEMulJS(a, b) { 171 function NAMEMulJS(a, b) {
212 return %NAMEMul(a, b); 172 return %NAMEMul(a, b);
213 } 173 }
214 174
215 function NAMEMinJS(a, b) { 175 function NAMEMinJS(a, b) {
216 return %NAMEMin(a, b); 176 return %NAMEMin(a, b);
217 } 177 }
218 178
219 function NAMEMaxJS(a, b) { 179 function NAMEMaxJS(a, b) {
220 return %NAMEMax(a, b); 180 return %NAMEMax(a, b);
221 } 181 }
222 182
223 function NAMEEqualJS(a, b) {
224 return %NAMEEqual(a, b);
225 }
226
227 function NAMENotEqualJS(a, b) {
228 return %NAMENotEqual(a, b);
229 }
230
231 function NAMELessThanJS(a, b) { 183 function NAMELessThanJS(a, b) {
232 return %NAMELessThan(a, b); 184 return %NAMELessThan(a, b);
233 } 185 }
234 186
235 function NAMELessThanOrEqualJS(a, b) { 187 function NAMELessThanOrEqualJS(a, b) {
236 return %NAMELessThanOrEqual(a, b); 188 return %NAMELessThanOrEqual(a, b);
237 } 189 }
238 190
239 function NAMEGreaterThanJS(a, b) { 191 function NAMEGreaterThanJS(a, b) {
240 return %NAMEGreaterThan(a, b); 192 return %NAMEGreaterThan(a, b);
241 } 193 }
242 194
243 function NAMEGreaterThanOrEqualJS(a, b) { 195 function NAMEGreaterThanOrEqualJS(a, b) {
244 return %NAMEGreaterThanOrEqual(a, b); 196 return %NAMEGreaterThanOrEqual(a, b);
245 } 197 }
246 endmacro 198 endmacro
247 199
248 SIMD_NUMERIC_TYPES(DECLARE_NUMERIC_FUNCTIONS) 200 SIMD_NUMERIC_TYPES(DECLARE_NUMERIC_FUNCTIONS)
249 201
250 macro SIMD_LOGICAL_TYPES(FUNCTION) 202 macro SIMD_LOGICAL_TYPES(FUNCTION)
251 SIMD_INT_TYPES(FUNCTION) 203 SIMD_INT_TYPES(FUNCTION)
252 SIMD_UINT_TYPES(FUNCTION)
253 SIMD_BOOL_TYPES(FUNCTION) 204 SIMD_BOOL_TYPES(FUNCTION)
254 endmacro 205 endmacro
255 206
256 macro DECLARE_LOGICAL_FUNCTIONS(NAME, TYPE, LANES) 207 macro DECLARE_LOGICAL_FUNCTIONS(NAME, TYPE, LANES)
257 function NAMEAndJS(a, b) { 208 function NAMEAndJS(a, b) {
258 return %NAMEAnd(a, b); 209 return %NAMEAnd(a, b);
259 } 210 }
260 211
261 function NAMEOrJS(a, b) { 212 function NAMEOrJS(a, b) {
262 return %NAMEOr(a, b); 213 return %NAMEOr(a, b);
263 } 214 }
264 215
265 function NAMEXorJS(a, b) { 216 function NAMEXorJS(a, b) {
266 return %NAMEXor(a, b); 217 return %NAMEXor(a, b);
267 } 218 }
268 219
269 function NAMENotJS(a) { 220 function NAMENotJS(a) {
270 return %NAMENot(a); 221 return %NAMENot(a);
271 } 222 }
272 endmacro 223 endmacro
273 224
274 SIMD_LOGICAL_TYPES(DECLARE_LOGICAL_FUNCTIONS) 225 SIMD_LOGICAL_TYPES(DECLARE_LOGICAL_FUNCTIONS)
275 226
276 macro SIMD_FROM_TYPES(FUNCTION) 227 macro SIMD_FROM_TYPES(FUNCTION)
277 FUNCTION(Float32x4, Int32x4) 228 FUNCTION(Float32x4, Int32x4)
278 FUNCTION(Float32x4, Uint32x4)
279 FUNCTION(Int32x4, Float32x4) 229 FUNCTION(Int32x4, Float32x4)
280 FUNCTION(Int32x4, Uint32x4)
281 FUNCTION(Uint32x4, Float32x4)
282 FUNCTION(Uint32x4, Int32x4)
283 FUNCTION(Int16x8, Uint16x8)
284 FUNCTION(Uint16x8, Int16x8)
285 FUNCTION(Int8x16, Uint8x16)
286 FUNCTION(Uint8x16, Int8x16)
287 endmacro 230 endmacro
288 231
289 macro DECLARE_FROM_FUNCTIONS(TO, FROM) 232 macro DECLARE_FROM_FUNCTIONS(TO, FROM)
290 function TOFromFROMJS(a) { 233 function TOFromFROMJS(a) {
291 return %TOFromFROM(a); 234 return %TOFromFROM(a);
292 } 235 }
293 endmacro 236 endmacro
294 237
295 SIMD_FROM_TYPES(DECLARE_FROM_FUNCTIONS) 238 SIMD_FROM_TYPES(DECLARE_FROM_FUNCTIONS)
296 239
297 macro SIMD_FROM_BITS_TYPES(FUNCTION) 240 macro SIMD_FROM_BITS_TYPES(FUNCTION)
298 FUNCTION(Float32x4, Int32x4) 241 FUNCTION(Float32x4, Int32x4)
299 FUNCTION(Float32x4, Uint32x4)
300 FUNCTION(Float32x4, Int16x8) 242 FUNCTION(Float32x4, Int16x8)
301 FUNCTION(Float32x4, Uint16x8)
302 FUNCTION(Float32x4, Int8x16) 243 FUNCTION(Float32x4, Int8x16)
303 FUNCTION(Float32x4, Uint8x16)
304 FUNCTION(Int32x4, Float32x4) 244 FUNCTION(Int32x4, Float32x4)
305 FUNCTION(Int32x4, Uint32x4)
306 FUNCTION(Int32x4, Int16x8) 245 FUNCTION(Int32x4, Int16x8)
307 FUNCTION(Int32x4, Uint16x8)
308 FUNCTION(Int32x4, Int8x16) 246 FUNCTION(Int32x4, Int8x16)
309 FUNCTION(Int32x4, Uint8x16)
310 FUNCTION(Uint32x4, Float32x4)
311 FUNCTION(Uint32x4, Int32x4)
312 FUNCTION(Uint32x4, Int16x8)
313 FUNCTION(Uint32x4, Uint16x8)
314 FUNCTION(Uint32x4, Int8x16)
315 FUNCTION(Uint32x4, Uint8x16)
316 FUNCTION(Int16x8, Float32x4) 247 FUNCTION(Int16x8, Float32x4)
317 FUNCTION(Int16x8, Int32x4) 248 FUNCTION(Int16x8, Int32x4)
318 FUNCTION(Int16x8, Uint32x4)
319 FUNCTION(Int16x8, Uint16x8)
320 FUNCTION(Int16x8, Int8x16) 249 FUNCTION(Int16x8, Int8x16)
321 FUNCTION(Int16x8, Uint8x16)
322 FUNCTION(Uint16x8, Float32x4)
323 FUNCTION(Uint16x8, Int32x4)
324 FUNCTION(Uint16x8, Uint32x4)
325 FUNCTION(Uint16x8, Int16x8)
326 FUNCTION(Uint16x8, Int8x16)
327 FUNCTION(Uint16x8, Uint8x16)
328 FUNCTION(Int8x16, Float32x4) 250 FUNCTION(Int8x16, Float32x4)
329 FUNCTION(Int8x16, Int32x4) 251 FUNCTION(Int8x16, Int32x4)
330 FUNCTION(Int8x16, Uint32x4)
331 FUNCTION(Int8x16, Int16x8) 252 FUNCTION(Int8x16, Int16x8)
332 FUNCTION(Int8x16, Uint16x8)
333 FUNCTION(Int8x16, Uint8x16)
334 FUNCTION(Uint8x16, Float32x4)
335 FUNCTION(Uint8x16, Int32x4)
336 FUNCTION(Uint8x16, Uint32x4)
337 FUNCTION(Uint8x16, Int16x8)
338 FUNCTION(Uint8x16, Uint16x8)
339 FUNCTION(Uint8x16, Int8x16)
340 endmacro 253 endmacro
341 254
342 macro DECLARE_FROM_BITS_FUNCTIONS(TO, FROM) 255 macro DECLARE_FROM_BITS_FUNCTIONS(TO, FROM)
343 function TOFromFROMBitsJS(a) { 256 function TOFromFROMBitsJS(a) {
344 return %TOFromFROMBits(a); 257 return %TOFromFROMBits(a);
345 } 258 }
346 endmacro 259 endmacro
347 260
348 SIMD_FROM_BITS_TYPES(DECLARE_FROM_BITS_FUNCTIONS) 261 SIMD_FROM_BITS_TYPES(DECLARE_FROM_BITS_FUNCTIONS)
349 262
350 //------------------------------------------------------------------- 263 //-------------------------------------------------------------------
351 264
352 macro SIMD_X4_TYPES(FUNCTION)
353 FUNCTION(Float32x4)
354 FUNCTION(Int32x4)
355 FUNCTION(Uint32x4)
356 FUNCTION(Bool32x4)
357 endmacro
358
359 macro DECLARE_X4_FUNCTIONS(NAME)
360 function NAMESplat(s) {
361 return %CreateNAME(s, s, s, s);
362 }
363
364 function NAMESwizzleJS(a, c0, c1, c2, c3) {
365 return %NAMESwizzle(a, c0, c1, c2, c3);
366 }
367
368 function NAMEShuffleJS(a, b, c0, c1, c2, c3) {
369 return %NAMEShuffle(a, b, c0, c1, c2, c3);
370 }
371 endmacro
372
373 SIMD_X4_TYPES(DECLARE_X4_FUNCTIONS)
374
375 macro SIMD_X8_TYPES(FUNCTION)
376 FUNCTION(Int16x8)
377 FUNCTION(Uint16x8)
378 FUNCTION(Bool16x8)
379 endmacro
380
381 macro DECLARE_X8_FUNCTIONS(NAME)
382 function NAMESplat(s) {
383 return %CreateNAME(s, s, s, s, s, s, s, s);
384 }
385
386 function NAMESwizzleJS(a, c0, c1, c2, c3, c4, c5, c6, c7) {
387 return %NAMESwizzle(a, c0, c1, c2, c3, c4, c5, c6, c7);
388 }
389
390 function NAMEShuffleJS(a, b, c0, c1, c2, c3, c4, c5, c6, c7) {
391 return %NAMEShuffle(a, b, c0, c1, c2, c3, c4, c5, c6, c7);
392 }
393 endmacro
394
395 SIMD_X8_TYPES(DECLARE_X8_FUNCTIONS)
396
397 macro SIMD_X16_TYPES(FUNCTION)
398 FUNCTION(Int8x16)
399 FUNCTION(Uint8x16)
400 FUNCTION(Bool8x16)
401 endmacro
402
403 macro DECLARE_X16_FUNCTIONS(NAME)
404 function NAMESplat(s) {
405 return %CreateNAME(s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s);
406 }
407
408 function NAMESwizzleJS(a, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
409 c12, c13, c14, c15) {
410 return %NAMESwizzle(a, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
411 c12, c13, c14, c15);
412 }
413
414 function NAMEShuffleJS(a, b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10,
415 c11, c12, c13, c14, c15) {
416 return %NAMEShuffle(a, b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10,
417 c11, c12, c13, c14, c15);
418 }
419 endmacro
420
421 SIMD_X16_TYPES(DECLARE_X16_FUNCTIONS)
422
423 //-------------------------------------------------------------------
424
425 function Float32x4Constructor(c0, c1, c2, c3) { 265 function Float32x4Constructor(c0, c1, c2, c3) {
426 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Float32x4"); 266 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Float32x4");
427 return %CreateFloat32x4(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1), 267 return %CreateFloat32x4(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1),
428 TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3)); 268 TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3));
429 } 269 }
430 270
431 271
272 function Float32x4Splat(s) {
273 return %CreateFloat32x4(s, s, s, s);
274 }
275
276
277 function Float32x4AbsJS(a) {
278 return %Float32x4Abs(a);
279 }
280
281
282 function Float32x4SqrtJS(a) {
283 return %Float32x4Sqrt(a);
284 }
285
286
287 function Float32x4RecipApproxJS(a) {
288 return %Float32x4RecipApprox(a);
289 }
290
291
292 function Float32x4RecipSqrtApproxJS(a) {
293 return %Float32x4RecipSqrtApprox(a);
294 }
295
296
297 function Float32x4DivJS(a, b) {
298 return %Float32x4Div(a, b);
299 }
300
301
302 function Float32x4MinNumJS(a, b) {
303 return %Float32x4MinNum(a, b);
304 }
305
306
307 function Float32x4MaxNumJS(a, b) {
308 return %Float32x4MaxNum(a, b);
309 }
310
311
312 function Float32x4SwizzleJS(a, c0, c1, c2, c3) {
313 return %Float32x4Swizzle(a, c0, c1, c2, c3);
314 }
315
316
317 function Float32x4ShuffleJS(a, b, c0, c1, c2, c3) {
318 return %Float32x4Shuffle(a, b, c0, c1, c2, c3);
319 }
320
321
432 function Int32x4Constructor(c0, c1, c2, c3) { 322 function Int32x4Constructor(c0, c1, c2, c3) {
433 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Int32x4"); 323 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Int32x4");
434 return %CreateInt32x4(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1), 324 return %CreateInt32x4(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1),
435 TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3)); 325 TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3));
436 } 326 }
437 327
438 328
439 function Uint32x4Constructor(c0, c1, c2, c3) { 329 function Int32x4Splat(s) {
440 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Uint32x4"); 330 return %CreateInt32x4(s, s, s, s);
441 return %CreateUint32x4(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1), 331 }
442 TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3)); 332
333
334 function Int32x4SwizzleJS(a, c0, c1, c2, c3) {
335 return %Int32x4Swizzle(a, c0, c1, c2, c3);
336 }
337
338
339 function Int32x4ShuffleJS(a, b, c0, c1, c2, c3) {
340 return %Int32x4Shuffle(a, b, c0, c1, c2, c3);
443 } 341 }
444 342
445 343
446 function Bool32x4Constructor(c0, c1, c2, c3) { 344 function Bool32x4Constructor(c0, c1, c2, c3) {
447 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Bool32x4"); 345 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Bool32x4");
448 return %CreateBool32x4(c0, c1, c2, c3); 346 return %CreateBool32x4(c0, c1, c2, c3);
449 } 347 }
450 348
451 349
350 function Bool32x4Splat(s) {
351 return %CreateBool32x4(s, s, s, s);
352 }
353
354 function Bool32x4SwizzleJS(a, c0, c1, c2, c3) {
355 return %Bool32x4Swizzle(a, c0, c1, c2, c3);
356 }
357
358
359 function Bool32x4ShuffleJS(a, b, c0, c1, c2, c3) {
360 return %Bool32x4Shuffle(a, b, c0, c1, c2, c3);
361 }
362
363
452 function Int16x8Constructor(c0, c1, c2, c3, c4, c5, c6, c7) { 364 function Int16x8Constructor(c0, c1, c2, c3, c4, c5, c6, c7) {
453 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Int16x8"); 365 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Int16x8");
454 return %CreateInt16x8(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1), 366 return %CreateInt16x8(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1),
455 TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3), 367 TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3),
456 TO_NUMBER_INLINE(c4), TO_NUMBER_INLINE(c5), 368 TO_NUMBER_INLINE(c4), TO_NUMBER_INLINE(c5),
457 TO_NUMBER_INLINE(c6), TO_NUMBER_INLINE(c7)); 369 TO_NUMBER_INLINE(c6), TO_NUMBER_INLINE(c7));
458 } 370 }
459 371
460 372
461 function Uint16x8Constructor(c0, c1, c2, c3, c4, c5, c6, c7) { 373 function Int16x8Splat(s) {
462 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Uint16x8"); 374 return %CreateInt16x8(s, s, s, s, s, s, s, s);
463 return %CreateUint16x8(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1), 375 }
464 TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3), 376
465 TO_NUMBER_INLINE(c4), TO_NUMBER_INLINE(c5), 377
466 TO_NUMBER_INLINE(c6), TO_NUMBER_INLINE(c7)); 378 function Int16x8SwizzleJS(a, c0, c1, c2, c3, c4, c5, c6, c7) {
379 return %Int16x8Swizzle(a, c0, c1, c2, c3, c4, c5, c6, c7);
380 }
381
382
383 function Int16x8ShuffleJS(a, b, c0, c1, c2, c3, c4, c5, c6, c7) {
384 return %Int16x8Shuffle(a, b, c0, c1, c2, c3, c4, c5, c6, c7);
467 } 385 }
468 386
469 387
470 function Bool16x8Constructor(c0, c1, c2, c3, c4, c5, c6, c7) { 388 function Bool16x8Constructor(c0, c1, c2, c3, c4, c5, c6, c7) {
471 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Bool16x8"); 389 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Bool16x8");
472 return %CreateBool16x8(c0, c1, c2, c3, c4, c5, c6, c7); 390 return %CreateBool16x8(c0, c1, c2, c3, c4, c5, c6, c7);
473 } 391 }
474 392
475 393
394 function Bool16x8Splat(s) {
395 return %CreateBool16x8(s, s, s, s, s, s, s, s);
396 }
397
398
399 function Bool16x8SwizzleJS(a, c0, c1, c2, c3, c4, c5, c6, c7) {
400 return %Bool16x8Swizzle(a, c0, c1, c2, c3, c4, c5, c6, c7);
401 }
402
403
404 function Bool16x8ShuffleJS(a, b, c0, c1, c2, c3, c4, c5, c6, c7) {
405 return %Bool16x8Shuffle(a, b, c0, c1, c2, c3, c4, c5, c6, c7);
406 }
407
408
476 function Int8x16Constructor(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, 409 function Int8x16Constructor(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
477 c12, c13, c14, c15) { 410 c12, c13, c14, c15) {
478 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Int8x16"); 411 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Int8x16");
479 return %CreateInt8x16(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1), 412 return %CreateInt8x16(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1),
480 TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3), 413 TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3),
481 TO_NUMBER_INLINE(c4), TO_NUMBER_INLINE(c5), 414 TO_NUMBER_INLINE(c4), TO_NUMBER_INLINE(c5),
482 TO_NUMBER_INLINE(c6), TO_NUMBER_INLINE(c7), 415 TO_NUMBER_INLINE(c6), TO_NUMBER_INLINE(c7),
483 TO_NUMBER_INLINE(c8), TO_NUMBER_INLINE(c9), 416 TO_NUMBER_INLINE(c8), TO_NUMBER_INLINE(c9),
484 TO_NUMBER_INLINE(c10), TO_NUMBER_INLINE(c11), 417 TO_NUMBER_INLINE(c10), TO_NUMBER_INLINE(c11),
485 TO_NUMBER_INLINE(c12), TO_NUMBER_INLINE(c13), 418 TO_NUMBER_INLINE(c12), TO_NUMBER_INLINE(c13),
486 TO_NUMBER_INLINE(c14), TO_NUMBER_INLINE(c15)); 419 TO_NUMBER_INLINE(c14), TO_NUMBER_INLINE(c15));
487 } 420 }
488 421
489 422
490 function Uint8x16Constructor(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, 423 function Int8x16Splat(s) {
491 c12, c13, c14, c15) { 424 return %CreateInt8x16(s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s);
492 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Uint8x16");
493 return %CreateUint8x16(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1),
494 TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3),
495 TO_NUMBER_INLINE(c4), TO_NUMBER_INLINE(c5),
496 TO_NUMBER_INLINE(c6), TO_NUMBER_INLINE(c7),
497 TO_NUMBER_INLINE(c8), TO_NUMBER_INLINE(c9),
498 TO_NUMBER_INLINE(c10), TO_NUMBER_INLINE(c11),
499 TO_NUMBER_INLINE(c12), TO_NUMBER_INLINE(c13),
500 TO_NUMBER_INLINE(c14), TO_NUMBER_INLINE(c15));
501 } 425 }
502 426
503 427
428 function Int8x16SwizzleJS(a, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
429 c12, c13, c14, c15) {
430 return %Int8x16Swizzle(a, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
431 c12, c13, c14, c15);
432 }
433
434
435 function Int8x16ShuffleJS(a, b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10,
436 c11, c12, c13, c14, c15) {
437 return %Int8x16Shuffle(a, b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10,
438 c11, c12, c13, c14, c15);
439 }
440
441
504 function Bool8x16Constructor(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, 442 function Bool8x16Constructor(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
505 c12, c13, c14, c15) { 443 c12, c13, c14, c15) {
506 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Bool8x16"); 444 if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Bool8x16");
507 return %CreateBool8x16(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, 445 return %CreateBool8x16(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
508 c13, c14, c15); 446 c13, c14, c15);
509 } 447 }
510 448
511 449
512 function Float32x4AbsJS(a) { 450 function Bool8x16Splat(s) {
513 return %Float32x4Abs(a); 451 return %CreateBool8x16(s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s);
514 } 452 }
515 453
516 454
517 function Float32x4SqrtJS(a) { 455 function Bool8x16SwizzleJS(a, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
518 return %Float32x4Sqrt(a); 456 c12, c13, c14, c15) {
457 return %Bool8x16Swizzle(a, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
458 c12, c13, c14, c15);
519 } 459 }
520 460
521 461
522 function Float32x4RecipApproxJS(a) { 462 function Bool8x16ShuffleJS(a, b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10,
523 return %Float32x4RecipApprox(a); 463 c11, c12, c13, c14, c15) {
464 return %Bool8x16Shuffle(a, b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10,
465 c11, c12, c13, c14, c15);
524 } 466 }
525 467
526 468
527 function Float32x4RecipSqrtApproxJS(a) {
528 return %Float32x4RecipSqrtApprox(a);
529 }
530
531
532 function Float32x4DivJS(a, b) {
533 return %Float32x4Div(a, b);
534 }
535
536
537 function Float32x4MinNumJS(a, b) {
538 return %Float32x4MinNum(a, b);
539 }
540
541
542 function Float32x4MaxNumJS(a, b) {
543 return %Float32x4MaxNum(a, b);
544 }
545
546
547 %AddNamedProperty(GlobalSIMD, symbolToStringTag, 'SIMD', READ_ONLY | DONT_ENUM); 469 %AddNamedProperty(GlobalSIMD, symbolToStringTag, 'SIMD', READ_ONLY | DONT_ENUM);
548 470
549 macro SETUP_SIMD_TYPE(NAME, TYPE, LANES) 471 macro SETUP_SIMD_TYPE(NAME, TYPE, LANES)
550 %SetCode(GlobalNAME, NAMEConstructor); 472 %SetCode(GlobalNAME, NAMEConstructor);
551 %FunctionSetPrototype(GlobalNAME, {}); 473 %FunctionSetPrototype(GlobalNAME, {});
552 %AddNamedProperty(GlobalNAME.prototype, 'constructor', GlobalNAME, 474 %AddNamedProperty(GlobalNAME.prototype, 'constructor', GlobalNAME,
553 DONT_ENUM); 475 DONT_ENUM);
554 %AddNamedProperty(GlobalNAME.prototype, symbolToStringTag, 'NAME', 476 %AddNamedProperty(GlobalNAME.prototype, symbolToStringTag, 'NAME',
555 DONT_ENUM | READ_ONLY); 477 DONT_ENUM | READ_ONLY);
556 utils.InstallFunctions(GlobalNAME.prototype, DONT_ENUM, [ 478 utils.InstallFunctions(GlobalNAME.prototype, DONT_ENUM, [
(...skipping 28 matching lines...) Expand all
585 'lessThan', Float32x4LessThanJS, 507 'lessThan', Float32x4LessThanJS,
586 'lessThanOrEqual', Float32x4LessThanOrEqualJS, 508 'lessThanOrEqual', Float32x4LessThanOrEqualJS,
587 'greaterThan', Float32x4GreaterThanJS, 509 'greaterThan', Float32x4GreaterThanJS,
588 'greaterThanOrEqual', Float32x4GreaterThanOrEqualJS, 510 'greaterThanOrEqual', Float32x4GreaterThanOrEqualJS,
589 'equal', Float32x4EqualJS, 511 'equal', Float32x4EqualJS,
590 'notEqual', Float32x4NotEqualJS, 512 'notEqual', Float32x4NotEqualJS,
591 'select', Float32x4SelectJS, 513 'select', Float32x4SelectJS,
592 'swizzle', Float32x4SwizzleJS, 514 'swizzle', Float32x4SwizzleJS,
593 'shuffle', Float32x4ShuffleJS, 515 'shuffle', Float32x4ShuffleJS,
594 'fromInt32x4', Float32x4FromInt32x4JS, 516 'fromInt32x4', Float32x4FromInt32x4JS,
595 'fromUint32x4', Float32x4FromUint32x4JS,
596 'fromInt32x4Bits', Float32x4FromInt32x4BitsJS, 517 'fromInt32x4Bits', Float32x4FromInt32x4BitsJS,
597 'fromUint32x4Bits', Float32x4FromUint32x4BitsJS,
598 'fromInt16x8Bits', Float32x4FromInt16x8BitsJS, 518 'fromInt16x8Bits', Float32x4FromInt16x8BitsJS,
599 'fromUint16x8Bits', Float32x4FromUint16x8BitsJS,
600 'fromInt8x16Bits', Float32x4FromInt8x16BitsJS, 519 'fromInt8x16Bits', Float32x4FromInt8x16BitsJS,
601 'fromUint8x16Bits', Float32x4FromUint8x16BitsJS,
602 ]); 520 ]);
603 521
604 utils.InstallFunctions(GlobalInt32x4, DONT_ENUM, [ 522 utils.InstallFunctions(GlobalInt32x4, DONT_ENUM, [
605 'splat', Int32x4Splat, 523 'splat', Int32x4Splat,
606 'check', Int32x4CheckJS, 524 'check', Int32x4CheckJS,
607 'extractLane', Int32x4ExtractLaneJS, 525 'extractLane', Int32x4ExtractLaneJS,
608 'replaceLane', Int32x4ReplaceLaneJS, 526 'replaceLane', Int32x4ReplaceLaneJS,
609 'neg', Int32x4NegJS, 527 'neg', Int32x4NegJS,
610 'add', Int32x4AddJS, 528 'add', Int32x4AddJS,
611 'sub', Int32x4SubJS, 529 'sub', Int32x4SubJS,
612 'mul', Int32x4MulJS, 530 'mul', Int32x4MulJS,
613 'min', Int32x4MinJS, 531 'min', Int32x4MinJS,
614 'max', Int32x4MaxJS, 532 'max', Int32x4MaxJS,
615 'and', Int32x4AndJS, 533 'and', Int32x4AndJS,
616 'or', Int32x4OrJS, 534 'or', Int32x4OrJS,
617 'xor', Int32x4XorJS, 535 'xor', Int32x4XorJS,
618 'not', Int32x4NotJS, 536 'not', Int32x4NotJS,
619 'shiftLeftByScalar', Int32x4ShiftLeftByScalarJS, 537 'shiftLeftByScalar', Int32x4ShiftLeftByScalarJS,
538 'shiftRightLogicalByScalar', Int32x4ShiftRightLogicalByScalarJS,
620 'shiftRightArithmeticByScalar', Int32x4ShiftRightArithmeticByScalarJS, 539 'shiftRightArithmeticByScalar', Int32x4ShiftRightArithmeticByScalarJS,
621 'lessThan', Int32x4LessThanJS, 540 'lessThan', Int32x4LessThanJS,
622 'lessThanOrEqual', Int32x4LessThanOrEqualJS, 541 'lessThanOrEqual', Int32x4LessThanOrEqualJS,
623 'greaterThan', Int32x4GreaterThanJS, 542 'greaterThan', Int32x4GreaterThanJS,
624 'greaterThanOrEqual', Int32x4GreaterThanOrEqualJS, 543 'greaterThanOrEqual', Int32x4GreaterThanOrEqualJS,
625 'equal', Int32x4EqualJS, 544 'equal', Int32x4EqualJS,
626 'notEqual', Int32x4NotEqualJS, 545 'notEqual', Int32x4NotEqualJS,
627 'select', Int32x4SelectJS, 546 'select', Int32x4SelectJS,
628 'swizzle', Int32x4SwizzleJS, 547 'swizzle', Int32x4SwizzleJS,
629 'shuffle', Int32x4ShuffleJS, 548 'shuffle', Int32x4ShuffleJS,
630 'fromFloat32x4', Int32x4FromFloat32x4JS, 549 'fromFloat32x4', Int32x4FromFloat32x4JS,
631 'fromUint32x4', Int32x4FromUint32x4JS,
632 'fromFloat32x4Bits', Int32x4FromFloat32x4BitsJS, 550 'fromFloat32x4Bits', Int32x4FromFloat32x4BitsJS,
633 'fromUint32x4Bits', Int32x4FromUint32x4BitsJS,
634 'fromInt16x8Bits', Int32x4FromInt16x8BitsJS, 551 'fromInt16x8Bits', Int32x4FromInt16x8BitsJS,
635 'fromUint16x8Bits', Int32x4FromUint16x8BitsJS,
636 'fromInt8x16Bits', Int32x4FromInt8x16BitsJS, 552 'fromInt8x16Bits', Int32x4FromInt8x16BitsJS,
637 'fromUint8x16Bits', Int32x4FromUint8x16BitsJS,
638 ]);
639
640 utils.InstallFunctions(GlobalUint32x4, DONT_ENUM, [
641 'splat', Uint32x4Splat,
642 'check', Uint32x4CheckJS,
643 'extractLane', Uint32x4ExtractLaneJS,
644 'replaceLane', Uint32x4ReplaceLaneJS,
645 'add', Uint32x4AddJS,
646 'sub', Uint32x4SubJS,
647 'mul', Uint32x4MulJS,
648 'min', Uint32x4MinJS,
649 'max', Uint32x4MaxJS,
650 'and', Uint32x4AndJS,
651 'or', Uint32x4OrJS,
652 'xor', Uint32x4XorJS,
653 'not', Uint32x4NotJS,
654 'shiftLeftByScalar', Uint32x4ShiftLeftByScalarJS,
655 'shiftRightLogicalByScalar', Uint32x4ShiftRightLogicalByScalarJS,
656 'horizontalSum', Uint32x4HorizontalSumJS,
657 'lessThan', Uint32x4LessThanJS,
658 'lessThanOrEqual', Uint32x4LessThanOrEqualJS,
659 'greaterThan', Uint32x4GreaterThanJS,
660 'greaterThanOrEqual', Uint32x4GreaterThanOrEqualJS,
661 'equal', Uint32x4EqualJS,
662 'notEqual', Uint32x4NotEqualJS,
663 'select', Uint32x4SelectJS,
664 'swizzle', Uint32x4SwizzleJS,
665 'shuffle', Uint32x4ShuffleJS,
666 'fromFloat32x4', Uint32x4FromFloat32x4JS,
667 'fromInt32x4', Uint32x4FromInt32x4JS,
668 'fromFloat32x4Bits', Uint32x4FromFloat32x4BitsJS,
669 'fromInt32x4Bits', Uint32x4FromInt32x4BitsJS,
670 'fromInt16x8Bits', Uint32x4FromInt16x8BitsJS,
671 'fromUint16x8Bits', Uint32x4FromUint16x8BitsJS,
672 'fromInt8x16Bits', Uint32x4FromInt8x16BitsJS,
673 'fromUint8x16Bits', Uint32x4FromUint8x16BitsJS,
674 ]); 553 ]);
675 554
676 utils.InstallFunctions(GlobalBool32x4, DONT_ENUM, [ 555 utils.InstallFunctions(GlobalBool32x4, DONT_ENUM, [
677 'splat', Bool32x4Splat, 556 'splat', Bool32x4Splat,
678 'check', Bool32x4CheckJS, 557 'check', Bool32x4CheckJS,
679 'extractLane', Bool32x4ExtractLaneJS, 558 'extractLane', Bool32x4ExtractLaneJS,
680 'replaceLane', Bool32x4ReplaceLaneJS, 559 'replaceLane', Bool32x4ReplaceLaneJS,
681 'and', Bool32x4AndJS, 560 'and', Bool32x4AndJS,
682 'or', Bool32x4OrJS, 561 'or', Bool32x4OrJS,
683 'xor', Bool32x4XorJS, 562 'xor', Bool32x4XorJS,
684 'not', Bool32x4NotJS, 563 'not', Bool32x4NotJS,
685 'anyTrue', Bool32x4AnyTrueJS, 564 'anyTrue', Bool32x4AnyTrueJS,
686 'allTrue', Bool32x4AllTrueJS, 565 'allTrue', Bool32x4AllTrueJS,
566 'equal', Bool32x4EqualJS,
567 'notEqual', Bool32x4NotEqualJS,
687 'swizzle', Bool32x4SwizzleJS, 568 'swizzle', Bool32x4SwizzleJS,
688 'shuffle', Bool32x4ShuffleJS, 569 'shuffle', Bool32x4ShuffleJS,
689 ]); 570 ]);
690 571
691 utils.InstallFunctions(GlobalInt16x8, DONT_ENUM, [ 572 utils.InstallFunctions(GlobalInt16x8, DONT_ENUM, [
692 'splat', Int16x8Splat, 573 'splat', Int16x8Splat,
693 'check', Int16x8CheckJS, 574 'check', Int16x8CheckJS,
694 'extractLane', Int16x8ExtractLaneJS, 575 'extractLane', Int16x8ExtractLaneJS,
576 'unsignedExtractLane', Int16x8UnsignedExtractLaneJS,
695 'replaceLane', Int16x8ReplaceLaneJS, 577 'replaceLane', Int16x8ReplaceLaneJS,
696 'neg', Int16x8NegJS, 578 'neg', Int16x8NegJS,
697 'add', Int16x8AddJS, 579 'add', Int16x8AddJS,
698 'sub', Int16x8SubJS, 580 'sub', Int16x8SubJS,
699 'addSaturate', Int16x8AddSaturateJS,
700 'subSaturate', Int16x8SubSaturateJS,
701 'mul', Int16x8MulJS, 581 'mul', Int16x8MulJS,
702 'min', Int16x8MinJS, 582 'min', Int16x8MinJS,
703 'max', Int16x8MaxJS, 583 'max', Int16x8MaxJS,
704 'and', Int16x8AndJS, 584 'and', Int16x8AndJS,
705 'or', Int16x8OrJS, 585 'or', Int16x8OrJS,
706 'xor', Int16x8XorJS, 586 'xor', Int16x8XorJS,
707 'not', Int16x8NotJS, 587 'not', Int16x8NotJS,
708 'shiftLeftByScalar', Int16x8ShiftLeftByScalarJS, 588 'shiftLeftByScalar', Int16x8ShiftLeftByScalarJS,
589 'shiftRightLogicalByScalar', Int16x8ShiftRightLogicalByScalarJS,
709 'shiftRightArithmeticByScalar', Int16x8ShiftRightArithmeticByScalarJS, 590 'shiftRightArithmeticByScalar', Int16x8ShiftRightArithmeticByScalarJS,
710 'lessThan', Int16x8LessThanJS, 591 'lessThan', Int16x8LessThanJS,
711 'lessThanOrEqual', Int16x8LessThanOrEqualJS, 592 'lessThanOrEqual', Int16x8LessThanOrEqualJS,
712 'greaterThan', Int16x8GreaterThanJS, 593 'greaterThan', Int16x8GreaterThanJS,
713 'greaterThanOrEqual', Int16x8GreaterThanOrEqualJS, 594 'greaterThanOrEqual', Int16x8GreaterThanOrEqualJS,
714 'equal', Int16x8EqualJS, 595 'equal', Int16x8EqualJS,
715 'notEqual', Int16x8NotEqualJS, 596 'notEqual', Int16x8NotEqualJS,
716 'select', Int16x8SelectJS, 597 'select', Int16x8SelectJS,
717 'swizzle', Int16x8SwizzleJS, 598 'swizzle', Int16x8SwizzleJS,
718 'shuffle', Int16x8ShuffleJS, 599 'shuffle', Int16x8ShuffleJS,
719 'fromUint16x8', Int16x8FromUint16x8JS,
720 'fromFloat32x4Bits', Int16x8FromFloat32x4BitsJS, 600 'fromFloat32x4Bits', Int16x8FromFloat32x4BitsJS,
721 'fromInt32x4Bits', Int16x8FromInt32x4BitsJS, 601 'fromInt32x4Bits', Int16x8FromInt32x4BitsJS,
722 'fromUint32x4Bits', Int16x8FromUint32x4BitsJS,
723 'fromUint16x8Bits', Int16x8FromUint16x8BitsJS,
724 'fromInt8x16Bits', Int16x8FromInt8x16BitsJS, 602 'fromInt8x16Bits', Int16x8FromInt8x16BitsJS,
725 'fromUint8x16Bits', Int16x8FromUint8x16BitsJS,
726 ]);
727
728 utils.InstallFunctions(GlobalUint16x8, DONT_ENUM, [
729 'splat', Uint16x8Splat,
730 'check', Uint16x8CheckJS,
731 'extractLane', Uint16x8ExtractLaneJS,
732 'replaceLane', Uint16x8ReplaceLaneJS,
733 'add', Uint16x8AddJS,
734 'sub', Uint16x8SubJS,
735 'addSaturate', Uint16x8AddSaturateJS,
736 'subSaturate', Uint16x8SubSaturateJS,
737 'mul', Uint16x8MulJS,
738 'min', Uint16x8MinJS,
739 'max', Uint16x8MaxJS,
740 'and', Uint16x8AndJS,
741 'or', Uint16x8OrJS,
742 'xor', Uint16x8XorJS,
743 'not', Uint16x8NotJS,
744 'shiftLeftByScalar', Uint16x8ShiftLeftByScalarJS,
745 'shiftRightLogicalByScalar', Uint16x8ShiftRightLogicalByScalarJS,
746 'horizontalSum', Uint16x8HorizontalSumJS,
747 'absoluteDifference', Uint16x8AbsoluteDifferenceJS,
748 'widenedAbsoluteDifference', Uint16x8WidenedAbsoluteDifferenceJS,
749 'lessThan', Uint16x8LessThanJS,
750 'lessThanOrEqual', Uint16x8LessThanOrEqualJS,
751 'greaterThan', Uint16x8GreaterThanJS,
752 'greaterThanOrEqual', Uint16x8GreaterThanOrEqualJS,
753 'equal', Uint16x8EqualJS,
754 'notEqual', Uint16x8NotEqualJS,
755 'select', Uint16x8SelectJS,
756 'swizzle', Uint16x8SwizzleJS,
757 'shuffle', Uint16x8ShuffleJS,
758 'fromInt16x8', Uint16x8FromInt16x8JS,
759 'fromFloat32x4Bits', Uint16x8FromFloat32x4BitsJS,
760 'fromInt32x4Bits', Uint16x8FromInt32x4BitsJS,
761 'fromUint32x4Bits', Uint16x8FromUint32x4BitsJS,
762 'fromInt16x8Bits', Uint16x8FromInt16x8BitsJS,
763 'fromInt8x16Bits', Uint16x8FromInt8x16BitsJS,
764 'fromUint8x16Bits', Uint16x8FromUint8x16BitsJS,
765 ]); 603 ]);
766 604
767 utils.InstallFunctions(GlobalBool16x8, DONT_ENUM, [ 605 utils.InstallFunctions(GlobalBool16x8, DONT_ENUM, [
768 'splat', Bool16x8Splat, 606 'splat', Bool16x8Splat,
769 'check', Bool16x8CheckJS, 607 'check', Bool16x8CheckJS,
770 'extractLane', Bool16x8ExtractLaneJS, 608 'extractLane', Bool16x8ExtractLaneJS,
771 'replaceLane', Bool16x8ReplaceLaneJS, 609 'replaceLane', Bool16x8ReplaceLaneJS,
772 'and', Bool16x8AndJS, 610 'and', Bool16x8AndJS,
773 'or', Bool16x8OrJS, 611 'or', Bool16x8OrJS,
774 'xor', Bool16x8XorJS, 612 'xor', Bool16x8XorJS,
775 'not', Bool16x8NotJS, 613 'not', Bool16x8NotJS,
776 'anyTrue', Bool16x8AnyTrueJS, 614 'anyTrue', Bool16x8AnyTrueJS,
777 'allTrue', Bool16x8AllTrueJS, 615 'allTrue', Bool16x8AllTrueJS,
616 'equal', Bool16x8EqualJS,
617 'notEqual', Bool16x8NotEqualJS,
778 'swizzle', Bool16x8SwizzleJS, 618 'swizzle', Bool16x8SwizzleJS,
779 'shuffle', Bool16x8ShuffleJS, 619 'shuffle', Bool16x8ShuffleJS,
780 ]); 620 ]);
781 621
782 utils.InstallFunctions(GlobalInt8x16, DONT_ENUM, [ 622 utils.InstallFunctions(GlobalInt8x16, DONT_ENUM, [
783 'splat', Int8x16Splat, 623 'splat', Int8x16Splat,
784 'check', Int8x16CheckJS, 624 'check', Int8x16CheckJS,
785 'extractLane', Int8x16ExtractLaneJS, 625 'extractLane', Int8x16ExtractLaneJS,
626 'unsignedExtractLane', Int8x16UnsignedExtractLaneJS,
786 'replaceLane', Int8x16ReplaceLaneJS, 627 'replaceLane', Int8x16ReplaceLaneJS,
787 'neg', Int8x16NegJS, 628 'neg', Int8x16NegJS,
788 'add', Int8x16AddJS, 629 'add', Int8x16AddJS,
789 'sub', Int8x16SubJS, 630 'sub', Int8x16SubJS,
790 'addSaturate', Int8x16AddSaturateJS,
791 'subSaturate', Int8x16SubSaturateJS,
792 'mul', Int8x16MulJS, 631 'mul', Int8x16MulJS,
793 'min', Int8x16MinJS, 632 'min', Int8x16MinJS,
794 'max', Int8x16MaxJS, 633 'max', Int8x16MaxJS,
795 'and', Int8x16AndJS, 634 'and', Int8x16AndJS,
796 'or', Int8x16OrJS, 635 'or', Int8x16OrJS,
797 'xor', Int8x16XorJS, 636 'xor', Int8x16XorJS,
798 'not', Int8x16NotJS, 637 'not', Int8x16NotJS,
799 'shiftLeftByScalar', Int8x16ShiftLeftByScalarJS, 638 'shiftLeftByScalar', Int8x16ShiftLeftByScalarJS,
639 'shiftRightLogicalByScalar', Int8x16ShiftRightLogicalByScalarJS,
800 'shiftRightArithmeticByScalar', Int8x16ShiftRightArithmeticByScalarJS, 640 'shiftRightArithmeticByScalar', Int8x16ShiftRightArithmeticByScalarJS,
801 'lessThan', Int8x16LessThanJS, 641 'lessThan', Int8x16LessThanJS,
802 'lessThanOrEqual', Int8x16LessThanOrEqualJS, 642 'lessThanOrEqual', Int8x16LessThanOrEqualJS,
803 'greaterThan', Int8x16GreaterThanJS, 643 'greaterThan', Int8x16GreaterThanJS,
804 'greaterThanOrEqual', Int8x16GreaterThanOrEqualJS, 644 'greaterThanOrEqual', Int8x16GreaterThanOrEqualJS,
805 'equal', Int8x16EqualJS, 645 'equal', Int8x16EqualJS,
806 'notEqual', Int8x16NotEqualJS, 646 'notEqual', Int8x16NotEqualJS,
807 'select', Int8x16SelectJS, 647 'select', Int8x16SelectJS,
808 'swizzle', Int8x16SwizzleJS, 648 'swizzle', Int8x16SwizzleJS,
809 'shuffle', Int8x16ShuffleJS, 649 'shuffle', Int8x16ShuffleJS,
810 'fromUint8x16', Int8x16FromUint8x16JS,
811 'fromFloat32x4Bits', Int8x16FromFloat32x4BitsJS, 650 'fromFloat32x4Bits', Int8x16FromFloat32x4BitsJS,
812 'fromInt32x4Bits', Int8x16FromInt32x4BitsJS, 651 'fromInt32x4Bits', Int8x16FromInt32x4BitsJS,
813 'fromUint32x4Bits', Int8x16FromUint32x4BitsJS,
814 'fromInt16x8Bits', Int8x16FromInt16x8BitsJS, 652 'fromInt16x8Bits', Int8x16FromInt16x8BitsJS,
815 'fromUint16x8Bits', Int8x16FromUint16x8BitsJS,
816 'fromUint8x16Bits', Int8x16FromUint8x16BitsJS,
817 ]);
818
819 utils.InstallFunctions(GlobalUint8x16, DONT_ENUM, [
820 'splat', Uint8x16Splat,
821 'check', Uint8x16CheckJS,
822 'extractLane', Uint8x16ExtractLaneJS,
823 'replaceLane', Uint8x16ReplaceLaneJS,
824 'add', Uint8x16AddJS,
825 'sub', Uint8x16SubJS,
826 'addSaturate', Uint8x16AddSaturateJS,
827 'subSaturate', Uint8x16SubSaturateJS,
828 'mul', Uint8x16MulJS,
829 'min', Uint8x16MinJS,
830 'max', Uint8x16MaxJS,
831 'and', Uint8x16AndJS,
832 'or', Uint8x16OrJS,
833 'xor', Uint8x16XorJS,
834 'not', Uint8x16NotJS,
835 'shiftLeftByScalar', Uint8x16ShiftLeftByScalarJS,
836 'shiftRightLogicalByScalar', Uint8x16ShiftRightLogicalByScalarJS,
837 'horizontalSum', Uint8x16HorizontalSumJS,
838 'absoluteDifference', Uint8x16AbsoluteDifferenceJS,
839 'widenedAbsoluteDifference', Uint8x16WidenedAbsoluteDifferenceJS,
840 'lessThan', Uint8x16LessThanJS,
841 'lessThanOrEqual', Uint8x16LessThanOrEqualJS,
842 'greaterThan', Uint8x16GreaterThanJS,
843 'greaterThanOrEqual', Uint8x16GreaterThanOrEqualJS,
844 'equal', Uint8x16EqualJS,
845 'notEqual', Uint8x16NotEqualJS,
846 'select', Uint8x16SelectJS,
847 'swizzle', Uint8x16SwizzleJS,
848 'shuffle', Uint8x16ShuffleJS,
849 'fromInt8x16', Uint8x16FromInt8x16JS,
850 'fromFloat32x4Bits', Uint8x16FromFloat32x4BitsJS,
851 'fromInt32x4Bits', Uint8x16FromInt32x4BitsJS,
852 'fromUint32x4Bits', Uint8x16FromUint32x4BitsJS,
853 'fromInt16x8Bits', Uint8x16FromInt16x8BitsJS,
854 'fromUint16x8Bits', Uint8x16FromUint16x8BitsJS,
855 'fromInt8x16Bits', Uint8x16FromInt8x16BitsJS,
856 ]); 653 ]);
857 654
858 utils.InstallFunctions(GlobalBool8x16, DONT_ENUM, [ 655 utils.InstallFunctions(GlobalBool8x16, DONT_ENUM, [
859 'splat', Bool8x16Splat, 656 'splat', Bool8x16Splat,
860 'check', Bool8x16CheckJS, 657 'check', Bool8x16CheckJS,
861 'extractLane', Bool8x16ExtractLaneJS, 658 'extractLane', Bool8x16ExtractLaneJS,
862 'replaceLane', Bool8x16ReplaceLaneJS, 659 'replaceLane', Bool8x16ReplaceLaneJS,
863 'and', Bool8x16AndJS, 660 'and', Bool8x16AndJS,
864 'or', Bool8x16OrJS, 661 'or', Bool8x16OrJS,
865 'xor', Bool8x16XorJS, 662 'xor', Bool8x16XorJS,
866 'not', Bool8x16NotJS, 663 'not', Bool8x16NotJS,
867 'anyTrue', Bool8x16AnyTrueJS, 664 'anyTrue', Bool8x16AnyTrueJS,
868 'allTrue', Bool8x16AllTrueJS, 665 'allTrue', Bool8x16AllTrueJS,
666 'equal', Bool8x16EqualJS,
667 'notEqual', Bool8x16NotEqualJS,
869 'swizzle', Bool8x16SwizzleJS, 668 'swizzle', Bool8x16SwizzleJS,
870 'shuffle', Bool8x16ShuffleJS, 669 'shuffle', Bool8x16ShuffleJS,
871 ]); 670 ]);
872 671
873 utils.Export(function(to) { 672 utils.Export(function(to) {
874 to.Float32x4ToString = Float32x4ToString; 673 to.Float32x4ToString = Float32x4ToString;
875 to.Int32x4ToString = Int32x4ToString; 674 to.Int32x4ToString = Int32x4ToString;
876 to.Uint32x4ToString = Uint32x4ToString;
877 to.Bool32x4ToString = Bool32x4ToString; 675 to.Bool32x4ToString = Bool32x4ToString;
878 to.Int16x8ToString = Int16x8ToString; 676 to.Int16x8ToString = Int16x8ToString;
879 to.Uint16x8ToString = Uint16x8ToString;
880 to.Bool16x8ToString = Bool16x8ToString; 677 to.Bool16x8ToString = Bool16x8ToString;
881 to.Int8x16ToString = Int8x16ToString; 678 to.Int8x16ToString = Int8x16ToString;
882 to.Uint8x16ToString = Uint8x16ToString;
883 to.Bool8x16ToString = Bool8x16ToString; 679 to.Bool8x16ToString = Bool8x16ToString;
884 }); 680 });
885 681
886 }) 682 })
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698