3d48e6d2a5e3df486c3d6629cb01d5168bdea498
[WebKit-https.git] / JSTests / ChangeLog
1 2017-01-02  JF Bastien  <jfbastien@apple.com>
2
3         WebAssembly: handle and optimize wasm export → wasm import calls
4         https://bugs.webkit.org/show_bug.cgi?id=165282
5
6         Reviewed by Saam Barati.
7
8         * wasm/Builder.js: Add a Proxy to Builder.js, which intercepts
9         unknown property lookups. This creates way better error messages
10         on typos than 'undefined is not a function', which happens
11         semi-frequently as I typo opcode names (and which one is a typo is
12         hard to find because we chain builders).
13         (const._isValidValue):
14         (get target):
15         (const._importFunctionContinuation):
16         (const._importMemoryContinuation):
17         (const._importTableContinuation):
18         (const._exportFunctionContinuation):
19         (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
20         (export.default.Builder.prototype._registerSectionBuilders.this.Unknown):
21         * wasm/LowLevelBinary.js: Add limited support for var{u}int64 (only the 32-bit values)
22         (export.default.LowLevelBinary.prototype.varint32):
23         (export.default.LowLevelBinary.prototype.varuint64):
24         (export.default.LowLevelBinary.prototype.varint64):
25         * wasm/function-tests/exceptions.js: update error message
26         * wasm/function-tests/trap-load.js: update error message
27         * wasm/function-tests/trap-store.js: update error message
28         * wasm/js-api/wasm-to-wasm-bad-signature.js: Added. Test a bunch of bad wasm->wasm import signatures
29         (const.makeImportee.signature.switch):
30         (BadSignatureDropStartParams):
31         * wasm/js-api/wasm-to-wasm.js: Added. Test 64-bit wasm->wasm import calls
32         (const.callerModule):
33         (const.calleeModule):
34         (WasmToWasm):
35
36 2017-01-02  Saam Barati  <sbarati@apple.com>
37
38         WebAssembly: Some loads don't take into account the offset
39         https://bugs.webkit.org/show_bug.cgi?id=166616
40         <rdar://problem/29841541>
41
42         Reviewed by Keith Miller.
43
44         * wasm/function-tests/load-offset.js: Added.
45
46 2016-12-29  Saam Barati  <sbarati@apple.com>
47
48         WebAssembly: Rebase spec-tests now that wabt has been updated to produce certain kinds of invalid modules
49         https://bugs.webkit.org/show_bug.cgi?id=166491
50         <rdar://problem/29814999>
51
52         Reviewed by Yusuke Suzuki.
53
54         Based off these revisions:
55         - spec: b055d01ea1dfdd7a5231ae779095435f836de97f
56         - wabt: d0d44702c753f851b094615298a2f4d4e3c21035
57
58         The reason for the rebase is that wabt was updated to stop
59         silently rejecting invalid modules. This was needed because
60         some of the spec tests check to make sure that the module
61         is invalid, but wabt was silently ignoring the errors and
62         generating valid modules:
63         https://github.com/WebAssembly/wabt/issues/256
64
65         * wasm.yaml:
66         * wasm/spec-tests/address.wast.js:
67         * wasm/spec-tests/binary.wast.js:
68         * wasm/spec-tests/block.wast.js:
69         * wasm/spec-tests/br.wast.js:
70         * wasm/spec-tests/br_if.wast.js:
71         * wasm/spec-tests/br_table.wast.js:
72         * wasm/spec-tests/break-drop.wast.js:
73         * wasm/spec-tests/call.wast.js:
74         * wasm/spec-tests/call_indirect.wast.js:
75         * wasm/spec-tests/comments.wast.js:
76         * wasm/spec-tests/conversions.wast.js:
77         * wasm/spec-tests/custom_section.wast.js:
78         * wasm/spec-tests/endianness.wast.js:
79         * wasm/spec-tests/exports.wast.js:
80         * wasm/spec-tests/f32.wast.js:
81         * wasm/spec-tests/f32_cmp.wast.js:
82         * wasm/spec-tests/f64.wast.js:
83         * wasm/spec-tests/f64_cmp.wast.js:
84         * wasm/spec-tests/fac.wast.js:
85         * wasm/spec-tests/float_exprs.wast.js:
86         * wasm/spec-tests/float_literals.wast.js:
87         * wasm/spec-tests/float_memory.wast.js:
88         * wasm/spec-tests/float_misc.wast.js:
89         * wasm/spec-tests/forward.wast.js:
90         * wasm/spec-tests/func.wast.js:
91         * wasm/spec-tests/func_ptrs.wast.js:
92         * wasm/spec-tests/get_local.wast.js:
93         * wasm/spec-tests/globals.wast.js:
94         * wasm/spec-tests/i32.wast.js:
95         * wasm/spec-tests/i64.wast.js:
96         * wasm/spec-tests/imports.wast.js:
97         * wasm/spec-tests/int_exprs.wast.js:
98         * wasm/spec-tests/int_literals.wast.js:
99         * wasm/spec-tests/left-to-right.wast.js:
100         * wasm/spec-tests/linking.wast.js:
101         * wasm/spec-tests/loop.wast.js:
102         * wasm/spec-tests/memory.wast.js:
103         * wasm/spec-tests/memory_redundancy.wast.js:
104         * wasm/spec-tests/memory_trap.wast.js:
105         * wasm/spec-tests/names.wast.js:
106         * wasm/spec-tests/nop.wast.js:
107         * wasm/spec-tests/resizing.wast.js:
108         * wasm/spec-tests/return.wast.js:
109         * wasm/spec-tests/select.wast.js:
110         * wasm/spec-tests/set_local.wast.js:
111         * wasm/spec-tests/skip-stack-guard-page.wast.js:
112         * wasm/spec-tests/stack.wast.js:
113         * wasm/spec-tests/start.wast.js:
114         * wasm/spec-tests/store_retval.wast.js:
115         * wasm/spec-tests/switch.wast.js:
116         * wasm/spec-tests/tee_local.wast.js:
117         * wasm/spec-tests/traps.wast.js:
118         * wasm/spec-tests/typecheck.wast.js:
119         * wasm/spec-tests/unreachable.wast.js:
120         * wasm/spec-tests/unwind.wast.js:
121
122 2016-12-28  Saam Barati  <sbarati@apple.com>
123
124         WebAssembly: Don't allow duplicate export names
125         https://bugs.webkit.org/show_bug.cgi?id=166490
126         <rdar://problem/29815000>
127
128         Reviewed by Keith Miller.
129
130         * wasm.yaml:
131         * wasm/function-tests/invalid-duplicate-export.js: Added.
132
133 2016-12-28  Saam Barati  <sbarati@apple.com>
134
135         WebAssembly: Implement grow_memory and current_memory
136         https://bugs.webkit.org/show_bug.cgi?id=166448
137         <rdar://problem/29803676>
138
139         Reviewed by Keith Miller.
140
141         I rewrote some of the testWasmModuleFunctions that used Memory to use
142         the JS API since the jsc.cpp version can no longer use memory.
143
144         * wasm.yaml:
145         * wasm/function-tests/add-12.js:
146         (testWasmModuleFunctions):
147         * wasm/function-tests/br-if-loop-less-than.js:
148         (testWasmModuleFunctions):
149         * wasm/function-tests/brTableAsIf.js:
150         (testWasmModuleFunctions):
151         * wasm/function-tests/brTableManyValues.js:
152         (testWasmModuleFunctions):
153         * wasm/function-tests/brTableWithLoop.js:
154         (testWasmModuleFunctions):
155         * wasm/function-tests/dumb-eq-if-then-else.js:
156         * wasm/function-tests/eqz.js:
157         * wasm/function-tests/grow-memory-2.js: Added.
158         (const.func):
159         (assert.eq.instance.exports.foo):
160         * wasm/function-tests/grow-memory-3.js: Added.
161         * wasm/function-tests/grow-memory-4.js: Added.
162         (const.func):
163         * wasm/function-tests/grow-memory.js: Added.
164         (binaryShouldNotParse):
165         (assert.truthy):
166         (assert.eq):
167         (memory.grow):
168         * wasm/function-tests/i32-load.js:
169         (testWasmModuleFunctions):
170         * wasm/function-tests/i32-load8-s.js:
171         * wasm/function-tests/max.js:
172         * wasm/function-tests/min.js:
173         * wasm/js-api/memory-grow.js: Added.
174         (i.i):
175         (assertEq):
176         * wasm/js-api/test_memory.js:
177         * wasm/wasm.json:
178
179 2016-12-25  Yusuke Suzuki  <utatane.tea@gmail.com>
180
181         Propagate the source origin as much as possible
182         https://bugs.webkit.org/show_bug.cgi?id=166348
183
184         Reviewed by Darin Adler.
185
186         * stress/source-origin.js: Added.
187         (shouldBe):
188
189 2016-12-24  Caio Lima  <ticaiolima@gmail.com>
190
191         [test262] Fixing mapped arguments object property test case
192         https://bugs.webkit.org/show_bug.cgi?id=159398
193
194         Reviewed by Saam Barati.
195
196         * stress/arguments-bizarre-behaviour-disable-enumerability.js:
197         * stress/arguments-define-property.js: Added.
198         (assert):
199         (testProperties):
200         * stress/arguments-non-configurable.js: Added.
201         (assert):
202         (tryChangeNonConfigurableDescriptor):
203         (set tryChangeNonConfigurableDescriptor):
204         (tryChangeWritableOfNonConfigurableDescriptor):
205         * test262.yaml:
206
207 016-12-20  Caio Lima  <ticaiolima@gmail.com>
208
209         [test262] Fixing mapped arguments object property test case
210         https://bugs.webkit.org/show_bug.cgi?id=159398
211
212         Reviewed by .
213
214         * stress/arguments-bizarre-behaviour-disable-enumerability.js:
215         * stress/arguments-define-property.js: Added.
216         (assert):
217         (testProperties):
218         * stress/arguments-non-configurable.js: Added.
219         (assert):
220         (tryChangeNonConfigurableDescriptor):
221         (set tryChangeNonConfigurableDescriptor):
222         (tryChangeWritableOfNonConfigurableDescriptor):
223         * test262.yaml:
224
225 2016-12-23  Keith Miller  <keith_miller@apple.com>
226
227         WebAssembly: trap on bad division.
228         https://bugs.webkit.org/show_bug.cgi?id=164786
229
230         Reviewed by Mark Lam.
231
232         Also, mark conversions as passing.
233
234         * wasm.yaml:
235         * wasm/wasm.json:
236
237 2016-12-22  Keith Miller  <keith_miller@apple.com>
238
239         WebAssembly: Make spec-tests/f32.wast.js and spec-tests/f64.wast.js pass
240         https://bugs.webkit.org/show_bug.cgi?id=166447
241
242         Reviewed by Saam Barati.
243
244         * wasm.yaml:
245         * wasm/wasm.json:
246
247 2016-12-22  Saam Barati  <sbarati@apple.com>
248
249         WebAssembly: Make calling Wasm functions that returns or takes an i64 as a parameter an early exception
250         https://bugs.webkit.org/show_bug.cgi?id=166437
251         <rdar://problem/29793949>
252
253         Reviewed by Keith Miller.
254
255         * wasm.yaml:
256         * wasm/function-tests/i64-from-js-exceptions.js: Added.
257         (const.imp.import.sideEffects):
258         (assert.throws.instance.exports.foo.valueOf):
259
260 2016-12-22  Mark Lam  <mark.lam@apple.com>
261
262         De-duplicate finally blocks.
263         https://bugs.webkit.org/show_bug.cgi?id=160168
264
265         Reviewed by Saam Barati.
266
267         Re-landing r209952 with a few new tests added in test-finally.js.
268
269         * stress/deeply-nested-finallys.js: Copied from JSTests/stress/deeply-nested-finallys.js.
270         - Tests many levels of finally nesting.  This causes the old code to hang (and
271           crashes eventually) while trying to generate bytecode for the exponentially
272           duplicated finally blocks.  The new code completes this test almost instantly.
273
274         * stress/test-finally.js: Copied from JSTests/stress/test-finally.js.
275         - Tests control flow through various permutations of finally blocks.
276
277 2016-12-22  Saam Barati  <sbarati@apple.com>
278
279         WebAssembly: Make the spec-tests/address.wast.js test pass
280         https://bugs.webkit.org/show_bug.cgi?id=166429
281         <rdar://problem/29793220>
282
283         Reviewed by Keith Miller.
284
285         * wasm.yaml:
286
287 2016-12-22  Keith Miller  <keith_miller@apple.com>
288
289         WebAssembly: The validator should not allow unused stack entries at the end of a block
290         https://bugs.webkit.org/show_bug.cgi?id=166411
291
292         Reviewed by Saam Barati.
293
294         Test cleanup and enable new passing tests.
295
296         * wasm.yaml:
297         * wasm/function-tests/br-if-as-return.js:
298
299 2016-12-22  Saam Barati  <sbarati@apple.com>
300
301         WebAssembly: Make the spec-tests/start.wast.js test pass
302         https://bugs.webkit.org/show_bug.cgi?id=166416
303         <rdar://problem/29784532>
304
305         Reviewed by Yusuke Suzuki.
306
307         * wasm.yaml:
308
309 2016-12-21  Keith Miller  <keith_miller@apple.com>
310
311         WebAssembly: Fix decode floating point constants in unreachable code
312         https://bugs.webkit.org/show_bug.cgi?id=166400
313
314         Reviewed by Saam Barati.
315
316         * wasm.yaml:
317
318 2016-12-21  Keith Miller  <keith_miller@apple.com>
319
320         WebAssembly: Allow br, br_if, and br_table to act as a return
321         https://bugs.webkit.org/show_bug.cgi?id=166393
322
323         Reviewed by Saam Barati.
324
325         Add tests for breaks acting as returns and fix tests that
326         validate error messages.
327
328         * wasm/function-tests/br-as-return.js: Added.
329         * wasm/function-tests/br-if-as-return.js: Added.
330         * wasm/function-tests/br-table-as-return.js: Added.
331         * wasm/function-tests/if-no-else-non-void.js:
332         * wasm/function-tests/struct.js: Added.
333         * wasm/js-api/global-error.js:
334         (assert.throws):
335         * wasm/js-api/table.js:
336         (assert.throws):
337
338 2016-12-21  Saam Barati  <sbarati@apple.com>
339
340         WebAssembly: Import spec tests
341         https://bugs.webkit.org/show_bug.cgi?id=166395
342
343         Rubber stamped by Keith Miller.
344
345         This patch implements the Wasm spec's tests found here:
346         https://github.com/WebAssembly/spec/tree/master/interpreter/test
347         
348         These tests are in .wast s-epxression format. To convert
349         them to JS, I use a script from the wabt library, found here:
350         https://github.com/WebAssembly/wabt/blob/master/test/run-gen-spec-js.py
351         
352         I also added a script that automatically imports the tests as
353         JS files. The inputs to the script is the path to the Wasm spec
354         git repo and the path to the wabt git repo. This will make importing
355         new tests easy in the future.
356
357         The wasm spec imported is at commit: b055d01ea1dfdd7a5231ae779095435f836de97f
358         The wabt used to do the import is at commit: 622b42dced6d793e9d49e9b1fd1d1524defd1387
359
360         * wasm.yaml:
361         * wasm/import-spec-tests.rb: Added.
362         * wasm/spec-tests: Added.
363         * wasm/spec-tests/address.wast.js: Added.
364         (register):
365         (module):
366         (instance):
367         (assert_malformed):
368         (assert_invalid):
369         (assert_soft_invalid):
370         (assert_unlinkable):
371         (assert_uninstantiable):
372         (assert_trap):
373         (assert_return):
374         (assert_return_nan):
375         * wasm/spec-tests/binary.wast.js: Added.
376         (register):
377         (module):
378         (instance):
379         (assert_malformed):
380         (assert_invalid):
381         (assert_soft_invalid):
382         (assert_unlinkable):
383         (assert_uninstantiable):
384         (assert_trap):
385         (assert_return):
386         (assert_return_nan):
387         * wasm/spec-tests/block.wast.js: Added.
388         (register):
389         (module):
390         (instance):
391         (assert_malformed):
392         (assert_invalid):
393         (assert_soft_invalid):
394         (assert_unlinkable):
395         (assert_uninstantiable):
396         (assert_trap):
397         (assert_return):
398         (assert_return_nan):
399         * wasm/spec-tests/br.wast.js: Added.
400         (register):
401         (module):
402         (instance):
403         (assert_malformed):
404         (assert_invalid):
405         (assert_soft_invalid):
406         (assert_unlinkable):
407         (assert_uninstantiable):
408         (assert_trap):
409         (assert_return):
410         (assert_return_nan):
411         * wasm/spec-tests/br_if.wast.js: Added.
412         (register):
413         (module):
414         (instance):
415         (assert_malformed):
416         (assert_invalid):
417         (assert_soft_invalid):
418         (assert_unlinkable):
419         (assert_uninstantiable):
420         (assert_trap):
421         (assert_return):
422         (assert_return_nan):
423         * wasm/spec-tests/br_table.wast.js: Added.
424         (register):
425         (module):
426         (instance):
427         (assert_malformed):
428         (assert_invalid):
429         (assert_soft_invalid):
430         (assert_unlinkable):
431         (assert_uninstantiable):
432         (assert_trap):
433         (assert_return):
434         (assert_return_nan):
435         * wasm/spec-tests/break-drop.wast.js: Added.
436         (register):
437         (module):
438         (instance):
439         (assert_malformed):
440         (assert_invalid):
441         (assert_soft_invalid):
442         (assert_unlinkable):
443         (assert_uninstantiable):
444         (assert_trap):
445         (assert_return):
446         (assert_return_nan):
447         * wasm/spec-tests/call.wast.js: Added.
448         (register):
449         (module):
450         (instance):
451         (assert_malformed):
452         (assert_invalid):
453         (assert_soft_invalid):
454         (assert_unlinkable):
455         (assert_uninstantiable):
456         (assert_trap):
457         (assert_return):
458         (assert_return_nan):
459         * wasm/spec-tests/call_indirect.wast.js: Added.
460         (register):
461         (module):
462         (instance):
463         (assert_malformed):
464         (assert_invalid):
465         (assert_soft_invalid):
466         (assert_unlinkable):
467         (assert_uninstantiable):
468         (assert_trap):
469         (assert_return):
470         (assert_return_nan):
471         * wasm/spec-tests/comments.wast.js: Added.
472         (register):
473         (module):
474         (instance):
475         (assert_malformed):
476         (assert_invalid):
477         (assert_soft_invalid):
478         (assert_unlinkable):
479         (assert_uninstantiable):
480         (assert_trap):
481         (assert_return):
482         (assert_return_nan):
483         * wasm/spec-tests/conversions.wast.js: Added.
484         (register):
485         (module):
486         (instance):
487         (assert_malformed):
488         (assert_invalid):
489         (assert_soft_invalid):
490         (assert_unlinkable):
491         (assert_uninstantiable):
492         (assert_trap):
493         (assert_return):
494         (assert_return_nan):
495         * wasm/spec-tests/custom_section.wast.js: Added.
496         (register):
497         (module):
498         (instance):
499         (assert_malformed):
500         (assert_invalid):
501         (assert_soft_invalid):
502         (assert_unlinkable):
503         (assert_uninstantiable):
504         (assert_trap):
505         (assert_return):
506         (assert_return_nan):
507         * wasm/spec-tests/endianness.wast.js: Added.
508         (register):
509         (module):
510         (instance):
511         (assert_malformed):
512         (assert_invalid):
513         (assert_soft_invalid):
514         (assert_unlinkable):
515         (assert_uninstantiable):
516         (assert_trap):
517         (assert_return):
518         (assert_return_nan):
519         * wasm/spec-tests/exports.wast.js: Added.
520         (register):
521         (module):
522         (instance):
523         (assert_malformed):
524         (assert_invalid):
525         (assert_soft_invalid):
526         (assert_unlinkable):
527         (assert_uninstantiable):
528         (assert_trap):
529         (assert_return):
530         (assert_return_nan):
531         * wasm/spec-tests/f32.wast.js: Added.
532         (register):
533         (module):
534         (instance):
535         (assert_malformed):
536         (assert_invalid):
537         (assert_soft_invalid):
538         (assert_unlinkable):
539         (assert_uninstantiable):
540         (assert_trap):
541         (assert_return):
542         (assert_return_nan):
543         * wasm/spec-tests/f32_cmp.wast.js: Added.
544         (register):
545         (module):
546         (instance):
547         (assert_malformed):
548         (assert_invalid):
549         (assert_soft_invalid):
550         (assert_unlinkable):
551         (assert_uninstantiable):
552         (assert_trap):
553         (assert_return):
554         (assert_return_nan):
555         * wasm/spec-tests/f64.wast.js: Added.
556         (register):
557         (module):
558         (instance):
559         (assert_malformed):
560         (assert_invalid):
561         (assert_soft_invalid):
562         (assert_unlinkable):
563         (assert_uninstantiable):
564         (assert_trap):
565         (assert_return):
566         (assert_return_nan):
567         * wasm/spec-tests/f64_cmp.wast.js: Added.
568         (register):
569         (module):
570         (instance):
571         (assert_malformed):
572         (assert_invalid):
573         (assert_soft_invalid):
574         (assert_unlinkable):
575         (assert_uninstantiable):
576         (assert_trap):
577         (assert_return):
578         (assert_return_nan):
579         * wasm/spec-tests/fac.wast.js: Added.
580         (register):
581         (module):
582         (instance):
583         (assert_malformed):
584         (assert_invalid):
585         (assert_soft_invalid):
586         (assert_unlinkable):
587         (assert_uninstantiable):
588         (assert_trap):
589         (assert_return):
590         (assert_return_nan):
591         * wasm/spec-tests/float_exprs.wast.js: Added.
592         (register):
593         (module):
594         (instance):
595         (assert_malformed):
596         (assert_invalid):
597         (assert_soft_invalid):
598         (assert_unlinkable):
599         (assert_uninstantiable):
600         (assert_trap):
601         (assert_return):
602         (assert_return_nan):
603         * wasm/spec-tests/float_literals.wast.js: Added.
604         (register):
605         (module):
606         (instance):
607         (assert_malformed):
608         (assert_invalid):
609         (assert_soft_invalid):
610         (assert_unlinkable):
611         (assert_uninstantiable):
612         (assert_trap):
613         (assert_return):
614         (assert_return_nan):
615         * wasm/spec-tests/float_memory.wast.js: Added.
616         (register):
617         (module):
618         (instance):
619         (assert_malformed):
620         (assert_invalid):
621         (assert_soft_invalid):
622         (assert_unlinkable):
623         (assert_uninstantiable):
624         (assert_trap):
625         (assert_return):
626         (assert_return_nan):
627         * wasm/spec-tests/float_misc.wast.js: Added.
628         (register):
629         (module):
630         (instance):
631         (assert_malformed):
632         (assert_invalid):
633         (assert_soft_invalid):
634         (assert_unlinkable):
635         (assert_uninstantiable):
636         (assert_trap):
637         (assert_return):
638         (assert_return_nan):
639         * wasm/spec-tests/forward.wast.js: Added.
640         (register):
641         (module):
642         (instance):
643         (assert_malformed):
644         (assert_invalid):
645         (assert_soft_invalid):
646         (assert_unlinkable):
647         (assert_uninstantiable):
648         (assert_trap):
649         (assert_return):
650         (assert_return_nan):
651         * wasm/spec-tests/func.wast.js: Added.
652         (register):
653         (module):
654         (instance):
655         (assert_malformed):
656         (assert_invalid):
657         (assert_soft_invalid):
658         (assert_unlinkable):
659         (assert_uninstantiable):
660         (assert_trap):
661         (assert_return):
662         (assert_return_nan):
663         * wasm/spec-tests/func_ptrs.wast.js: Added.
664         (register):
665         (module):
666         (instance):
667         (assert_malformed):
668         (assert_invalid):
669         (assert_soft_invalid):
670         (assert_unlinkable):
671         (assert_uninstantiable):
672         (assert_trap):
673         (assert_return):
674         (assert_return_nan):
675         * wasm/spec-tests/get_local.wast.js: Added.
676         (register):
677         (module):
678         (instance):
679         (assert_malformed):
680         (assert_invalid):
681         (assert_soft_invalid):
682         (assert_unlinkable):
683         (assert_uninstantiable):
684         (assert_trap):
685         (assert_return):
686         (assert_return_nan):
687         * wasm/spec-tests/globals.wast.js: Added.
688         (register):
689         (module):
690         (instance):
691         (assert_malformed):
692         (assert_invalid):
693         (assert_soft_invalid):
694         (assert_unlinkable):
695         (assert_uninstantiable):
696         (assert_trap):
697         (assert_return):
698         (assert_return_nan):
699         * wasm/spec-tests/i32.wast.js: Added.
700         (register):
701         (module):
702         (instance):
703         (assert_malformed):
704         (assert_invalid):
705         (assert_soft_invalid):
706         (assert_unlinkable):
707         (assert_uninstantiable):
708         (assert_trap):
709         (assert_return):
710         (assert_return_nan):
711         * wasm/spec-tests/i64.wast.js: Added.
712         (register):
713         (module):
714         (instance):
715         (assert_malformed):
716         (assert_invalid):
717         (assert_soft_invalid):
718         (assert_unlinkable):
719         (assert_uninstantiable):
720         (assert_trap):
721         (assert_return):
722         (assert_return_nan):
723         * wasm/spec-tests/imports.wast.js: Added.
724         (register):
725         (module):
726         (instance):
727         (assert_malformed):
728         (assert_invalid):
729         (assert_soft_invalid):
730         (assert_unlinkable):
731         (assert_uninstantiable):
732         (assert_trap):
733         (assert_return):
734         (assert_return_nan):
735         * wasm/spec-tests/int_exprs.wast.js: Added.
736         (register):
737         (module):
738         (instance):
739         (assert_malformed):
740         (assert_invalid):
741         (assert_soft_invalid):
742         (assert_unlinkable):
743         (assert_uninstantiable):
744         (assert_trap):
745         (assert_return):
746         (assert_return_nan):
747         * wasm/spec-tests/int_literals.wast.js: Added.
748         (register):
749         (module):
750         (instance):
751         (assert_malformed):
752         (assert_invalid):
753         (assert_soft_invalid):
754         (assert_unlinkable):
755         (assert_uninstantiable):
756         (assert_trap):
757         (assert_return):
758         (assert_return_nan):
759         * wasm/spec-tests/left-to-right.wast.js: Added.
760         (register):
761         (module):
762         (instance):
763         (assert_malformed):
764         (assert_invalid):
765         (assert_soft_invalid):
766         (assert_unlinkable):
767         (assert_uninstantiable):
768         (assert_trap):
769         (assert_return):
770         (assert_return_nan):
771         * wasm/spec-tests/linking.wast.js: Added.
772         (register):
773         (module):
774         (instance):
775         (assert_malformed):
776         (assert_invalid):
777         (assert_soft_invalid):
778         (assert_unlinkable):
779         (assert_uninstantiable):
780         (assert_trap):
781         (assert_return):
782         (assert_return_nan):
783         * wasm/spec-tests/loop.wast.js: Added.
784         (register):
785         (module):
786         (instance):
787         (assert_malformed):
788         (assert_invalid):
789         (assert_soft_invalid):
790         (assert_unlinkable):
791         (assert_uninstantiable):
792         (assert_trap):
793         (assert_return):
794         (assert_return_nan):
795         * wasm/spec-tests/memory.wast.js: Added.
796         (register):
797         (module):
798         (instance):
799         (assert_malformed):
800         (assert_invalid):
801         (assert_soft_invalid):
802         (assert_unlinkable):
803         (assert_uninstantiable):
804         (assert_trap):
805         (assert_return):
806         (assert_return_nan):
807         * wasm/spec-tests/memory_redundancy.wast.js: Added.
808         (register):
809         (module):
810         (instance):
811         (assert_malformed):
812         (assert_invalid):
813         (assert_soft_invalid):
814         (assert_unlinkable):
815         (assert_uninstantiable):
816         (assert_trap):
817         (assert_return):
818         (assert_return_nan):
819         * wasm/spec-tests/memory_trap.wast.js: Added.
820         (register):
821         (module):
822         (instance):
823         (assert_malformed):
824         (assert_invalid):
825         (assert_soft_invalid):
826         (assert_unlinkable):
827         (assert_uninstantiable):
828         (assert_trap):
829         (assert_return):
830         (assert_return_nan):
831         * wasm/spec-tests/names.wast.js: Added.
832         (register):
833         (module):
834         (instance):
835         (assert_malformed):
836         (assert_invalid):
837         (assert_soft_invalid):
838         (assert_unlinkable):
839         (assert_uninstantiable):
840         (assert_trap):
841         (assert_return):
842         (assert_return_nan):
843         * wasm/spec-tests/nop.wast.js: Added.
844         (register):
845         (module):
846         (instance):
847         (assert_malformed):
848         (assert_invalid):
849         (assert_soft_invalid):
850         (assert_unlinkable):
851         (assert_uninstantiable):
852         (assert_trap):
853         (assert_return):
854         (assert_return_nan):
855         * wasm/spec-tests/resizing.wast.js: Added.
856         (register):
857         (module):
858         (instance):
859         (assert_malformed):
860         (assert_invalid):
861         (assert_soft_invalid):
862         (assert_unlinkable):
863         (assert_uninstantiable):
864         (assert_trap):
865         (assert_return):
866         (assert_return_nan):
867         * wasm/spec-tests/return.wast.js: Added.
868         (register):
869         (module):
870         (instance):
871         (assert_malformed):
872         (assert_invalid):
873         (assert_soft_invalid):
874         (assert_unlinkable):
875         (assert_uninstantiable):
876         (assert_trap):
877         (assert_return):
878         (assert_return_nan):
879         * wasm/spec-tests/select.wast.js: Added.
880         (register):
881         (module):
882         (instance):
883         (assert_malformed):
884         (assert_invalid):
885         (assert_soft_invalid):
886         (assert_unlinkable):
887         (assert_uninstantiable):
888         (assert_trap):
889         (assert_return):
890         (assert_return_nan):
891         * wasm/spec-tests/set_local.wast.js: Added.
892         (register):
893         (module):
894         (instance):
895         (assert_malformed):
896         (assert_invalid):
897         (assert_soft_invalid):
898         (assert_unlinkable):
899         (assert_uninstantiable):
900         (assert_trap):
901         (assert_return):
902         (assert_return_nan):
903         * wasm/spec-tests/skip-stack-guard-page.wast.js: Added.
904         (register):
905         (module):
906         (instance):
907         (assert_malformed):
908         (assert_invalid):
909         (assert_soft_invalid):
910         (assert_unlinkable):
911         (assert_uninstantiable):
912         (assert_trap):
913         (assert_return):
914         (assert_return_nan):
915         * wasm/spec-tests/stack.wast.js: Added.
916         (register):
917         (module):
918         (instance):
919         (assert_malformed):
920         (assert_invalid):
921         (assert_soft_invalid):
922         (assert_unlinkable):
923         (assert_uninstantiable):
924         (assert_trap):
925         (assert_return):
926         (assert_return_nan):
927         * wasm/spec-tests/start.wast.js: Added.
928         (register):
929         (module):
930         (instance):
931         (assert_malformed):
932         (assert_invalid):
933         (assert_soft_invalid):
934         (assert_unlinkable):
935         (assert_uninstantiable):
936         (assert_trap):
937         (assert_return):
938         (assert_return_nan):
939         * wasm/spec-tests/store_retval.wast.js: Added.
940         (register):
941         (module):
942         (instance):
943         (assert_malformed):
944         (assert_invalid):
945         (assert_soft_invalid):
946         (assert_unlinkable):
947         (assert_uninstantiable):
948         (assert_trap):
949         (assert_return):
950         (assert_return_nan):
951         * wasm/spec-tests/switch.wast.js: Added.
952         (register):
953         (module):
954         (instance):
955         (assert_malformed):
956         (assert_invalid):
957         (assert_soft_invalid):
958         (assert_unlinkable):
959         (assert_uninstantiable):
960         (assert_trap):
961         (assert_return):
962         (assert_return_nan):
963         * wasm/spec-tests/tee_local.wast.js: Added.
964         (register):
965         (module):
966         (instance):
967         (assert_malformed):
968         (assert_invalid):
969         (assert_soft_invalid):
970         (assert_unlinkable):
971         (assert_uninstantiable):
972         (assert_trap):
973         (assert_return):
974         (assert_return_nan):
975         * wasm/spec-tests/traps.wast.js: Added.
976         (register):
977         (module):
978         (instance):
979         (assert_malformed):
980         (assert_invalid):
981         (assert_soft_invalid):
982         (assert_unlinkable):
983         (assert_uninstantiable):
984         (assert_trap):
985         (assert_return):
986         (assert_return_nan):
987         * wasm/spec-tests/typecheck.wast.js: Added.
988         (register):
989         (module):
990         (instance):
991         (assert_malformed):
992         (assert_invalid):
993         (assert_soft_invalid):
994         (assert_unlinkable):
995         (assert_uninstantiable):
996         (assert_trap):
997         (assert_return):
998         (assert_return_nan):
999         * wasm/spec-tests/unreachable.wast.js: Added.
1000         (register):
1001         (module):
1002         (instance):
1003         (assert_malformed):
1004         (assert_invalid):
1005         (assert_soft_invalid):
1006         (assert_unlinkable):
1007         (assert_uninstantiable):
1008         (assert_trap):
1009         (assert_return):
1010         (assert_return_nan):
1011         * wasm/spec-tests/unwind.wast.js: Added.
1012         (register):
1013         (module):
1014         (instance):
1015         (assert_malformed):
1016         (assert_invalid):
1017         (assert_soft_invalid):
1018         (assert_unlinkable):
1019         (assert_uninstantiable):
1020         (assert_trap):
1021         (assert_return):
1022         (assert_return_nan):
1023
1024 2016-12-20  Keith Miller  <keith_miller@apple.com>
1025
1026         Add support for global
1027         https://bugs.webkit.org/show_bug.cgi?id=165171
1028
1029         Reviewed by Filip Pizlo.
1030
1031         * stress/global.js: Added.
1032
1033 2016-12-20  JF Bastien  <jfbastien@apple.com>
1034
1035         WebAssembly API: implement WebAssembly.LinkError
1036         https://bugs.webkit.org/show_bug.cgi?id=165805
1037         <rdar://problem/29747874>
1038
1039         Reviewed by Mark lam.
1040
1041         Update all exception sites which now throw WebAssembly.LinkError.
1042
1043         * wasm/js-api/element-data.js:
1044         * wasm/js-api/element.js:
1045         (assert.throws):
1046         * wasm/js-api/global-error.js:
1047         (new.Number):
1048         * wasm/js-api/table.js:
1049         (assert.throws):
1050         (new.WebAssembly.Table):
1051         * wasm/js-api/test_Data.js:
1052         * wasm/js-api/test_basic_api.js:
1053         (const.c.in.constructorProperties.switch):
1054         * wasm/js-api/test_memory.js:
1055         (test):
1056         (test.testMemImportError): Deleted.
1057
1058 2016-12-20  JF Bastien  <jfbastien@apple.com>
1059
1060         WebAssembly: unique function signatures
1061         https://bugs.webkit.org/show_bug.cgi?id=165957
1062         <rdar://problem/29735737>
1063
1064         Reviewed by Saam Barati.
1065
1066         * wasm/function-tests/table-basic.js: FIXME is now addressed,
1067         though instance to instance calls still need work which bug
1068         #165282 will address
1069         (i.assert.eq.foo):
1070         * wasm/js-api/unique-signature.js: Added.
1071         (CallIndirectWithDuplicateSignatures):
1072
1073 2016-12-19  Mark Lam  <mark.lam@apple.com>
1074
1075         Rolling out r209974 and r209952. They break some websites in mysterious ways. Step 2: Rollout r209952.
1076         https://bugs.webkit.org/show_bug.cgi?id=166049
1077
1078         Not reviewed.
1079
1080         * stress/deeply-nested-finallys.js: Removed.
1081         * stress/test-finally.js: Removed.
1082
1083 2016-12-19  Saam Barati  <sbarati@apple.com>
1084
1085         WebAssembly: Make running Wasm tests take less time by reducing some tests' iteration count and by splitting some tests into different files
1086         https://bugs.webkit.org/show_bug.cgi?id=166017
1087
1088         Reviewed by Yusuke Suzuki.
1089
1090         * wasm/function-tests/trap-load-2.js: Added.
1091         (assert):
1092         (wasmFrameCountFromError):
1093         (continuation):
1094         (i.catch):
1095         * wasm/function-tests/trap-load.js:
1096         (assert.continuation): Deleted.
1097         * wasm/function-tests/trap-store-2.js: Added.
1098         (import.Builder.from.string_appeared_here.assert):
1099         (continuation):
1100         (i.catch):
1101         * wasm/function-tests/trap-store.js:
1102         (assert.continuation): Deleted.
1103         (assert): Deleted.
1104         * wasm/js-api/test_memory.js:
1105         (test):
1106
1107 2016-12-18  Saam Barati  <sbarati@apple.com>
1108
1109         WebAssembly: Implement the WebAssembly.compile and WebAssembly.validate
1110         https://bugs.webkit.org/show_bug.cgi?id=165936
1111
1112         Reviewed by Mark Lam.
1113
1114         * wasm/js-api/Module-compile.js: Added.
1115         (async.testPromiseAPI):
1116         * wasm/js-api/test_basic_api.js:
1117         (const.c.in.constructorProperties.switch):
1118         * wasm/js-api/validate.js: Added.
1119         (assert.truthy.WebAssembly.validate.builder.WebAssembly):
1120
1121 2016-12-16  Mark Lam  <mark.lam@apple.com>
1122
1123         De-duplicate finally blocks.
1124         https://bugs.webkit.org/show_bug.cgi?id=160168
1125
1126         Reviewed by Keith Miller.
1127
1128         * stress/deeply-nested-finallys.js: Added.
1129         - Tests many levels of finally nesting.  This causes the old code to hang (and
1130           crashes eventually) while trying to generate bytecode for the exponentially
1131           duplicated finally blocks.  The new code completes this test almost instantly.
1132
1133         * stress/test-finally.js: Added.
1134         - Tests control flow through various permutations of finally blocks.
1135
1136 2016-12-16  Saam Barati  <sbarati@apple.com>
1137
1138         WebAssembly: WasmB3IRGenerator should throw exceptions instead of crash
1139         https://bugs.webkit.org/show_bug.cgi?id=165834
1140
1141         Reviewed by Keith Miller.
1142
1143         * wasm/function-tests/exceptions.js: Added.
1144         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
1145         * wasm/function-tests/table-basic.js:
1146         (i.i.42.throw.new.Error):
1147
1148 2016-12-16  Keith Miller  <keith_miller@apple.com>
1149
1150         i64.eqz should use an Int64 zero
1151         https://bugs.webkit.org/show_bug.cgi?id=165942
1152
1153         Reviewed by Mark Lam.
1154
1155         * wasm/wasm.json:
1156
1157 2016-12-15  Keith Miller  <keith_miller@apple.com>
1158
1159         Fix validation of non-void if blocks with no else
1160         https://bugs.webkit.org/show_bug.cgi?id=165938
1161
1162         Reviewed by Saam Barati.
1163
1164         Add a new failing test and a fix an existing one.
1165
1166         * wasm/function-tests/dead-call.js:
1167         * wasm/function-tests/if-no-else-non-void.js: Added.
1168
1169 2016-12-15  Keith Miller  <keith_miller@apple.com>
1170
1171         Wasm should not create empty unlinked callsites
1172         https://bugs.webkit.org/show_bug.cgi?id=165933
1173
1174         Reviewed by Mark Lam.
1175
1176         * wasm/function-tests/dead-call.js: Added.
1177
1178 2016-12-15  JF Bastien  <jfbastien@apple.com>
1179
1180         WebAssembly: improve compilation error messages
1181         https://bugs.webkit.org/show_bug.cgi?id=163919
1182
1183         Reviewed by Saam Barati.
1184
1185         Update error messages in these tests.
1186         Use the assert.throws facility in many of them which weren't already.
1187
1188         * wasm/js-api/element.js:
1189         (assert.throws.new.WebAssembly.Module.builder.WebAssembly):
1190         (assert.throws):
1191         * wasm/js-api/global-error.js:
1192         (assert.throws.new.WebAssembly.Module.bin):
1193         (assert.throws):
1194         (new.Number):
1195         * wasm/js-api/table.js:
1196         (assert.throws.new.WebAssembly.Module.builder.WebAssembly):
1197         (assert.throws):
1198         (assertBadTableImport):
1199         * wasm/js-api/test_Data.js:
1200         (DataSectionWithoutMemory):
1201         * wasm/js-api/test_Start.js:
1202         (InvalidStartFunctionIndex):
1203         * wasm/js-api/test_basic_api.js:
1204         (const.c.in.constructorProperties.switch):
1205
1206 2016-12-15  JF Bastien  <jfbastien@apple.com>
1207
1208         WebAssembly API: improve data section errors
1209         https://bugs.webkit.org/show_bug.cgi?id=165733
1210
1211         Reviewed by Keith Miller.
1212
1213         * wasm/js-api/element-data.js: Added.
1214         (ElementBeforeData.set const):
1215         (ElementBeforeData): check the order of initialization, which is observable on failure
1216         * wasm/js-api/test_Data.js:
1217         (DataSectionWithoutMemory):
1218         (DataSectionOffTheEnd): Deleted.
1219         (DataSectionPartlyOffTheEnd): Deleted.
1220         (DataSectionEmptyOffTheEnd): Deleted.
1221         (DataSectionSeenByStart): Deleted.
1222
1223 2016-12-15  Keith Miller  <keith_miller@apple.com>
1224
1225         Fix 64-bit shift family Wasm opcodes
1226         https://bugs.webkit.org/show_bug.cgi?id=165902
1227
1228         Reviewed by Geoffrey Garen.
1229
1230         Add tests for shift family of instructions. Since
1231         we can't generate i64 values to pass to wasm we only compile
1232         the code for those functions. Attempting to generate any i64
1233         code using these instructions would have been enough to cause
1234         the B3 Validation error anyway.
1235
1236         * wasm/assert.js:
1237         * wasm/function-tests/rotl.js: Added.
1238         * wasm/function-tests/rotr.js: Added.
1239         * wasm/function-tests/shl.js: Added.
1240         * wasm/function-tests/shr-s.js: Added.
1241         * wasm/function-tests/shr-u.js: Added.
1242         * wasm/wasm.json:
1243
1244 2016-12-14  Keith Miller  <keith_miller@apple.com>
1245
1246         WebAssembly: test_BuilderJSON.js is broken
1247         https://bugs.webkit.org/show_bug.cgi?id=165893
1248
1249         Reviewed by Michael Saboff.
1250
1251         * wasm/Builder.js:
1252         (const._isValidValue):
1253         * wasm/self-test/test_BuilderJSON.js:
1254
1255 2016-12-14  Keith Miller  <keith_miller@apple.com>
1256
1257         Unreviewed, fix test.
1258
1259         * wasm/function-tests/i32-const.js:
1260
1261 2016-12-14  Keith Miller  <keith_miller@apple.com>
1262
1263         Wasm should decode constants correctly
1264         https://bugs.webkit.org/show_bug.cgi?id=165886
1265
1266         Reviewed by Saam Barati.
1267
1268         * wasm/Builder.js:
1269         (const._isValidValue):
1270         * wasm/Builder_WebAssemblyBinary.js:
1271         (const.putOp):
1272         * wasm/LowLevelBinary.js:
1273         (export.default.LowLevelBinary.prototype.float):
1274         (export.default.LowLevelBinary.prototype.double):
1275         * wasm/function-tests/f32-const.js: Added.
1276         * wasm/function-tests/f64-const.js: Added.
1277         * wasm/function-tests/i32-const.js: Added.
1278         * wasm/wasm.json:
1279
1280 2016-12-14  Saam Barati  <sbarati@apple.com>
1281
1282         WebAssembly: Add various low hanging fruit that will allow us to run the LLVM torture tests in Wasm
1283         https://bugs.webkit.org/show_bug.cgi?id=165883
1284
1285         Reviewed by Keith Miller.
1286
1287         * wasm/Builder.js:
1288         (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
1289         * wasm/Builder_WebAssemblyBinary.js:
1290         (const.emitters.Export):
1291         * wasm/js-api/table.js:
1292         (assertBadBinary):
1293         (assertBadTable):
1294         (assert.truthy):
1295         * wasm/js-api/test_memory.js:
1296         (binaryShouldNotParse):
1297         (test):
1298         (test.testMemImportError):
1299         (assert.truthy):
1300         (assert): Deleted.
1301
1302 2016-12-14  Filip Pizlo  <fpizlo@apple.com>
1303
1304         DirectTailCall implementation needs to tell the shuffler what to put into the ArgumentCount explicitly
1305         https://bugs.webkit.org/show_bug.cgi?id=165882
1306
1307         Reviewed by Mark Lam.
1308
1309         * stress/direct-tail-call-arity-mismatch-count-args.js: Added.
1310         (foo):
1311         (bar):
1312
1313 2016-12-14  Keith Miller  <keith_miller@apple.com>
1314
1315         WebAssembly JS API: implement Global
1316         https://bugs.webkit.org/show_bug.cgi?id=164133
1317
1318         Reviewed by Saam Barati.
1319
1320         * wasm/Builder.js:
1321         (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
1322         * wasm/Builder_WebAssemblyBinary.js:
1323         (const.valueType.WASM.description.type.i32.type.const.putGlobalType):
1324         (const.putOp):
1325         (const.putInitExpr):
1326         (const.emitters.Import):
1327         (const.emitters.Global):
1328         (const.emitters.Export):
1329         (const.emitters.Code):
1330         * wasm/LowLevelBinary.js:
1331         (export.default.LowLevelBinary.prototype.varuint32):
1332         (export.default.LowLevelBinary.prototype.varint32):
1333         * wasm/js-api/global-error.js: Added.
1334         (catch):
1335         (assert.truthy):
1336         * wasm/js-api/global-external-init-from-import.js: Added.
1337         * wasm/js-api/global-internal-init-from-import.js: Added.
1338         * wasm/js-api/global-mutate.js: Added.
1339         (createInternalGlobalModule):
1340         * wasm/js-api/globals-export.js: Added.
1341         * wasm/js-api/globals-import.js: Added.
1342         * wasm/wasm.json:
1343
1344 2016-12-13  Saam Barati  <sbarati@apple.com>
1345
1346         WebAssembly: implement the elements section
1347         https://bugs.webkit.org/show_bug.cgi?id=165715
1348
1349         Reviewed by Keith Miller.
1350
1351         * wasm/Builder.js:
1352         (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
1353         (export.default.Builder.prototype._registerSectionBuilders.switch):
1354         * wasm/Builder_WebAssemblyBinary.js:
1355         (const.emitters.Element):
1356         * wasm/function-tests/basic-element.js: Added.
1357         * wasm/js-api/element.js: Added.
1358         (assertBadBinary):
1359         (assertBadBinary.badInstantiation):
1360
1361 2016-12-13  Saam Barati  <sbarati@apple.com>
1362
1363         WebAssembly: implement the table section and table import
1364         https://bugs.webkit.org/show_bug.cgi?id=165716
1365
1366         Reviewed by Keith Miller.
1367
1368         * wasm/Builder.js:
1369         (const._importMemoryContinuation):
1370         (const._importTableContinuation):
1371         (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
1372         (const._importMemoryContinuation.section): Deleted.
1373         (const): Deleted.
1374         (const._importMemoryContinuation.assert): Deleted.
1375         * wasm/Builder_WebAssemblyBinary.js:
1376         (const.putResizableLimits):
1377         (const.putTable):
1378         (const.emitters.Import):
1379         (const.emitters.Table):
1380         * wasm/function-tests/call-indirect-params.js:
1381         * wasm/function-tests/call-indirect.js:
1382         * wasm/function-tests/table-basic-2.js: Added.
1383         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
1384         (func):
1385         * wasm/function-tests/table-basic.js: Added.
1386         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
1387         * wasm/js-api/call-indirect-results.js:
1388         (const.wasmModuleWhichImportJS): Deleted.
1389         (MonomorphicImport): Deleted.
1390         * wasm/js-api/call-indirect.js:
1391         (const.wasmModuleWhichImportJS):
1392         (const.makeTable):
1393         (Polyphic2Import):
1394         (VirtualImport):
1395         (MonomorphicImport): Deleted.
1396         * wasm/js-api/table.js: Added.
1397         (assertBadBinary):
1398         (assert.truthy):
1399         (assertBadTable):
1400         (assertBadTableImport):
1401         (assertBadBinary.assertBadTableInstance):
1402         (assertBadTableInstance):
1403         (new.WebAssembly.Table):
1404         * wasm/js-api/test_basic_api.js:
1405         (const.c.in.constructorProperties.switch):
1406
1407 2016-12-13  Commit Queue  <commit-queue@webkit.org>
1408
1409         Unreviewed, rolling out r209725.
1410         https://bugs.webkit.org/show_bug.cgi?id=165811
1411
1412         "Broke ARMv7 builds" (Requested by msaboff on #webkit).
1413
1414         Reverted changeset:
1415
1416         "REGRESSION(r209653): speedometer crashes making virtual slow
1417         path tailcalls"
1418         https://bugs.webkit.org/show_bug.cgi?id=165748
1419         http://trac.webkit.org/changeset/209725
1420
1421 2016-12-12  Michael Saboff  <msaboff@apple.com>
1422
1423         REGRESSION(r209653): speedometer crashes making virtual slow path tailcalls
1424         https://bugs.webkit.org/show_bug.cgi?id=165748
1425
1426         Reviewed by Filip Pizlo.
1427
1428         New regression test.
1429
1430         * stress/regress-165748.js: Added.
1431         (sum1):
1432         (sum2):
1433         (sum3):
1434         (sum4):
1435         (sum5):
1436         (sum6):
1437         (tailCaller):
1438         (test):
1439
1440 2016-12-12  Mark Lam  <mark.lam@apple.com>
1441
1442         Debug JSC test timeout: stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js.ftl-no-cjit.
1443         https://bugs.webkit.org/show_bug.cgi?id=164630
1444
1445         Reviewed by Keith Miller.
1446
1447         Speculative fix for timeout issue.  It looks like this test just runs a bit
1448         slower on debug builds.  So, we'll give it a little more time to run.
1449
1450         * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
1451
1452 2016-12-11  Saam Barati  <sbarati@apple.com>
1453
1454         We should be able to throw exceptions from Wasm code and when Wasm frames are on the stack
1455         https://bugs.webkit.org/show_bug.cgi?id=165429
1456
1457         Reviewed by Keith Miller.
1458
1459         * wasm/function-tests/trap-load.js: Added.
1460         (assert):
1461         (wasmFrameCountFromError):
1462         (i.catch):
1463         (assert.continuation):
1464         * wasm/function-tests/trap-store.js: Added.
1465         (import.Builder.from.string_appeared_here.assert):
1466         (i.catch):
1467         (assert.continuation):
1468         (assert):
1469         * wasm/js-api/test_memory_constructor.js:
1470         (assert):
1471
1472 2016-12-10  Commit Queue  <commit-queue@webkit.org>
1473
1474         Unreviewed, rolling out r209653, r209654, r209663, and
1475         r209673.
1476         https://bugs.webkit.org/show_bug.cgi?id=165739
1477
1478         speedometer crashes (Requested by pizlo on #webkit).
1479
1480         Reverted changesets:
1481
1482         "JSVALUE64: Pass arguments in platform argument registers when
1483         making JavaScript calls"
1484         https://bugs.webkit.org/show_bug.cgi?id=160355
1485         http://trac.webkit.org/changeset/209653
1486
1487         "Unreviewed build fix for 32 bit builds."
1488         http://trac.webkit.org/changeset/209654
1489
1490         "Unreviewed build fix for the CLOOP after r209653"
1491         http://trac.webkit.org/changeset/209663
1492
1493         "REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()"
1494         https://bugs.webkit.org/show_bug.cgi?id=165728
1495         http://trac.webkit.org/changeset/209673
1496
1497 2016-12-10  Michael Saboff  <msaboff@apple.com>
1498
1499         REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()
1500         https://bugs.webkit.org/show_bug.cgi?id=165728
1501
1502         Reviewed by Filip Pizlo.
1503
1504         New regression test.
1505
1506         * stress/regress-165728.js: Added.
1507         (sum1):
1508         (sum2):
1509         (tailCaller):
1510         (test):
1511
1512 2016-12-10  Keith Miller  <keith_miller@apple.com>
1513
1514         Fix indirect_call if the result type is used.
1515         https://bugs.webkit.org/show_bug.cgi?id=165727
1516
1517         Reviewed by Michael Saboff.
1518
1519         * wasm/js-api/call-indirect-results.js: Added.
1520         (const.wasmModuleWhichImportJS):
1521         (MonomorphicImport):
1522
1523 2016-12-10  Yusuke Suzuki  <utatane.tea@gmail.com>
1524
1525         [JSC] Module namespace object behaves like immutable prototype exotic object
1526         https://bugs.webkit.org/show_bug.cgi?id=165598
1527
1528         Reviewed by Mark Lam.
1529
1530         * modules/namespace-prototype-assignment.js: Added.
1531         (else):
1532         (reportError):
1533         (shouldEqual):
1534         (shouldThrow):
1535         (stringify):
1536         (makeTestID):
1537         (doInternalSetPrototypeOf):
1538         (ordinarySetPrototypeOf):
1539         (setImmutablePrototype):
1540         (windowProxySetPrototypeOf):
1541         (initSetterExpectation):
1542         (throwIfNoExceptionPending):
1543         (objectSetPrototypeOf):
1544         (setUnderscoreProto):
1545         (reflectSetPrototypeOf):
1546         (setPrototypeOf):
1547         (newObjectProto.toString):
1548         (Symbol):
1549         (test):
1550         (runTests):
1551         * modules/namespace-set-prototype-of.js: Added.
1552         (shouldThrow):
1553         (TypeError.Cannot.set prototype):
1554
1555 2016-12-09  Michael Saboff  <msaboff@apple.com>
1556
1557         JSVALUE64: Pass arguments in platform argument registers when making JavaScript calls
1558         https://bugs.webkit.org/show_bug.cgi?id=160355
1559
1560         Reviewed by Filip Pizlo.
1561
1562         New microbenchmarks to measure call type performance.
1563
1564         * microbenchmarks/calling-computed-args.js: Added.
1565         * microbenchmarks/calling-many-callees.js: Added.
1566         * microbenchmarks/calling-one-callee-fixed.js: Added.
1567         * microbenchmarks/calling-one-callee.js: Added.
1568         * microbenchmarks/calling-poly-callees.js: Added.
1569         * microbenchmarks/calling-poly-extra-arity-callees.js: Added.
1570         * microbenchmarks/calling-tailcall.js: Added.
1571         * microbenchmarks/calling-virtual-arity-fixup-callees.js: Added.
1572         * microbenchmarks/calling-virtual-arity-fixup-stackargs.js: Added.
1573         * microbenchmarks/calling-virtual-callees.js: Added.
1574         * microbenchmarks/calling-virtual-extra-arity-callees.js: Added.
1575
1576 2016-12-09  Keith Miller  <keith_miller@apple.com>
1577
1578         Wasm should support call_indirect
1579         https://bugs.webkit.org/show_bug.cgi?id=165718
1580
1581         Reviewed by Filip Pizlo.
1582
1583         * wasm/Builder.js:
1584         * wasm/function-tests/call-indirect-params.js: Added.
1585         * wasm/function-tests/call-indirect.js: Added.
1586         * wasm/js-api/call-indirect.js: Added.
1587         (const.wasmModuleWhichImportJS):
1588         (MonomorphicImport):
1589         (Polyphic2Import):
1590         (VirtualImport):
1591         * wasm/wasm.json:
1592
1593 2016-12-09  JF Bastien  <jfbastien@apple.com>
1594
1595         WebAssembly: implement data section
1596         https://bugs.webkit.org/show_bug.cgi?id=165696
1597
1598         Reviewed by Keith Miller.
1599
1600         As specified in https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#data-section
1601         Note that some of the interesting corner cases are ill-defined by the spec: https://github.com/WebAssembly/design/issues/897
1602
1603         * wasm/Builder.js: create a data section from JavaScript
1604         * wasm/Builder_WebAssemblyBinary.js: assemble the data section into the proper binary encoding
1605         (const.emitters.Data):
1606         * wasm/js-api/test_Data.js: Added.
1607         (DataSection):
1608         (DataSectionOffTheEnd):
1609         (DataSectionPartlyOffTheEnd):
1610         (DataSectionEmptyOffTheEnd):
1611         (DataSectionSeenByStart):
1612         * wasm/self-test/test_BuilderJSON.js: make sure the JSON structure is fine (this sanity checks before going to binary)
1613
1614 2016-12-09  JF Bastien  <jfbastien@apple.com>
1615
1616         WebAssembly JS API: implement start function
1617         https://bugs.webkit.org/show_bug.cgi?id=165150
1618
1619         Reviewed by Saam Barati.
1620
1621         * wasm/Builder.js: allow building a .Start()
1622         * wasm/Builder_WebAssemblyBinary.js:
1623         * wasm/js-api/test_Start.js: Added.
1624         (const.emitters.Start): serialize a start section
1625         * wasm/self-test/test_BuilderJSON.js: validate the start section's content
1626
1627 2016-12-09  Saam Barati  <sbarati@apple.com>
1628
1629         WebAssembly JS API: implement importing and defining Memory
1630         https://bugs.webkit.org/show_bug.cgi?id=164134
1631
1632         Reviewed by Keith Miller.
1633
1634         * wasm/Builder.js:
1635         (const._importMemoryContinuation.section):
1636         (const._importMemoryContinuation.assert):
1637         (const._importMemoryContinuation):
1638         (const._exportFunctionContinuation.const): Deleted.
1639         (const._exportFunctionContinuation): Deleted.
1640         * wasm/Builder_WebAssemblyBinary.js:
1641         (const.emitters.Import):
1642         * wasm/js-api/test_basic_api.js:
1643         (const.c.in.constructorProperties.switch):
1644         * wasm/js-api/test_memory.js: Added.
1645         (assert):
1646         (binaryShouldNotParse):
1647         (test):
1648         (test.testMemImportError):
1649         * wasm/js-api/test_memory_constructor.js: Added.
1650         (assert):
1651         (throw.new.Error):
1652         (testInvalidSize):
1653         (assert.testInvalidInitial):
1654         (testInvalidInitial.testInvalidMaximum):
1655         (testInvalidInitial):
1656         (testInvalidMaximum):
1657         * wasm/self-test/test_BuilderJSON.js:
1658
1659 2016-12-08  JF Bastien  <jfbastien@apple.com>
1660
1661         WebAssembly: JSC::link* shouldn't need a CodeBlock
1662         https://bugs.webkit.org/show_bug.cgi?id=165591
1663
1664         Reviewed by Keith Miller.
1665
1666         test that wasm -> JS works, including the IC
1667
1668         * wasm/js-api/test_Instance.js:
1669         (const.wasmModuleWhichImportJS):
1670         (MonomorphicImport):
1671         (Polyphic2Import):
1672         (Polyphic3Import):
1673         (VirtualImport):
1674
1675 2016-12-08  Filip Pizlo  <fpizlo@apple.com>
1676
1677         Green the cloop bot by raising this threshold.
1678
1679         * mozilla/js1_5/Array/regress-101964.js:
1680
1681 2016-12-08  JF Bastien  <jfbastien@apple.com>
1682
1683         WebAssembly JS API: wire up Instance imports
1684         https://bugs.webkit.org/show_bug.cgi?id=165118
1685
1686         Reviewed by Saam Barati.
1687
1688         * wasm/js-api/test_Instance.js: add the test, disabled for now
1689
1690 2016-12-07  Keith Miller  <keith_miller@apple.com>
1691
1692         Add more missing trivial wasm ops.
1693         https://bugs.webkit.org/show_bug.cgi?id=165564
1694
1695         Add tests for drop and tee_local.
1696
1697         Reviewed by Geoffrey Garen.
1698
1699         * wasm/function-tests/drop.js: Added.
1700         * wasm/function-tests/nop.js: Added.
1701         * wasm/function-tests/tee-local.js: Added.
1702
1703 2016-12-06  Keith Miller  <keith_miller@apple.com>
1704
1705         Add support for truncation operators
1706         https://bugs.webkit.org/show_bug.cgi?id=165519
1707
1708         Reviewed by Geoffrey Garen.
1709
1710         * wasm/function-tests/i32-trunc-s-f32.js: Added.
1711         * wasm/function-tests/i32-trunc-s-f64.js: Added.
1712         * wasm/function-tests/i32-trunc-u-f32.js: Added.
1713         * wasm/function-tests/i32-trunc-u-f64.js: Added.
1714         * wasm/function-tests/i64-trunc-s-f32.js: Added.
1715         * wasm/function-tests/i64-trunc-s-f64.js: Added.
1716         * wasm/function-tests/i64-trunc-u-f32.js: Added.
1717         * wasm/function-tests/i64-trunc-u-f64.js: Added.
1718
1719 2016-12-06  Mark Lam  <mark.lam@apple.com>
1720
1721         Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
1722         https://bugs.webkit.org/show_bug.cgi?id=165227
1723         <rdar://problem/29442665>
1724
1725         Reviewed by Saam Barati.
1726
1727         * stress/get-from-scope-dynamic-onto-proxy.js:
1728         - Updated error message.
1729
1730         * stress/proxy-dont-infinite-loop.js: Removed.
1731         * stress/proxy-json-path.js: Removed.
1732         * stress/rest-parameter-allocation-elimination-watchpoints-6.js: Removed.
1733         - Removed these tests because the issue they are testing relies on being able to
1734           set Object.prototype.__proto__ to something else (which is now not possible).
1735
1736 2016-12-05  Caitlin Potter  <caitp@igalia.com>
1737
1738         [JSC] report unexpected token when "async" is followed by identifier 
1739         https://bugs.webkit.org/show_bug.cgi?id=165091
1740
1741         Reviewed by Mark Lam.
1742
1743         * stress/bug-165091.js:
1744
1745 2016-12-05  Keith Miller  <keith_miller@apple.com>
1746
1747         Add Wasm i64 to i32 conversion.
1748         https://bugs.webkit.org/show_bug.cgi?id=165378
1749
1750         Reviewed by Filip Pizlo.
1751
1752         It turns out the wrap operation is just B3's Trunc.
1753
1754         * wasm/wasm.json:
1755
1756 2016-12-04  Keith Miller  <keith_miller@apple.com>
1757
1758         Add support for Wasm ctz and popcnt
1759         https://bugs.webkit.org/show_bug.cgi?id=165369
1760
1761         Reviewed by Saam Barati.
1762
1763         * wasm/function-tests/ctz.js: Added.
1764         * wasm/function-tests/popcnt.js: Added.
1765
1766 2016-12-03  JF Bastien  <jfbastien@apple.com>
1767
1768         WebAssembly: update binary format to 0xD version
1769         https://bugs.webkit.org/show_bug.cgi?id=165345
1770
1771         Reviewed by Keith Miller.
1772
1773         As described in the following PR: https://github.com/WebAssembly/design/pull/836
1774         Originally committed in r209175, reverted in r209242, and fixed in r209284.
1775
1776         * wasm/Builder.js:
1777         (const._normalizeFunctionSignature):
1778         * wasm/Builder_WebAssemblyBinary.js:
1779         (const.emitters.Type):
1780         (const.emitters.Code):
1781         * wasm/LowLevelBinary.js:
1782         (export.default.LowLevelBinary.prototype.block_type):
1783         (export.default.LowLevelBinary.prototype.inline_signature_type): Deleted.
1784         * wasm/WASM.js:
1785         * wasm/js-api/test_basic_api.js:
1786         * wasm/self-test/test_BuilderWebAssembly.js:
1787         (EmptyModule):
1788         (CustomSection):
1789         * wasm/self-test/test_WASM.js:
1790         * wasm/wasm.json:
1791
1792 2016-12-02  Keith Miller  <keith_miller@apple.com>
1793
1794         Add Wasm copysign
1795         https://bugs.webkit.org/show_bug.cgi?id=165355
1796
1797         Reviewed by Filip Pizlo.
1798
1799         * wasm/function-tests/copysign.js: Added.
1800
1801 2016-12-03  Commit Queue  <commit-queue@webkit.org>
1802
1803         Unreviewed, rolling out r209298.
1804         https://bugs.webkit.org/show_bug.cgi?id=165359
1805
1806         broke the build (Requested by smfr on #webkit).
1807
1808         Reverted changeset:
1809
1810         "Add Wasm copysign"
1811         https://bugs.webkit.org/show_bug.cgi?id=165355
1812         http://trac.webkit.org/changeset/209298
1813
1814 2016-12-02  Keith Miller  <keith_miller@apple.com>
1815
1816         Add Wasm copysign
1817         https://bugs.webkit.org/show_bug.cgi?id=165355
1818
1819         Reviewed by Filip Pizlo.
1820
1821         * wasm/function-tests/copysign.js: Added.
1822
1823 2016-12-02  Keith Miller  <keith_miller@apple.com>
1824
1825         Unreviewed, fix git having a breakdown over trying to reland a rollout.
1826
1827 2016-12-02  Keith Miller  <keith_miller@apple.com>
1828
1829         Add Wasm floating point nearest and trunc
1830         https://bugs.webkit.org/show_bug.cgi?id=165339
1831
1832         Reviewed by Saam Barati.
1833
1834         * wasm/function-tests/nearest.js: Added.
1835         * wasm/function-tests/trunc.js: Added.
1836
1837 2016-12-02  Caitlin Potter  <caitp@igalia.com>
1838
1839 [JSC] add additional bit to JSTokenType bitfield
1840         https://bugs.webkit.org/show_bug.cgi?id=165091
1841
1842         Reviewed by Geoffrey Garen.
1843
1844         * stress/bug-165091.js: Added.
1845         (shouldThrowSyntaxError):
1846
1847 2016-12-02  Commit Queue  <commit-queue@webkit.org>
1848
1849         Unreviewed, rolling out r209275 and r209276.
1850         https://bugs.webkit.org/show_bug.cgi?id=165348
1851
1852         "broke the arm build" (Requested by keith_miller on #webkit).
1853
1854         Reverted changesets:
1855
1856         "Add Wasm floating point nearest and trunc"
1857         https://bugs.webkit.org/show_bug.cgi?id=165339
1858         http://trac.webkit.org/changeset/209275
1859
1860         "Unreviewed, forgot to change instruction after renaming."
1861         http://trac.webkit.org/changeset/209276
1862
1863 2016-12-02  Keith Miller  <keith_miller@apple.com>
1864
1865         Add Wasm floating point nearest and trunc
1866         https://bugs.webkit.org/show_bug.cgi?id=165339
1867
1868         Reviewed by Filip Pizlo.
1869
1870         * wasm/function-tests/nearest.js: Added.
1871         * wasm/function-tests/trunc.js: Added.
1872
1873 2016-12-02  JF Bastien  <jfbastien@apple.com>
1874
1875         WebAssembly: revert patch causing odd breakage
1876         https://bugs.webkit.org/show_bug.cgi?id=165308
1877
1878         Unreviewed.
1879
1880         Bug #164724 seems to cause build issues which I haven't tracked down yet. WasmOps.h can't be found:
1881         ./Source/JavaScriptCore/wasm/WasmFormat.h:34:10: fatal error: 'WasmOps.h' file not found
1882
1883         It's weird since the file is auto-generated and has been for a while. #164724 merely includes it in WasmFormat.h.
1884
1885         * wasm/Builder.js:
1886         (const._normalizeFunctionSignature):
1887         * wasm/Builder_WebAssemblyBinary.js:
1888         (const.emitters.Type):
1889         (const.emitters.Code):
1890         * wasm/LowLevelBinary.js:
1891         (export.default.LowLevelBinary.prototype.inline_signature_type):
1892         (export.default.LowLevelBinary.prototype.block_type): Deleted.
1893         * wasm/WASM.js:
1894         * wasm/js-api/test_basic_api.js:
1895         * wasm/self-test/test_BuilderWebAssembly.js:
1896         (EmptyModule):
1897         (CustomSection):
1898         * wasm/self-test/test_WASM.js:
1899         * wasm/wasm.json:
1900
1901 2016-12-01  Ryan Haddad  <ryanhaddad@apple.com>
1902
1903         Skip flaky test ChakraCore/test/fieldopts/objtypespec-newobj-invalidation.1.js
1904         https://bugs.webkit.org/show_bug.cgi?id=162567
1905
1906         Reviewed by Saam Barati.
1907
1908         * ChakraCore.yaml:
1909
1910 2016-12-01  Keith Miller  <keith_miller@apple.com>
1911
1912         Add wasm int to floating point opcodes
1913         https://bugs.webkit.org/show_bug.cgi?id=165252
1914
1915         Reviewed by Geoffrey Garen.
1916
1917         Add tests for Wasm integral to floating point conversion opcodes.
1918
1919         * wasm/function-tests/int-to-floating-point.js: Added.
1920         * wasm/wasm.json:
1921
1922 2016-12-01  Geoffrey Garen  <ggaren@apple.com>
1923
1924         Land a test case for <rdar://problem/27889416>
1925         https://bugs.webkit.org/show_bug.cgi?id=165272
1926
1927         Reviewed by Saam Barati.
1928
1929         * stress/marked-argument-buffer.js: Added.
1930         (allocate):
1931         (test.o.toString):
1932         (test):
1933
1934 2016-11-29  Per Arne Vollan  <pvollan@apple.com>
1935
1936         [Win] Skip failing JSC tests.
1937         https://bugs.webkit.org/show_bug.cgi?id=165140
1938
1939         Reviewed by Mark Lam.
1940
1941         * ChakraCore.yaml:
1942         * microbenchmarks/tan.js:
1943
1944 2016-11-30  JF Bastien  <jfbastien@apple.com>
1945
1946         WebAssembly builder: don't throw when checker not implemented
1947         https://bugs.webkit.org/show_bug.cgi?id=165219
1948
1949         Reviewed by Mark Lam.
1950
1951         We should perform whichever checks we've implemented, and assume the rest are OK until bug #163421 is fixed.
1952
1953         * wasm/Builder.js:
1954         * wasm/README.md:
1955         * wasm/function-tests/add-12.js:
1956         * wasm/function-tests/br-if-loop-less-than.js:
1957         * wasm/function-tests/brTableAsIf.js:
1958         * wasm/function-tests/brTableManyValues.js:
1959         * wasm/function-tests/brTableWithLoop.js:
1960         * wasm/function-tests/dumb-eq-if-then-else.js:
1961         * wasm/function-tests/dumb-less-than-fallthrough.js:
1962         * wasm/function-tests/dumb-less-than-ite.js:
1963         * wasm/function-tests/eqz.js:
1964         * wasm/function-tests/factorial.js:
1965         * wasm/function-tests/float-sub.js:
1966         * wasm/function-tests/i32-load.js:
1967         * wasm/function-tests/i32-load8-s.js:
1968         * wasm/function-tests/if-then-else-fallthrough.js:
1969         * wasm/function-tests/if-then-fallthrough.js:
1970         * wasm/function-tests/loop-mult.js:
1971         * wasm/function-tests/loop-sum.js:
1972         * wasm/function-tests/max.js:
1973         * wasm/function-tests/min.js:
1974         * wasm/function-tests/ret5.js:
1975         * wasm/function-tests/select.js:
1976         * wasm/self-test/test_BuilderJSON.js:
1977
1978 2016-11-29  JF Bastien  <jfbastien@apple.com>
1979
1980         WebAssembly JS API: improve Instance
1981         https://bugs.webkit.org/show_bug.cgi?id=164757
1982
1983         Reviewed by Keith Miller.
1984
1985         An Instance's `exports` property wasn't populated with exports.
1986
1987         A follow-up patch will do imports.
1988
1989         A few things of note:
1990
1991          - LowLevelBinary: support 3-byte integers.
1992          - LowLevelBinary: support proper UTF-8 2003 code points (instead of UTF-16).
1993
1994         * wasm/Builder.js:
1995         * wasm/Builder_WebAssemblyBinary.js: wire up exports, stub other things out some more
1996         (const.emitters.Export):
1997         * wasm/LowLevelBinary.js:
1998         (export.default.LowLevelBinary.prototype.uint24): add, used for UTF-8
1999         (export.default.LowLevelBinary.prototype.string): support UTF-8
2000         (export.default.LowLevelBinary.prototype.getUint24): add, used for UTF-8
2001         (export.default.LowLevelBinary.prototype.getVaruint1): was missing
2002         (export.default.LowLevelBinary.prototype.getString): support UTF-8
2003         (export.default.LowLevelBinary):
2004         * wasm/js-api/test_Instance.js: instance.exports.answer() // <-- this is where the magic of this entire patch is
2005         (ExportedAnswerI32):
2006         * wasm/js-api/test_basic_api.js: punt test to later
2007         (const.c.in.constructorProperties.switch):
2008         * wasm/self-test/test_BuilderWebAssembly.js: UTF-8
2009         (CustomSection):
2010         * wasm/self-test/test_LowLevelBinary_string.js: UTF-8 now works
2011         * wasm/self-test/test_LowLevelBinary_uint16.js: was missing one value
2012         * wasm/self-test/test_LowLevelBinary_uint24.js: Copied from JSTests/wasm/self-test/test_LowLevelBinary_uint8.js.
2013         * wasm/self-test/test_LowLevelBinary_uint8.js: was missing one value
2014         * wasm/self-test/test_LowLevelBinary_varuint1.js: Added.
2015         * wasm/utilities.js: this `dump` thing was useful
2016         (const._dump):
2017
2018 2016-11-29  Saam Barati  <sbarati@apple.com>
2019
2020         We should be able optimize the pattern where we spread a function's rest parameter to another call
2021         https://bugs.webkit.org/show_bug.cgi?id=163865
2022
2023         Reviewed by Filip Pizlo.
2024
2025         * microbenchmarks/default-derived-constructor.js: Added.
2026         (createClassHierarchy.let.currentClass):
2027         (createClassHierarchy):
2028         * stress/call-varargs-spread.js: Added.
2029         (assert):
2030         (bar):
2031         (foo):
2032         * stress/load-varargs-on-new-array-with-spread-convert-to-static-loads.js: Added.
2033         (assert):
2034         (baz):
2035         (bar):
2036         (foo):
2037         * stress/new-array-with-spread-with-normal-spread-and-phantom-spread.js: Added.
2038         (assert):
2039         (foo):
2040         (escape):
2041         (bar):
2042         * stress/phantom-new-array-with-spread-osr-exit.js: Added.
2043         (assert):
2044         (baz):
2045         (bar):
2046         (effects):
2047         (foo):
2048         * stress/phantom-spread-forward-varargs.js: Added.
2049         (assert):
2050         (test1.bar):
2051         (test1.foo):
2052         (test1):
2053         (test2.bar):
2054         (test2.foo):
2055         (test3.baz):
2056         (test3.bar):
2057         (test3.foo):
2058         (test4.baz):
2059         (test4.bar):
2060         (test4.foo):
2061         (test5.baz):
2062         (test5.bar):
2063         (test5.foo):
2064         * stress/phantom-spread-osr-exit.js: Added.
2065         (assert):
2066         (baz):
2067         (bar):
2068         (effects):
2069         (foo):
2070         * stress/spread-call-convert-to-static-call.js: Added.
2071         (assert):
2072         (baz):
2073         (bar):
2074         (foo):
2075         * stress/spread-forward-call-varargs-stack-overflow.js: Added.
2076         (assert):
2077         (identity):
2078         (bar):
2079         (foo):
2080         * stress/spread-forward-varargs-rest-parameter-change-iterator-protocol-2.js: Added.
2081         (assert):
2082         (baz.Array.prototype.Symbol.iterator):
2083         (baz):
2084         (bar):
2085         (foo):
2086         (test):
2087         * stress/spread-forward-varargs-rest-parameter-change-iterator-protocol.js: Added.
2088         (assert):
2089         (baz.Array.prototype.Symbol.iterator):
2090         (baz):
2091         (bar):
2092         (foo):
2093         * stress/spread-forward-varargs-stack-overflow.js: Added.
2094         (assert):
2095         (bar):
2096         (foo):
2097
2098 2016-11-29  Caitlin Potter  <caitp@igalia.com>
2099
2100         [JSC] always wrap AwaitExpression operand in a new Promise
2101         https://bugs.webkit.org/show_bug.cgi?id=165181
2102
2103         Reviewed by Yusuke Suzuki.
2104
2105         * stress/async-await-basic.js:
2106         (async.awaitedPromisesAreWrapped):
2107
2108 2016-11-29  Keith Miller  <keith_miller@apple.com>
2109
2110         Add simple way to implement Wasm ops that require more than one B3 opcode
2111         https://bugs.webkit.org/show_bug.cgi?id=165129
2112
2113         Reviewed by Geoffrey Garen.
2114
2115         * wasm/function-tests/eqz.js: Added.
2116         * wasm/function-tests/max.js: Added.
2117         * wasm/function-tests/min.js: Added.
2118         * wasm/wasm.json:
2119
2120 2016-11-21  Yusuke Suzuki  <utatane.tea@gmail.com>
2121
2122         Crash in com.apple.JavaScriptCore: WTF::ThreadSpecific<WTF::WTFThreadData, + 142
2123         https://bugs.webkit.org/show_bug.cgi?id=164898
2124
2125         Reviewed by Darin Adler.
2126
2127         * stress/tagged-template-registry-key-collect.js: Added.
2128         (shouldBe):
2129         (tag):
2130         (i.eval):
2131         * stress/tagged-template-registry-key.js: Added.
2132         (shouldBe):
2133         (tag):
2134         (a):
2135         (b):
2136
2137 2016-11-20  Caitlin Potter  <caitp@igalia.com>
2138
2139         [JSC] speed up parsing of async functions
2140         https://bugs.webkit.org/show_bug.cgi?id=164808
2141
2142         Reviewed by Yusuke Suzuki.
2143
2144         Add tests for line terminator following "async" keyword in async
2145         function syntax.
2146
2147         * stress/async-await-syntax.js:
2148         (shouldBe):
2149
2150 2016-11-19  Mark Lam  <mark.lam@apple.com>
2151
2152         op_mod-* JSC tests needs a longer timeout too.
2153         https://bugs.webkit.org/show_bug.cgi?id=164994
2154
2155         Reviewed by Yusuke Suzuki.
2156
2157         * stress/op_mod-ConstVar.js:
2158         * stress/op_mod-VarConst.js:
2159         * stress/op_mod-VarVar.js:
2160
2161 2016-11-19  Mark Lam  <mark.lam@apple.com>
2162
2163         Add --timeoutMultiplier option to allow some tests more time to run.
2164         https://bugs.webkit.org/show_bug.cgi?id=164951
2165
2166         Reviewed by Yusuke Suzuki.
2167
2168         Extended the timeout for these tests by 50% more because they run quite slow on
2169         low-end machines.
2170
2171         * stress/op_div-ConstVar.js:
2172         * stress/op_div-VarConst.js:
2173         * stress/op_div-VarVar.js:
2174
2175 2016-11-18  Yusuke Suzuki  <utatane.tea@gmail.com>
2176
2177         REGRESSION(r208867): JSC test failure: ChakraCore.yaml/ChakraCore/test/strict/05.arguments_sm.js.default
2178         https://bugs.webkit.org/show_bug.cgi?id=164929
2179
2180         Reviewed by Mark Lam.
2181
2182         ES2017 drops arguments.caller and JavaScriptCore is updated to meet the spec.
2183         This patch rebaselines the result of ChakraCore test for JSC.
2184
2185         * ChakraCore/test/strict/05.arguments_sm.baseline-jsc:
2186
2187 2016-11-18  Joseph Pecoraro  <pecoraro@apple.com>
2188
2189         Web Inspector: Generator functions should have a displayable name when shown in stack traces
2190         https://bugs.webkit.org/show_bug.cgi?id=164844
2191         <rdar://problem/29300697>
2192
2193         Reviewed by Yusuke Suzuki.
2194
2195         * stress/generator-function-name.js:
2196         Add another test now that we name the inner generator function
2197         that we do not break the lexical resolution of names.
2198
2199 2016-11-17  Yusuke Suzuki  <utatane.tea@gmail.com>
2200
2201         [JSC] Drop arguments.caller
2202         https://bugs.webkit.org/show_bug.cgi?id=164859
2203
2204         Reviewed by Saam Barati.
2205
2206         * stress/strict-mode-arguments-caller.js: Added.
2207         (strictArguments):
2208         (shouldBe):
2209
2210 2016-11-17  Keith Miller  <keith_miller@apple.com>
2211
2212         Add rotate to Wasm
2213         https://bugs.webkit.org/show_bug.cgi?id=164871
2214
2215         Reviewed by Filip Pizlo.
2216
2217         * wasm/wasm.json:
2218
2219 2016-11-17  Keith Miller  <keith_miller@apple.com>
2220
2221         Add sqrt to Wasm
2222         https://bugs.webkit.org/show_bug.cgi?id=164877
2223
2224         Reviewed by Mark Lam.
2225
2226         B3 already has a Sqrt opcode we just need to map Wasm to it.
2227
2228         * wasm/wasm.json:
2229
2230 2016-11-17  Saam Barati  <sbarati@apple.com>
2231
2232         Remove async/await compile time flag and enable tests
2233         https://bugs.webkit.org/show_bug.cgi?id=164828
2234         <rdar://problem/28639334>
2235
2236         Reviewed by Yusuke Suzuki.
2237
2238         * stress/async-arrow-functions-lexical-arguments-binding.js:
2239         * stress/async-arrow-functions-lexical-new.target-binding.js:
2240         * stress/async-arrow-functions-lexical-super-binding.js:
2241         * stress/async-arrow-functions-lexical-this-binding.js:
2242         * stress/async-await-basic.js:
2243         * stress/async-await-long-loop.js:
2244         * stress/async-await-module-reserved-word.js:
2245         * stress/async-await-mozilla.js:
2246         (mozSyntaxErrors):
2247         * stress/async-await-reserved-word.js:
2248         * stress/async-await-syntax.js:
2249         * stress/async-await-throw-loop.js:
2250         * stress/async-function-create-nobaseline.js:
2251         * stress/async-function-create-optimized.js:
2252         * stress/async-function-declaration-sinking-no-double-allocate.js:
2253         * stress/async-function-declaration-sinking-osrexit.js:
2254         * stress/async-function-declaration-sinking-put.js:
2255         * stress/async-function-expression-sinking-no-double-allocate.js:
2256         * stress/async-function-expression-sinking-osrexit.js:
2257         * stress/async-function-expression-sinking-put.js:
2258         * test262.yaml:
2259
2260 2016-11-15  Mark Lam  <mark.lam@apple.com>
2261
2262         Make JSC test functions more robust.
2263         https://bugs.webkit.org/show_bug.cgi?id=164807
2264
2265         Reviewed by Keith Miller.
2266
2267         * stress/jsc-test-functions-should-be-more-robust.js: Added.
2268
2269 2016-11-15  Keith Miller  <keith_miller@apple.com>
2270
2271         B3 should support UDiv/UMod
2272         https://bugs.webkit.org/show_bug.cgi?id=164811
2273
2274         Reviewed by Filip Pizlo.
2275
2276         Link new instructions to wasm.
2277
2278         * wasm/wasm.json:
2279
2280 2016-11-15  Saam Barati  <sbarati@apple.com>
2281
2282         Debug JSC test timeout: stress/has-own-property-name-cache-symbols-and-strings.js.ftl-no-cjit-small-pool
2283         https://bugs.webkit.org/show_bug.cgi?id=163012
2284
2285         Unreviewed. This patch makes a test run for less time because it's timing out on the bots.
2286
2287         * stress/has-own-property-name-cache-symbols-and-strings.js:
2288
2289 2016-11-15  Mark Lam  <mark.lam@apple.com>
2290
2291         The jsc shell's setImpureGetterDelegate() should ensure that the set value is an ImpureGetter.
2292         https://bugs.webkit.org/show_bug.cgi?id=164781
2293         <rdar://problem/28418590>
2294
2295         Reviewed by Geoffrey Garen and Michael Saboff.
2296
2297         * stress/jsc-setImpureGetterDelegate-on-bad-type.js: Added.
2298
2299 2016-11-15  Yusuke Suzuki  <utatane.tea@gmail.com>
2300
2301         [DOMJIT] Allow using macro assembler scratches in FTL CheckDOM
2302         https://bugs.webkit.org/show_bug.cgi?id=164727
2303
2304         Reviewed by Filip Pizlo.
2305
2306         * stress/check-dom-with-signature.js: Added.
2307         (shouldBe):
2308         (calling):
2309         (i.array.forEach):
2310
2311 2016-11-14  Caitlin Potter  <caitp@igalia.com>
2312
2313         [JSC] do not reference AwaitExpression Promises in async function Promise chain
2314         https://bugs.webkit.org/show_bug.cgi?id=164753
2315
2316         Reviewed by Yusuke Suzuki.
2317
2318         * asyncFunctionTests.yaml:
2319         * stress/async-await-long-loop.js: Added.
2320         (shouldBe):
2321         (async.longLoop):
2322         * stress/async-await-throw-loop.js: Added.
2323         (shouldBe):
2324         (async.thrower):
2325         (async.throwLoop):
2326
2327 2016-11-14  Keith Miller  <keith_miller@apple.com>
2328
2329         Add Wasm select
2330         https://bugs.webkit.org/show_bug.cgi?id=164743
2331
2332         Reviewed by Saam Barati.
2333
2334         * wasm/function-tests/select.js: Added.
2335
2336 2016-11-14  Caitlin Potter  <caitp@igalia.com>
2337
2338         [JSC] Handle new_async_func / new_async_func_exp in DFG / FTL
2339         https://bugs.webkit.org/show_bug.cgi?id=164037
2340
2341         Reviewed by Yusuke Suzuki.
2342
2343         Add tests based on tests from https://trac.webkit.org/changeset/194216.
2344
2345         * asyncFunctionTests.yaml:
2346         * stress/async-function-create-nobaseline.js: Added.
2347         * stress/async-function-create-optimized.js: Added.
2348         * stress/async-function-declaration-sinking-no-double-allocate.js: Added.
2349         * stress/async-function-declaration-sinking-osrexit.js: Added.
2350         * stress/async-function-declaration-sinking-put.js: Added.
2351         * stress/async-function-expression-sinking-no-double-allocate.js: Added.
2352         * stress/async-function-expression-sinking-osrexit.js: Added.
2353         * stress/async-function-expression-sinking-put.js: Added.
2354
2355 2016-11-14  Mark Lam  <mark.lam@apple.com>
2356
2357         Some of JSStringView::SafeView methods are not idiomatically safe for JSString to StringView conversions.
2358         https://bugs.webkit.org/show_bug.cgi?id=164701
2359         <rdar://problem/27462104>
2360
2361         Reviewed by Darin Adler.
2362
2363         * stress/string-prototype-charCodeAt-on-too-long-rope.js: Added.
2364
2365 2016-11-14  Mark Lam  <mark.lam@apple.com>
2366
2367         RegExpObject::exec/match should handle errors gracefully.
2368         https://bugs.webkit.org/show_bug.cgi?id=155145
2369         <rdar://problem/27435934>
2370
2371         Reviewed by Keith Miller.
2372
2373         * stress/regexp-prototype-exec-on-too-long-rope.js: Added.
2374         * stress/regexp-prototype-match-on-too-long-rope.js: Added.
2375         * stress/regexp-prototype-test-on-too-long-rope.js: Added.
2376
2377 2016-11-14  Mark Lam  <mark.lam@apple.com>
2378
2379         Enhance run-jsc-stress-test script to allow optional test specific options to be added for all test run configurations.
2380         https://bugs.webkit.org/show_bug.cgi?id=164695
2381
2382         Reviewed by Keith Miller.
2383
2384         Replace use of runMisc* test run configurations with equivalents.
2385
2386         * stress/licm-no-pre-header-nested.js:
2387         * stress/licm-no-pre-header.js:
2388         * stress/licm-pre-header-cannot-exit-nested.js:
2389         * stress/licm-pre-header-cannot-exit.js:
2390         * stress/make-dictionary-repatch.js:
2391         * stress/retry-cache-later.js:
2392         * stress/shadow-chicken-reading-from-scope-after-ftl-osr-exit-bytecode-liveness.js:
2393         * stress/slow-path-generator-updating-current-node-dfg.js:
2394         * stress/unshift-array-storage.js:
2395
2396 2016-11-11  Joseph Pecoraro  <pecoraro@apple.com>
2397
2398         test262: DataView with explicit undefined byteLength should be the same as it not being present
2399         https://bugs.webkit.org/show_bug.cgi?id=164453
2400
2401         Reviewed by Darin Adler.
2402
2403         * stress/dataview-construct.js: Added.
2404         (assert):
2405         (shouldThrow):
2406         * test262.yaml:
2407
2408 2016-11-11  Joseph Pecoraro  <pecoraro@apple.com>
2409
2410         test262: DataView get methods should allow for missing offset, set methods should allow for missing value
2411         https://bugs.webkit.org/show_bug.cgi?id=164451
2412
2413         Reviewed by Darin Adler.
2414
2415         * test262.yaml:
2416
2417 2016-11-11  Saam Barati  <sbarati@apple.com>
2418
2419         We should have a more concise way of determining when we're varargs calling a function using rest parameters
2420         https://bugs.webkit.org/show_bug.cgi?id=164258
2421
2422         Reviewed by Yusuke Suzuki.
2423
2424         * microbenchmarks/call-using-spread.js: Added.
2425         (bar):
2426         (foo):
2427         * microbenchmarks/spread-large-array.js: Added.
2428         (foo):
2429         (arrays.push):
2430         * microbenchmarks/spread-small-array.js: Added.
2431         (foo):
2432         * stress/spread-array-iterator-watchpoint-2.js: Added.
2433         (foo):
2434         (arrayIterator.next):
2435         * stress/spread-array-iterator-watchpoint.js: Added.
2436         (foo):
2437         (Array.prototype.Symbol.iterator):
2438         * stress/spread-non-array.js: Added.
2439         (assert):
2440         (foo):
2441         (let.customIterator.Symbol.iterator):
2442         (bar):
2443
2444 2016-11-11  Keith Miller  <keith_miller@apple.com>
2445
2446         Relocate wasm tests and actually add them to the test runner
2447         https://bugs.webkit.org/show_bug.cgi?id=164668
2448
2449         Reviewed by Yusuke Suzuki.
2450
2451         This moves the Wasm tests from their current location down a level.
2452         Without relocating, the tests cannot properly be run by the wasm test runner.
2453
2454         * wasm.yaml:
2455         * wasm/Builder.js: Fix typos, yay lazy synatx checking!
2456         * wasm/LowLevelBinary.js: Fix typos, yay lazy synatx checking!
2457         (export.default.LowLevelBinary.prototype.get return):
2458         * wasm/function-tests/add-12.js: Renamed from JSTests/wasm/js-api/function-tests/add-12.js.
2459         * wasm/function-tests/br-if-loop-less-than.js: Renamed from JSTests/wasm/js-api/function-tests/br-if-loop-less-than.js.
2460         * wasm/function-tests/brTableAsIf.js: Renamed from JSTests/wasm/js-api/function-tests/brTableAsIf.js.
2461         * wasm/function-tests/brTableManyValues.js: Renamed from JSTests/wasm/js-api/function-tests/brTableManyValues.js.
2462         * wasm/function-tests/brTableWithLoop.js: Renamed from JSTests/wasm/js-api/function-tests/brTableWithLoop.js.
2463         * wasm/function-tests/dumb-eq-if-then-else.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-eq-if-then-else.js.
2464         * wasm/function-tests/dumb-less-than-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-less-than-fallthrough.js.
2465         * wasm/function-tests/dumb-less-than-ite.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-less-than-ite.js.
2466         * wasm/function-tests/factorial.js: Renamed from JSTests/wasm/js-api/function-tests/factorial.js.
2467         * wasm/function-tests/float-sub.js: Renamed from JSTests/wasm/js-api/function-tests/float-sub.js.
2468         * wasm/function-tests/i32-load.js: Renamed from JSTests/wasm/js-api/function-tests/i32-load.js.
2469         * wasm/function-tests/i32-load8-s.js: Renamed from JSTests/wasm/js-api/function-tests/i32-load8-s.js.
2470         * wasm/function-tests/if-then-else-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/if-then-else-fallthrough.js.
2471         * wasm/function-tests/if-then-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/if-then-fallthrough.js.
2472         * wasm/function-tests/loop-mult.js: Renamed from JSTests/wasm/js-api/function-tests/loop-mult.js.
2473         * wasm/function-tests/loop-sum.js: Renamed from JSTests/wasm/js-api/function-tests/loop-sum.js.
2474         * wasm/function-tests/ret5.js: Renamed from JSTests/wasm/js-api/function-tests/ret5.js.
2475         * wasm/self-test/test_BuilderJSON.js: Rebasline
2476
2477 2016-11-11  Keith Miller  <keith_miller@apple.com>
2478
2479         Move Wasm tests to JS
2480         https://bugs.webkit.org/show_bug.cgi?id=164611
2481
2482         Reviewed by Geoffrey Garen.
2483
2484         This patch translates most of the tests from testWasm.cpp to the JS testing api. Most of the
2485         ommited tests were earliest tests, which tested trivial things, like adding two
2486         constants. Some tests are ommited for other reasons, however. These are:
2487
2488         1) Tests using I64 since the testing api does not yet know how to handle 64-bit numbers.  2)
2489         Tests that would validate the memory of the module once wasm was done with it since that's
2490         not really possible in JS.
2491
2492         In order to make such a translation easier this patch also adds some features to the JS
2493         testing api:
2494
2495         1) Blocks can now be done lexically by adding a lambda as the last argument of the block
2496         opcode. For example one can do:
2497             ...
2498             .Block("i32", b => b.I32Const(1) )
2499
2500         and the nested lambda will automatically have an end attached.
2501
2502         2) The JS testing api can now handle inline signature types.
2503
2504         3) Relocate some code to make it easier to follow and prevent 44 space indentation.
2505
2506         4) Rename varuint/varint to varuint32/varint32, this lets them be directly called from the
2507         wasm.json without being remapped.
2508
2509         5) Add support for Memory and Function sections to the Builder.
2510
2511         6) Add support for local variables.
2512
2513         On the JSC side, we needed to expose a new function to validate the compiled wasm code
2514         behaves the way we expect. At least until the JS Wasm API is finished. The new validation
2515         function, testWasmModuleFunctions, takes an array buffer containing the wasm binary, the
2516         number of functions in the blob and tests for each of those functions.
2517
2518         * wasm/Builder.js:
2519         (const._maybeRegisterType):
2520         (const): Deleted.
2521         (switch.typeof): Deleted.
2522         * wasm/Builder_WebAssemblyBinary.js:
2523         (const.emitters.Type):
2524         (const.emitters.Import):
2525         (const.emitters.Function):
2526         (const.emitters.Memory):
2527         (const.emitters.Code):
2528         (export.const.Binary):
2529         * wasm/LowLevelBinary.js:
2530         (export.default.LowLevelBinary.prototype.get return):
2531         (export.default.LowLevelBinary.prototype.varuint32):
2532         (export.default.LowLevelBinary.prototype.varint32):
2533         (export.default.LowLevelBinary.prototype.varuint1):
2534         (export.default.LowLevelBinary.prototype.varint7):
2535         (export.default.LowLevelBinary.prototype.varuint7):
2536         (export.default.LowLevelBinary.prototype.inline_signature_type):
2537         (export.default.LowLevelBinary.prototype.string):
2538         (export.default.LowLevelBinary.prototype.getVaruint32):
2539         (export.default.LowLevelBinary.prototype.getVarint32):
2540         (export.default.LowLevelBinary.prototype.getVaruint7):
2541         (export.default.LowLevelBinary.prototype.getString):
2542         (export.default.LowLevelBinary):
2543         (export.default.LowLevelBinary.prototype.varuint): Deleted.
2544         (export.default.LowLevelBinary.prototype.varint): Deleted.
2545         (export.default.LowLevelBinary.prototype.getVaruint): Deleted.
2546         (export.default.LowLevelBinary.prototype.getVarint): Deleted.
2547         * wasm/js-api/test_old_tests.js: Added.
2548         (ret5):
2549         (brTableWithLoop):
2550         (brTableManyValues):
2551         (run.brTableManyValues.brTableAsIf):
2552         (ifThenFallthrough):
2553         (ifThenElseFallthrough):
2554         (dumbLessThanFallthrough):
2555         (run.dumbLessThanFallthrough.floatSub):
2556         (run.floatSub.add12):
2557         (run.add12.factorial):
2558         (i32load):
2559         (run.i32load.i32load8s):
2560         (run.i32load8s.dumbEqIfThenElse):
2561         (run.dumbEqIfThenElse.dumbEqIfThenElse):
2562         (run.dumbEqIfThenElse.dumbLessThanIfThenElse):
2563         (run.dumbLessThanIfThenElse.loopSum):
2564         (run.loopSum.loopMult):
2565         (brIfLoopLessThan):
2566         (run.brIfLoopLessThan.run):
2567         * wasm/self-test/test_LowLevelBinary_varint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varint.js.
2568         * wasm/self-test/test_LowLevelBinary_varuint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varuint.js.
2569
2570         * wasm/Builder.js:
2571         (const._maybeRegisterType):
2572         (const): Deleted.
2573         (switch.typeof): Deleted.
2574         * wasm/Builder_WebAssemblyBinary.js:
2575         (const.emitters.Type):
2576         (const.emitters.Import):
2577         (const.emitters.Function):
2578         (const.emitters.Memory):
2579         (const.emitters.Code):
2580         (export.const.Binary):
2581         * wasm/LowLevelBinary.js:
2582         (export.default.LowLevelBinary.prototype.get return):
2583         (export.default.LowLevelBinary.prototype.varuint32):
2584         (export.default.LowLevelBinary.prototype.varint32):
2585         (export.default.LowLevelBinary.prototype.varuint1):
2586         (export.default.LowLevelBinary.prototype.varint7):
2587         (export.default.LowLevelBinary.prototype.varuint7):
2588         (export.default.LowLevelBinary.prototype.inline_signature_type):
2589         (export.default.LowLevelBinary.prototype.string):
2590         (export.default.LowLevelBinary.prototype.getVaruint32):
2591         (export.default.LowLevelBinary.prototype.getVarint32):
2592         (export.default.LowLevelBinary.prototype.getVaruint7):
2593         (export.default.LowLevelBinary.prototype.getString):
2594         (export.default.LowLevelBinary):
2595         (export.default.LowLevelBinary.prototype.varuint): Deleted.
2596         (export.default.LowLevelBinary.prototype.varint): Deleted.
2597         (export.default.LowLevelBinary.prototype.getVaruint): Deleted.
2598         (export.default.LowLevelBinary.prototype.getVarint): Deleted.
2599         * wasm/js-api/function-tests/add-12.js: Added.
2600         * wasm/js-api/function-tests/br-if-loop-less-than.js: Added.
2601         * wasm/js-api/function-tests/brTableAsIf.js: Added.
2602         * wasm/js-api/function-tests/brTableManyValues.js: Added.
2603         * wasm/js-api/function-tests/brTableWithLoop.js: Added.
2604         * wasm/js-api/function-tests/dumb-eq-if-then-else.js: Added.
2605         * wasm/js-api/function-tests/dumb-less-than-fallthrough.js: Added.
2606         * wasm/js-api/function-tests/dumb-less-than-ite.js: Added.
2607         * wasm/js-api/function-tests/factorial.js: Added.
2608         * wasm/js-api/function-tests/float-sub.js: Added.
2609         * wasm/js-api/function-tests/i32-load.js: Added.
2610         * wasm/js-api/function-tests/i32-load8-s.js: Added.
2611         * wasm/js-api/function-tests/if-then-else-fallthrough.js: Added.
2612         * wasm/js-api/function-tests/if-then-fallthrough.js: Added.
2613         * wasm/js-api/function-tests/loop-mult.js: Added.
2614         * wasm/js-api/function-tests/loop-sum.js: Added.
2615         * wasm/js-api/function-tests/ret5.js: Added.
2616         * wasm/self-test/test_LowLevelBinary_varint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varint.js.
2617         * wasm/self-test/test_LowLevelBinary_varuint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varuint.js.
2618
2619 2016-11-11  Saam Barati  <sbarati@apple.com>
2620
2621         We recursively grab a lock in the DFGBytecodeParser causing us to deadlock
2622         https://bugs.webkit.org/show_bug.cgi?id=164650
2623
2624         Reviewed by Geoffrey Garen.
2625
2626         * stress/dont-dead-lock-put-by-val-as-put-by-id.js: Added.
2627         (ident):
2628         (let.o.set foo):
2629         (foo):
2630
2631 2016-11-11  Chris Dumez  <cdumez@apple.com>
2632
2633         Unreviewed, rolling out r208584.
2634
2635         Seems to have regressed Speedometer by 1% on Mac
2636
2637         Reverted changeset:
2638
2639         "We should have a more concise way of determining when we're
2640         varargs calling a function using rest parameters"
2641         https://bugs.webkit.org/show_bug.cgi?id=164258
2642         http://trac.webkit.org/changeset/208584
2643
2644 2016-11-11  Chris Dumez  <cdumez@apple.com>
2645
2646         Unreviewed, rolling out r208117 and r208160.
2647
2648         Regressed Speedometer by >1.5%
2649
2650         Reverted changesets:
2651
2652         "We should have a way of profiling when a get_by_id is pure
2653         and to emit a PureGetById in the DFG/FTL"
2654         https://bugs.webkit.org/show_bug.cgi?id=163305
2655         http://trac.webkit.org/changeset/208117
2656
2657         "Debug JSC test microbenchmarks/pure-get-by-id-cse-2.js timing
2658         out"
2659         https://bugs.webkit.org/show_bug.cgi?id=164227
2660         http://trac.webkit.org/changeset/208160
2661
2662 2016-11-11  Saam Barati  <sbarati@apple.com>
2663
2664         We should have a more concise way of determining when we're varargs calling a function using rest parameters
2665         https://bugs.webkit.org/show_bug.cgi?id=164258
2666
2667         Reviewed by Yusuke Suzuki.
2668
2669         * microbenchmarks/call-using-spread.js: Added.
2670         (bar):
2671         (foo):
2672         * microbenchmarks/spread-large-array.js: Added.
2673         (foo):
2674         (arrays.push):
2675         * microbenchmarks/spread-small-array.js: Added.
2676         (foo):
2677         * stress/spread-array-iterator-watchpoint-2.js: Added.
2678         (foo):
2679         (arrayIterator.next):
2680         * stress/spread-array-iterator-watchpoint.js: Added.
2681         (foo):
2682         (Array.prototype.Symbol.iterator):
2683         * stress/spread-non-array.js: Added.
2684         (assert):
2685         (foo):
2686         (let.customIterator.Symbol.iterator):
2687         (bar):
2688
2689 2016-11-10  Mark Lam  <mark.lam@apple.com>
2690
2691         Fix broken have-a-bad-time-with-arguments.js test.
2692         https://bugs.webkit.org/show_bug.cgi?id=164626
2693
2694         Reviewed by Filip Pizlo.
2695
2696         But also saved a copy of the broken one as broken-have-a-bad-time-with-arguments-for-gc-testing.js
2697         because coincidentally, it stresses the GC in ways that help reveal bugs.
2698
2699         * stress/broken-have-a-bad-time-with-arguments-for-gc-testing.js: Added.
2700         (testFunction):
2701         (warmupFunction):
2702         (let.argsDeclIndex.in.argumentsDecls.let.indexToReturnIndex.in.indicesToReturn.let.insertElementActionIndex.in.insertElementActions.let.tierWarmupCountIndex.in.tierWarmupCounts.let.testArgsIndex.in.testArgsList.catch):
2703         * stress/have-a-bad-time-with-arguments.js:
2704
2705 2016-11-10  JF Bastien  <jfbastien@apple.com>
2706
2707         ASSERTION FAILED: length > offset encountered with wasm.yaml/wasm/js-api/test_Module.js.default-wasm
2708         https://bugs.webkit.org/show_bug.cgi?id=164597
2709
2710         Reviewed by Keith Miller.
2711
2712         Trim the array buffer before returning it: it's optimistically
2713         over-allocated to avoid growing all the time, but when parsed it
2714         can't have extra content.
2715
2716         * wasm/Builder_WebAssemblyBinary.js:
2717         (export.const.Binary):
2718         * wasm/LowLevelBinary.js:
2719         (export.default.LowLevelBinary.prototype.get return):
2720
2721 2016-11-10  Joseph Pecoraro  <pecoraro@apple.com>
2722
2723         test262: DataView / TypedArray methods should throw RangeErrors for negative numbers (ToIndex)
2724         https://bugs.webkit.org/show_bug.cgi?id=164450
2725
2726         Reviewed by Darin Adler.
2727
2728         * stress/dataview-typedarray-toindex.js: Added.
2729         Tests for all cases where ToIndex should be used.
2730
2731         * test262.yaml:
2732         New passing tests.
2733
2734 2016-11-10  Mark Lam  <mark.lam@apple.com>
2735
2736         Graph::methodOfGettingAValueProfileFor() should be returning the profile for the operand node.
2737         https://bugs.webkit.org/show_bug.cgi?id=164600
2738         <rdar://problem/28828676>
2739
2740         Reviewed by Filip Pizlo.
2741
2742         * stress/osr-exit-on-op-negate-should-no-fail-assertions.js: Added.
2743
2744 2016-11-08  Yusuke Suzuki  <utatane.tea@gmail.com>
2745
2746         [JSC] Avoid cloned arguments allocation in ArrayPrototype methods
2747         https://bugs.webkit.org/show_bug.cgi?id=164502
2748
2749         Reviewed by Saam Barati.
2750
2751         * stress/argument-intrinsic-basic.js: Added.
2752         (shouldBe):
2753         (builtin.createBuiltin):
2754         * stress/argument-intrinsic-inlining-with-result-escape.js: Added.
2755         (shouldBe):
2756         (builtin.createBuiltin):
2757         (escape):
2758         * stress/argument-intrinsic-nested-inlining.js: Added.
2759         (shouldBe):
2760         (builtin.createBuiltin):
2761         (builtinCaller1):
2762         (builtinCaller2):
2763         (escape):
2764         * stress/argument-intrinsic-not-convert-to-get-argument.js: Added.
2765         (shouldBe):
2766         (builtin.createBuiltin):
2767         * stress/argument-intrinsic-with-stack-write.js: Added.
2768         (shouldBe):
2769         (builtin.createBuiltin):
2770
2771 2016-11-09  Saam Barati  <sbarati@apple.com>
2772
2773         Math.min()/Math.max() with no arguments is lowered incorrectly in the BytecodeParser
2774         https://bugs.webkit.org/show_bug.cgi?id=164464
2775         <rdar://problem/29131452>
2776
2777         Reviewed by Darin Adler.
2778
2779         * stress/math-max-min-no-arguments.js: Added.
2780         (assert):
2781         (min):
2782         (max):
2783         (test):
2784
2785 2016-11-09  Saam Barati  <sbarati@apple.com>
2786
2787         TypeProfiler and running GC collection on another thread don't play nicely with each other
2788         https://bugs.webkit.org/show_bug.cgi?id=164441
2789         <rdar://problem/29132174>
2790
2791         Reviewed by Geoffrey Garen.
2792
2793         * typeProfiler/type-profiler-gc.js: Added.
2794         (bar):
2795         (foo):
2796
2797 2016-11-04  Mark Lam  <mark.lam@apple.com>
2798
2799         Error description code should be able to handle Symbol values.
2800         https://bugs.webkit.org/show_bug.cgi?id=164436
2801         <rdar://problem/29115583>
2802
2803         Reviewed by Filip Pizlo and Saam Barati.
2804
2805         * stress/error-description-on-symbols-should-not-crash.js: Added.
2806
2807 2016-11-03  Geoffrey Garen  <ggaren@apple.com>
2808
2809         EvalCodeCache should not give up in strict mode and other cases
2810         https://bugs.webkit.org/show_bug.cgi?id=164357
2811
2812         Reviewed by Michael Saboff.
2813
2814         * microbenchmarks/eval-cached.js: Added. 45x faster now.
2815         * stress/eval-cached.js: Added. Try running the same eval text in a bunch
2816         of different scopes and verify that we access the right scope.
2817
2818 2016-11-04  JF Bastien  <jfbastien@apple.com>
2819
2820         WebAssembly JS API: implement more sections
2821         https://bugs.webkit.org/show_bug.cgi?id=164023
2822
2823         Reviewed by Keith Miller.
2824
2825         On the JSC side:
2826
2827          - Put in parser stubs for all WebAssembly sections.
2828          - Parse Import, Export sections.
2829          - Use tryReserveCapacity instead of reserve, and bail out of the parser if it fails. This prevents the parser from bringing everything down when faced with a malicious input.
2830          - Encapsulate all parsed module information into its own structure, making it easier to pass around (from parser to Plan to Module to Instance).
2831          - Create WasmFormat.cpp to hold parsed module information's dtor to avoid including WasmMemory.h needlessly.
2832          - parseCode: avoid overflow through function size.
2833          - Remove all remainders of polyfill-prototype-1, and update license.
2834          - Add missing WasmOps.h and WasmValidateInlines.h auto-generation for cmake build.
2835
2836         On the Builder.js testing side:
2837
2838          - Implement Type, Import (function only), Export (function only) sections.
2839          - Check section order and uniqueness.
2840          - Optionally auto-generate the Type section from subsequent Export / Import / Code entries.
2841          - Allow re-exporting an import.
2842
2843         * wasm/Builder.js: build type, import, and export sections
2844         (const._normalizeFunctionSignature):
2845         * wasm/Builder_WebAssemblyBinary.js: Added. Forked from Builder.js
2846         (const.emitters.Type):
2847         (const.emitters.Import):
2848         (const.emitters.Function):
2849         (const.emitters.Table):
2850         (const.emitters.Memory):
2851         (const.emitters.Global):
2852         (const.emitters.Export):
2853         (const.emitters.Start):
2854         (const.emitters.Element):
2855         (const.emitters.Code):
2856         (const.emitters.Data):
2857         (export.const.Binary):
2858         * wasm/LowLevelBinary.js: Add a few useful outputs
2859         (export.default.LowLevelBinary.prototype.varuint1):
2860         (export.default.LowLevelBinary.prototype.varint7):
2861         * wasm/WASM.js: value type and external kind helpers
2862         * wasm/assert.js: array element-wise equality comparison
2863         (const._eq):
2864         * wasm/js-api/test_Module.js:
2865         (ModuleWithImports):
2866         * wasm/self-test/test_BuilderJSON.js: many more tests for all the new Builder APIs, and update to some older tests which now require a Type section or rejiggered Function signature
2867         (const.assertOpThrows):
2868         (SectionsWithSameCustomName):
2869         (TwoTypeSections):
2870         (EmptyImportSection):
2871         (ImportBeforeTypeSections):
2872         * wasm/self-test/test_BuilderWebAssembly.js: remove a test which wasn't helpful and is now obsolete
2873         (CustomSection):
2874
2875 2016-11-03  Mark Lam  <mark.lam@apple.com>
2876
2877         ClonedArguments need to also support haveABadTime mode.
2878         https://bugs.webkit.org/show_bug.cgi?id=164200
2879         <rdar://problem/27211336>
2880
2881         Reviewed by Geoffrey Garen.
2882
2883         * stress/have-a-bad-time-with-arguments.js: Added.
2884
2885 2016-11-03  Filip Pizlo  <fpizlo@apple.com>
2886
2887         DFG plays fast and loose with the shadow values of a Phi
2888         https://bugs.webkit.org/show_bug.cgi?id=164309
2889
2890         Reviewed by Saam Barati.
2891         
2892         This test demonstrates why the DFG needs to recognize the shadow value of a Phi.
2893
2894         * stress/dfg-ssa-swap.js: Added.
2895         (foo):
2896
2897 2016-11-03  Commit Queue  <commit-queue@webkit.org>
2898
2899         Unreviewed, rolling out r208364.
2900         https://bugs.webkit.org/show_bug.cgi?id=164402
2901
2902         broke the build (Requested by smfr on #webkit).
2903
2904         Reverted changeset:
2905
2906         "DFG plays fast and loose with the shadow values of a Phi"
2907         https://bugs.webkit.org/show_bug.cgi?id=164309
2908         http://trac.webkit.org/changeset/208364
2909
2910 2016-11-03  Filip Pizlo  <fpizlo@apple.com>
2911
2912         DFG plays fast and loose with the shadow values of a Phi
2913         https://bugs.webkit.org/show_bug.cgi?id=164309
2914
2915         Reviewed by Saam Barati.
2916         
2917         This test demonstrates why the DFG needs to recognize the shadow value of a Phi.
2918
2919         * stress/dfg-ssa-swap.js: Added.
2920         (foo):
2921
2922 2016-11-03  Saam Barati  <sbarati@apple.com>
2923
2924         Asking for a value profile prediction should be defensive against not finding a value profile
2925         https://bugs.webkit.org/show_bug.cgi?id=164306
2926
2927         Reviewed by Mark Lam.
2928
2929         * stress/inlined-tail-call-in-inlined-setter-should-not-crash-when-getting-value-profile.js: Added.
2930         (let.o.set foo):
2931         (bar):
2932
2933 2016-11-02  Saam Barati  <sbarati@apple.com>
2934
2935         Allocation elimination of rest parameter doesn't take into account indexed properties on Array.prototype/Object.prototype
2936         https://bugs.webkit.org/show_bug.cgi?id=164301
2937
2938         Reviewed by Geoffrey Garen.
2939
2940         * stress/rest-parameter-allocation-elimination-watchpoints-2.js: Added.
2941         (assert):
2942         (foo):
2943         * stress/rest-parameter-allocation-elimination-watchpoints-3.js: Added.
2944         (assert):
2945         (foo):
2946         * stress/rest-parameter-allocation-elimination-watchpoints-4.js: Added.
2947         (assert):
2948         (foo):
2949         * stress/rest-parameter-allocation-elimination-watchpoints-5.js: Added.
2950         (assert):
2951         (foo):
2952         * stress/rest-parameter-allocation-elimination-watchpoints-6.js: Added.
2953         (assert):
2954         (foo):
2955         * stress/rest-parameter-allocation-elimination-watchpoints.js: Added.
2956         (assert):
2957         (foo):
2958
2959 2016-11-01  Saam Barati  <sbarati@apple.com>
2960
2961         We should be able to eliminate rest parameter allocations
2962         https://bugs.webkit.org/show_bug.cgi?id=163925
2963
2964         Reviewed by Filip Pizlo.
2965
2966         * microbenchmarks/rest-parameter-allocation-elimination.js: Added.
2967         (assert):
2968         (test1.bar):
2969         (test1):
2970         (test2.jaz):
2971         (test2.jaz2.kaz):
2972         (test2.jaz2):
2973         (test2):
2974         (test3.foo):
2975         (test3.baz):
2976         (test3.jaz):
2977         (test3):
2978         (test4.baz):
2979         (test4.jaz):
2980         (test4):
2981         (test5.baz):
2982         (test5.jaz):
2983         (test5):
2984         (test6.baz):
2985         (test6.jaz):
2986         (test6):
2987         (test7.baz):
2988         (test7.jaz):
2989         (test7.check):
2990         (test7):
2991         (test8.baz):
2992         (test8.jaz):
2993         (test8.check):
2994         (test8):
2995         (test9.baz):
2996         (test9.jaz):
2997         (test9.check):
2998         (test9):
2999         (test10.baz):
3000         (test10.jaz):
3001         (test10):
3002         (test11.bar):
3003         (test11.foo):
3004         (test11.makeArguments):
3005         (test11.):
3006         (test12):
3007         (test12.bar):
3008         (test12.foo):
3009         (test12.makeArguments):
3010         (test12.):
3011         (test13.bar):
3012         (test13.top):
3013         (test13.foo):
3014         (test13.makeArguments):
3015         (test13.):
3016         (test13):
3017         (test14.bar):
3018         (test14.top):
3019         (test14.foo):
3020         (test14.makeArguments):
3021         (test14.):
3022         (test14):
3023         (test15.bar):
3024         (test15.top):
3025         (test15.foo):
3026         (test15.makeArguments):
3027         (test15.):
3028         (test15):
3029
3030 2016-11-01  Commit Queue  <commit-queue@webkit.org>
3031
3032         Unreviewed, rolling out r208208 and r208210.
3033         https://bugs.webkit.org/show_bug.cgi?id=164276
3034
3035         This change caused 28 JSC test failures. (Requested by
3036         ryanhaddad on #webkit).
3037
3038         Reverted changesets:
3039
3040         "We should be able to eliminate rest parameter allocations"
3041         https://bugs.webkit.org/show_bug.cgi?id=163925
3042         http://trac.webkit.org/changeset/208208
3043
3044         "Fix the EFL build."
3045         http://trac.webkit.org/changeset/208210
3046
3047 2016-10-31  Filip Pizlo  <fpizlo@apple.com>
3048
3049         JSC should support SharedArrayBuffer
3050         https://bugs.webkit.org/show_bug.cgi?id=163986
3051
3052         Reviewed by Keith Miller.
3053         
3054         This adds our own test for the various corner cases of SharedArrayBuffer. This test is meant to
3055         check all of the things that don't require concurrency.
3056
3057         * stress/SharedArrayBuffer.js: Added.
3058         (checkAtomics):
3059         (shouldFail):
3060         (Symbol):
3061         (runAtomic):
3062
3063 2016-10-31  Saam Barati  <sbarati@apple.com>
3064
3065         We should be able to eliminate rest parameter allocations
3066         https://bugs.webkit.org/show_bug.cgi?id=163925
3067
3068         Reviewed by Filip Pizlo.
3069
3070         * microbenchmarks/rest-parameter-allocation-elimination.js: Added.
3071         (assert):
3072         (test1.bar):
3073         (test1):
3074         (test2.jaz):
3075         (test2.jaz2.kaz):
3076         (test2.jaz2):
3077         (test2):
3078         (test3.foo):
3079         (test3.baz):
3080         (test3.jaz):
3081         (test3):
3082         (test4.baz):
3083         (test4.jaz):
3084         (test4):
3085         (test5.baz):
3086         (test5.jaz):
3087         (test5):
3088         (test6.baz):
3089         (test6.jaz):
3090         (test6):
3091         (test7.baz):
3092         (test7.jaz):
3093         (test7.check):
3094         (test7):
3095         (test8.baz):
3096         (test8.jaz):
3097         (test8.check):
3098         (test8):
3099         (test9.baz):
3100         (test9.jaz):
3101         (test9.check):
3102         (test9):
3103         (test10.baz):
3104         (test10.jaz):
3105         (test10):
3106         (test11.bar):
3107         (test11.foo):
3108         (test11.makeArguments):
3109         (test11.):
3110         (test12):
3111         (test12.bar):
3112         (test12.foo):
3113         (test12.makeArguments):
3114         (test12.):
3115         (test13.bar):
3116         (test13.top):
3117         (test13.foo):
3118         (test13.makeArguments):
3119         (test13.):
3120         (test13):
3121         (test14.bar):
3122         (test14.top):
3123         (test14.foo):
3124         (test14.makeArguments):
3125         (test14.):
3126         (test14):
3127         (test15.bar):
3128         (test15.top):
3129         (test15.foo):
3130         (test15.makeArguments):
3131         (test15.):
3132         (test15):
3133
3134 2016-10-31  Saam Barati  <sbarati@apple.com>
3135
3136         Debug JSC test microbenchmarks/pure-get-by-id-cse-2.js timing out
3137         https://bugs.webkit.org/show_bug.cgi?id=164227
3138
3139         Unreviewed timeout fix.
3140
3141         * microbenchmarks/pure-get-by-id-cse-2.js:
3142
3143 2016-10-31  Keith Miller  <keith_miller@apple.com>
3144
3145         autogenerated files from wasm.json should be in derived sources.
3146         https://bugs.webkit.org/show_bug.cgi?id=164152
3147
3148         Reviewed by Filip Pizlo.
3149
3150         Delete generation script since it is no longer used.
3151
3152         * wasm/generate-wasmops-header.js: Removed.
3153
3154 2016-10-29  Yusuke Suzuki  <utatane.tea@gmail.com>
3155
3156         [JSC] JSON.stringify should handle Proxy which is non JSArray but isArray is true
3157         https://bugs.webkit.org/show_bug.cgi?id=164123
3158
3159         Reviewed by Mark Lam.
3160
3161         * stress/json-stringify-with-non-jsarray-array.js: Added.
3162         (shouldBe):
3163         (shouldBe.JSON.stringify.new.Proxy):
3164
3165 2016-10-29  Saam Barati  <sbarati@apple.com>
3166
3167         We should have a way of profiling when a get_by_id is pure and to emit a PureGetById in the DFG/FTL
3168         https://bugs.webkit.org/show_bug.cgi?id=163305
3169
3170         Reviewed by Keith Miller.
3171
3172         * microbenchmarks/pure-get-by-id-cse-2.js: Added.
3173         (foo):
3174         * microbenchmarks/pure-get-by-id-cse.js: Added.
3175         (foo):
3176         * stress/pure-get-by-id-cse-correctness.js: Added.
3177         (assert):
3178         (foo):
3179         * stress/pure-get-by-id-on-non-object.js: Added.
3180         (assert):
3181         (foo):
3182
3183 2016-10-28  Csaba Osztrogonác  <ossy@webkit.org>
3184
3185         Skip JSTests/microbenchmarks/dense-set.js on memory limited devices
3186         https://bugs.webkit.org/show_bug.cgi?id=164128
3187
3188         Reviewed by Mark Lam.
3189
3190         * microbenchmarks/dense-set.js:
3191
3192 2016-10-20  Caitlin Potter  <caitp@igalia.com>
3193
3194         [JSC] implement runtime for async functions
3195         https://bugs.webkit.org/show_bug.cgi?id=163760
3196
3197         Reviewed by Yusuke Suzuki.
3198
3199         * stress/async-await-basic.js: Added.
3200         (shouldBe):
3201         (shouldBeAsync):
3202         (shouldThrow):
3203         (shouldThrowAsync):
3204         (shouldThrowSyntaxError):
3205         (let.AsyncFunction.async):
3206         (async.asyncFunctionForProto):
3207         (Object.getPrototypeOf.async):
3208         (Object.getPrototypeOf.async.method):
3209         (async):
3210         (async.method):
3211         (async.asyncNonConstructorDecl):
3212         (shouldThrow.new.async):
3213         (shouldThrow.new.async.nonConstructor):
3214         (async.asyncDecl):
3215         (async.f):
3216         (MyError):
3217         (async.asyncDeclThrower):
3218         (shouldThrowAsync.async):
3219         (resolveLater):
3220         (rejectLater):
3221         (async.resumeAfterNormal):
3222         (O.async.resumeAfterNormal):
3223         (resumeAfterNormalArrow.async):
3224         (async.resumeAfterThrow):
3225         (O.async.resumeAfterThrow):
3226         (resumeAfterThrowArrow.async):
3227         (catch):
3228         * stress/async-await-module-reserved-word.js: Added.
3229         (shouldThrow):
3230         (SyntaxError.Canstring_appeared_hereawait.checkModuleSyntaxError.String.raw.await):
3231         (checkModuleSyntaxError.String.raw.await):
3232         (checkModuleSyntaxError.String.raw.async.await):
3233         (SyntaxError.Cannot.declare.named):
3234         * stress/async-await-mozilla.js: Added.
3235         (shouldBe):
3236         (shouldBeAsync):
3237         (shouldThrow):
3238         (shouldThrowAsync):
3239         (assert):
3240         (shouldThrowSyntaxError):
3241         (mozSemantics.async.empty):
3242         (mozSemantics.async.simpleReturn):
3243         (mozSemantics.async.simpleAwait):
3244         (mozSemantics.async.simpleAwaitAsync):
3245         (mozSemantics.async.returnOtherAsync):
3246         (mozSemantics.async.simpleThrower):
3247         (mozSemantics.async.delegatedThrower):
3248         (mozSemantics.async.tryCatch):
3249         (mozSemantics.async.tryCatchThrow):
3250         (mozSemantics.async.wellFinally):
3251         (mozSemantics.async.finallyMayFail):
3252         (mozSemantics.async.embedded.async.inner):
3253         (mozSemantics.async.embedded):
3254         (mozSemantics.async.fib):
3255         (mozSemantics.async.isOdd.async.isEven):
3256         (mozSemantics.async.isOdd):
3257         (mozSemantics.hardcoreFib.async.fib2):
3258         (mozSemantics.namedAsyncExpr.async.simple):
3259         (mozSemantics.async.executionOrder.async.first):
3260         (mozSemantics.async.executionOrder.async.second):
3261         (mozSemantics.async.executionOrder.async.third):
3262         (mozSemantics.async.executionOrder):
3263         (mozSemantics.async.miscellaneous):
3264         (mozSemantics.thrower):
3265         (mozSemantics.async.defaultArgs):
3266         (mozSemantics.shouldThrow):
3267         (mozSemantics):
3268         (mozMethods.X):
3269         (mozMethods.X.prototype.async.getValue):
3270         (mozMethods.X.prototype.setValue):
3271         (mozMethods.X.prototype.async.increment):
3272         (mozMethods.X.prototype.async.getBaseClassName):
3273         (mozMethods.X.async.getStaticValue):
3274         (mozMethods.Y.prototype.async.getBaseClassName):
3275         (mozMethods.Y):
3276         (mozFunctionNameInferrence.async.test):
3277         (mozSyntaxErrors):
3278         * stress/async-await-reserved-word.js: Added.
3279         (assert):
3280         (shouldThrowSyntaxError):
3281         (AsyncFunction.async):
3282         * stress/async_arrow_functions_lexical_arguments_binding.js: Added.
3283         (shouldBe):
3284         (shouldBeAsync):
3285         (shouldThrowAsync):
3286         (noArgumentsArrow2.async):
3287         * stress/async_arrow_functions_lexical_new.target_binding.js: Added.
3288         (shouldBe):
3289         (shouldBeAsync):
3290         (shouldThrowAsync):
3291         (C1):
3292         (C2):
3293         (shouldThrowAsync.async):
3294         * stress/async_arrow_functions_lexical_super_binding.js: Added.
3295         (shouldBe):
3296         (shouldBeAsync):
3297         (BaseClass.prototype.baseClassValue):
3298         (BaseClass.prototype.get property):
3299         (BaseClass):
3300         (ChildClass.prototype.asyncSuperProp):
3301         (ChildClass.prototype.asyncSuperProp2):
3302         (ChildClass):
3303         (ChildClass2):
3304         * stress/async_arrow_functions_lexical_this_binding.js: Added.
3305         (shouldBe):
3306         (shouldBeAsync):
3307         (d.y):
3308
3309 2016-10-28  Csaba Osztrogonác  <ossy@webkit.org>
3310
3311         Skip 2 JS stress tests on memory limited devices
3312         https://bugs.webkit.org/show_bug.cgi?id=164125
3313
3314         Unreviewed quick fix to unbreak JSCOnly ARM bots as soon as possible.
3315
3316         * stress/joined-strings-should-not-exceed-max-string-length.js:
3317         * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
3318
3319 2016-10-27  Caitlin Potter  <caitp@igalia.com>
3320
3321         [JSC] forbid lexical redeclaration of generator formal parameters
3322         https://bugs.webkit.org/show_bug.cgi?id=163930
3323
3324         Reviewed by Yusuke Suzuki.
3325
3326         * stress/async-await-syntax.js:
3327         * stress/generator-syntax.js:
3328         (testSyntaxError.gen):
3329         (testSyntaxError.arguments):
3330         (testSyntaxError.eval):
3331         * test262.yaml:
3332
3333 2016-10-26  JF Bastien  <jfbastien@apple.com>
3334
3335         WebAssembly API: implement Instance
3336
3337         As described in: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblyinstance-objects
3338
3339          - Take ownership of Wasm::Plan's compilation result when successfully creating a JSWebAssemblyModule object.
3340          - Construct a basic Instance with a Module.
3341          - Handle second argument (importObject) of WebAssembly.Instance.
3342          - Add reference text from the spec to WebAssembly.Module's code.
3343          - Expose and test an empty 'exports' ModuleNamespaceObject on WebAssembly.Instance.
3344
3345         The implementation isn't complete yet: it relies on further work for which I've filed bugs.
3346
3347         WebAssembly API: implement Instance
3348         https://bugs.webkit.org/show_bug.cgi?id=163998
3349
3350         Reviewed by Keith Miller.
3351
3352         * wasm/js-api/test_Instance.js: Added.
3353         (EmptyModule): use the Builder, create the simplest Module possible, and create an Instance from it
3354         * wasm/js-api/test_basic_api.js:
3355         (const.c.in.constructorProperties.switch): basic tests of the API
3356
3357 2016-10-26  Mark Lam  <mark.lam@apple.com>
3358
3359         JSGenericTypedArrayView::set() should check for exceptions.
3360         https://bugs.webkit.org/show_bug.cgi?id=164007
3361         <rdar://problem/28853775>
3362
3363         Reviewed by Filip Pizlo.
3364
3365         * stress/typed-array-view-set-should-not-crash-on-exception.js: Added.
3366
3367 2016-10-25  Mark Lam  <mark.lam@apple.com>
3368
3369         String.prototype.replace() should throw an OutOfMemoryError when using too much memory.
3370         https://bugs.webkit.org/show_bug.cgi?id=163996
3371         <rdar://problem/28263117>
3372
3373         Reviewed by Geoffrey Garen.
3374
3375         * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js: Added.
3376
3377 2016-10-25  Mark Lam  <mark.lam@apple.com>
3378
3379         JSStringJoiner::joinedLength() should limit joined string lengths to INT_MAX.
3380         https://bugs.webkit.org/show_bug.cgi?id=163937
3381         <rdar://problem/28642990>
3382
3383         Reviewed by Geoffrey Garen.
3384
3385         * stress/joined-strings-should-not-exceed-max-string-length.js: Added.
3386
3387 2016-10-25  JF Bastien  <jfbastien@apple.com>
3388
3389         WebAssembly JS API: simple Module test
3390         https://bugs.webkit.org/show_bug.cgi?id=163963
3391
3392         Reviewed by Filip Pizlo.
3393
3394         * wasm/LowLevelBinary.js:
3395         (export.default.LowLevelBinary.prototype.get return): get the ArrayBuffer
3396         (export.default.LowLevelBinary.prototype.hexdump): Deleted.
3397         (export.default.LowLevelBinary.prototype._maybeGrow): Deleted.
3398         * wasm/js-api/test_Module.js: Added.
3399         (EmptyModule): The most basic module possible
3400
3401 2016-10-25  JF Bastien  <jfbastien@apple.com>
3402
3403         WebAssembly JS API: implement Module
3404
3405         This implementation allows us to:
3406          - Syncrhonously create a WebAssembly.Module with a typed array.
3407          - Creates a compilation plan.
3408          - Parse the Module and creates corresponding code.
3409          - Throw WebAssembly.CompileError with mildly helpful [*] error messages on
3410            failure.
3411
3412         Consult the API documentation for expected behavior: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymodule-constructor
3413
3414         For now the implementation discards the generated code.
3415
3416         The next steps will be:
3417          - Expose a Module's exports.
3418          - Implement WebAssembly.Instance, which allows instantiating and running a
3419            compiled Module.
3420          - Beef up the testing infrastructure under JSTests/wasm so that more complex
3421            modules can be created and tested (instead of writing the bits by hand).
3422
3423         This patch also:
3424          - Adds assert.instanceof in assert.js.
3425          - Refactors Wasm::Parser and friends to accept const uint8_t* as well as a
3426            Vector, to avoid copying when invoked synchronously.
3427          - Remove useless Structure from some of the wasm constructors: they're already
3428            on the JSGlobalObject, visited properly and all.
3429          - Fix off-by-one error in parsing: Parser::parseUInt32 failed if the integer
3430            was exactly at end of file.
3431
3432          [*] On error messages while parsing: I filed https://bugs.webkit.org/show_bug.cgi?id=163919
3433
3434         WebAssembly JS API: implement Module
3435         https://bugs.webkit.org/show_bug.cgi?id=163903
3436
3437         Reviewed by Keith Miller.
3438
3439         * wasm/assert.js: use underscore in name, and remove when exporting to avoid clasing with builtin names
3440         (const._notUndef):
3441         (const._isUndef):
3442         (const._eq):
3443         (const._ge):
3444         (const._throws):
3445         * wasm/js-api/test_basic_api.js: test the WebAssembly.Module API
3446         (const.c.in.constructorProperties.switch):
3447
3448 2016-10-25  Keith Miller  <keith_miller@apple.com>
3449
3450         Add trivial Wasm conversion opcodes
3451         https://bugs.webkit.org/show_bug.cgi?id=163950
3452
3453         Reviewed by Filip Pizlo.
3454
3455         This patch differentiates between Wasm opcodes that are trivially mapped to a B3 opcode and
3456         those that are not.  Some of the Wasm opcodes that are currently a non-simple opcode will
3457         become simple as we add B3 opcodes for Wasm operations.  The remaining opcodes will need to
3458         be added via patchpoints in a later patch.
3459
3460         * wasm/generate-wasmops-header.js:
3461         (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.Wasm.inline.bool.isSimple):
3462         * wasm/wasm.json:
3463
3464 2016-10-24  Yusuke Suzuki  <utatane.tea@gmail.com>
3465
3466         Arrow functions with concise bodies cannot return regular expressions
3467         https://bugs.webkit.org/show_bug.cgi?id=163162
3468
3469         Reviewed by Filip Pizlo.
3470
3471         * ChakraCore/test/Operators/instanceof.baseline-jsc:
3472         * ChakraCore/test/Regex/nul_character.baseline-jsc:
3473         * ChakraCore/test/es5/Lex_u3.baseline-jsc:
3474         * stress/parse-regexp-as-token.js: Added.
3475         (shouldBe):
3476
3477 2016-10-24  Keith Miller  <keith_miller@apple.com>
3478
3479         Wasm should support floating point operations.
3480         https://bugs.webkit.org/show_bug.cgi?id=163770
3481
3482         Reviewed by Michael Saboff.
3483
3484         Add appropriate b3op names for floating point wasm bytecodes, where they exist.
3485         Also, fix some WASM => Wasm in WasmOps.h generator script that I missed
3486         the first time I made the change.
3487
3488         * wasm/generate-wasmops-header.js:
3489         (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.template.typename.Int.inline.bool.isValidOpType): Deleted.
3490         (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.BinaryOpType): Deleted.
3491         (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.UnaryOpType): Deleted.
3492         (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.LoadOpType): Deleted.
3493         (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.StoreOpType): Deleted.
3494         (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.undef.CREATE_ENUM_VALUE.inline.bool.isControlOp): Deleted.
3495         * wasm/wasm.json:
3496
3497 2016-10-21  Saam Barati  <sbarati@apple.com>
3498
3499         SpeculativeJIT::compileTryGetById needs to pass in NeedsToSpill along both the cell speculation and untyped speculation path
3500         https://bugs.webkit.org/show_bug.cgi?id=163622
3501
3502         Reviewed by Yusuke Suzuki.
3503
3504         * stress/try-get-by-id-should-spill-registers-dfg.js: Added.
3505         (let.f.createBuiltin):
3506
3507 2016-10-21  Caitlin Potter  <caitp@igalia.com>
3508
3509         [JSC] don't crash when arguments to `new Function()` produce unexpected AST
3510         https://bugs.webkit.org/show_bug.cgi?id=163748
3511
3512         Reviewed by Mark Lam.
3513
3514         * stress/regress-163748.js: Added.
3515         (assert):
3516         (shouldThrowSyntaxError):
3517         (GeneratorFunction):
3518
3519 2016-10-20  Keith Miller  <keith_miller@apple.com>
3520
3521         Add support for WASM calls
3522         https://bugs.webkit.org/show_bug.cgi?id=161727
3523
3524         Reviewed by Filip Pizlo and Michael Saboff.
3525
3526         Add members of the Call category to the WASMOps special group.
3527
3528         * wasm/generate-wasmops-header.js:
3529
3530 2016-10-20  Yusuke Suzuki  <utatane.tea@gmail.com>
3531
3532         [JSC] Drop isEnvironmentRecord type info flag and use JSType information instead
3533         https://bugs.webkit.org/show_bug.cgi?id=163761
3534
3535         Reviewed by Keith Miller.
3536
3537         * modules/string-prototype-module-scope.js: Added.
3538         (shouldBe):
3539         (catch):
3540         (refer):
3541         * stress/string-prototype-scopes-global-lexical-environment-strict.js: Added.
3542         (shouldBe):
3543         (catch):
3544         * stress/string-prototype-scopes-global-lexical-environment.js: Added.
3545         (shouldBe):
3546         (catch):
3547         * stress/string-prototype-scopes-strict.js: Added.
3548         (shouldBe):
3549         (catch):
3550         (try.refer):
3551         (refer):
3552         * stress/string-prototype-scopes.js: Added.
3553         (shouldBe):
3554         (catch):
3555         (try.refer):
3556         (refer):
3557         (object.toString):
3558         (with):
3559
3560 2016-10-20  JF Bastien  <jfbastien@apple.com>
3561
3562         WebAssembly API: implement exception constructors properly
3563
3564          - Rename WebAssemblyObject to JSWebAssembly for consistency.
3565          - WebAssembly object now has its own prototype: add WebAssemblyPrototype, and
3566            use it to register JSWebAssembly's function properties through auto-generated
3567            .lut.h, instead of manually.
3568          - The error constructors used to throw (e.g. `new WebAssembly.CompileError()`).
3569          - Register WebAssembly's constructors from the global object, and hold a
3570            reference to their structure and prototype so that invoking the constructor
3571            can use the structure directly from the global object.
3572          - Add a prototype base field to global object creation. Previous ones all had
3573            Object's prototype as their base, but WebAssembly's error constructors have
3574            Error as their base.
3575          - Test for the error object's correctness.
3576          - Add missing #if ENABLE(WEBASSEMBLY)
3577
3578         WebAssembly API: implement exception constructors properly
3579         https://bugs.webkit.org/show_bug.cgi?id=163699
3580
3581         Reviewed by Keith Miller.
3582
3583         * wasm/js-api/test_basic_api.js:
3584         (const.c.in.constructorProperties): more tests
3585
3586 2016-10-20  Caitlin Potter  <caitp@igalia.com>
3587
3588         [JSC] disallow references to `await` in AsyncFunction formal parameters
3589         https://bugs.webkit.org/show_bug.cgi?id=163694
3590
3591         Reviewed by Saam Barati.
3592
3593         * stress/async-await-syntax.js:
3594
3595 2016-10-20  Keith Miller  <keith_miller@apple.com>
3596
3597         Invalid assertion in arguments elimination
3598         https://bugs.webkit.org/show_bug.cgi?id=163740
3599         <rdar://problem/27911462>
3600
3601         Reviewed by Michael Saboff.
3602
3603         * stress/direct-arguments-osr-entry.js: Added.
3604         (foo.):
3605         (foo):
3606
3607 2016-10-20  Caitlin Potter  <caitp@igalia.com>
3608
3609         [JSC] throw TypeError when constructing dynamically created JSGeneratorFunction
3610         https://bugs.webkit.org/show_bug.cgi?id=163714
3611
3612         Reviewed by Mark Lam.
3613
3614         Add missing test coverage that dynamically created
3615         JSGeneratorFunctions can not be constructed.
3616
3617         * stress/generator-function-constructor.js:
3618         (shouldThrow):
3619
3620 2016-10-19  JF Bastien  <jfbastien@apple.com>
3621
3622         JavaScript WebAssembly API: baby steps
3623
3624          - Expand WebAssembly constructors into their own files. This requires a lot of
3625            boilerplate, as well as adding the .lut.h files. All of the
3626            JSWebAssembly*.{h,cpp}, as well as Constructor and Prototype files, are
3627            currently the same between the 4 specified WebAssembly constructors. It'll be
3628            easy to implement individual functions on constructed objects as per the
3629            spec, and have each of these files diverge. The error constructors are also
3630            similar, except that their instance derives from ErrorInstance.
3631          - Use constructor macro when initializing the global object.
3632          - Dramatically improve testing of the WebAssembly API by checking for
3633            properties specified in the spec [*].
3634          - Clean up assert.js' exception testing.
3635          - Fix a copy-paste bug in wasm.json: floating-point const return values were
3636            swapped.
3637
3638         [*] https://github.com/WebAssembly/design/blob/master/JS.md
3639
3640         Implement more of the JavaScript WebAssembly API
3641         https://bugs.webkit.org/show_bug.cgi?id=163571
3642
3643         Reviewed by Keith Miller.
3644
3645         * wasm/assert.js:
3646         (export.const.isUndef): add this useful helper
3647         (export.const.throws): fold other throw checks into this one, and check message as well
3648         * wasm/js-api/test_basic_api.js:
3649         (const.checkOwnPropertyDescriptor): check own property descriptor follows the spec
3650         * wasm/self-test/test_BuilderJSON.js:
3651         (const.assertOpThrows): use new assert API
3652         (CheckedOpcodeArgumentsTooMany): ditto
3653         (CheckedOpcodeArgumentsNotEnough): ditto
3654         (CallInvalid): ditto
3655         (I32ConstInvalid): ditto
3656         (F32ConstInvalid): ditto (and this caugth the JSON copy-paste bug)
3657         (F64ConstInvalid): ditto
3658         * wasm/self-test/test_LowLevelBinary_varint.js: use new assert API
3659         * wasm/self-test/test_LowLevelBinary_varuint.js: use new assert API
3660         * wasm/utilities.js: add "global" object, used in basic API test (to access global.WebAssembly).
3661         * wasm/wasm.json: fix copy-paste
3662
3663 2016-10-19  Caitlin Potter  <caitp@igalia.com>
3664
3665         [JSC] forbid "use strict" directive in generator functions with non-simple parameters
3666         https://bugs.webkit.org/show_bug.cgi?id=163683
3667
3668         Reviewed by Geoffrey Garen.
3669
3670         Update various generator*-non-simple-param.js tests to be passing.
3671
3672         * test262.yaml:
3673
3674 2016-10-18  Mark Lam  <mark.lam@apple.com>
3675
3676         Invoking Object.prototype.__proto__ accessors directly should throw a TypeError.
3677         https://bugs.webkit.org/show_bug.cgi?id=154377
3678         <rdar://problem/27330808>
3679
3680         Reviewed by Filip Pizlo and Saam Barati.
3681
3682         * stress/object-prototype-proto-accessors-should-throw-on-undefined-this.js: Added.
3683
3684 2016-10-18  Keith Miller  <keith_miller@apple.com>
3685
3686         GetByVal to GetById conversion in the DFG is incorrect for getters with control flow
3687         https://bugs.webkit.org/show_bug.cgi?id=163629
3688
3689         Reviewed by Yusuke Suzuki.
3690
3691         * stress/get-by-val-to-id-with-getter.js: Added.
3692         (foo):
3693         (o.get hello):
3694
3695 2016-10-15  Filip Pizlo  <fpizlo@apple.com>
3696
3697         DFG and FTL should be able to use DirectCall ICs when they proved the callee or its executable
3698         https://bugs.webkit.org/show_bug.cgi?id=163371
3699
3700         Reviewed by Geoffrey Garen and Saam Barati.
3701         
3702         Add microbenchmarks for all of the cases that this patch optimizes.
3703
3704         * microbenchmarks/direct-call-arity-mismatch.js: Added.
3705         (foo):
3706         (bar):
3707         * microbenchmarks/direct-call.js: Added.
3708         (foo):
3709         (bar):
3710         * microbenchmarks/direct-construct-arity-mismatch.js: Added.
3711         (Foo):
3712         (bar):
3713         * microbenchmarks/direct-construct.js: Added.
3714         (Foo):
3715         (bar):
3716         * microbenchmarks/direct-tail-call-arity-mismatch.js: Added.
3717         (foo):
3718         (bar):
3719         * microbenchmarks/direct-tail-call-inlined-caller-arity-mismatch.js: Added.
3720         (foo):
3721         (bar):
3722         (baz):
3723         * microbenchmarks/direct-tail-call-inlined-caller.js: Added.
3724         (foo):
3725         (bar):
3726         (baz):
3727         * microbenchmarks/direct-tail-call.js: Added.
3728         (foo):
3729         (bar):
3730
3731 2016-10-18  Caitlin Potter  <caitp@igalia.com>
3732
3733         [JSC] ES6 Method functions should not have prototype
3734         https://bugs.webkit.org/show_bug.cgi?id=162530
3735
3736         Reviewed by Saam Barati.
3737
3738         Fix test262 expectations about MethodDefinitions
3739
3740         * ChakraCore/test/strict/05.arguments_sm.baseline-jsc:
3741         * stress/reflect-set.js:
3742         * test262.yaml:
3743
3744 2016-10-17  Keith Miller  <keith_miller@apple.com>
3745
3746         Add support for WASM Memory.
3747         https://bugs.webkit.org/show_bug.cgi?id=161710
3748
3749         Reviewed by Geoffrey Garen.
3750
3751         Add store and load opcodes to wasm.json. Additionally, add new
3752         enums for those opcodes in the generator.
3753
3754         * stress/wasm/generate-wasmops-header.js:
3755         (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.LoadOpType):
3756         (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.StoreOpType):
3757
3758 2016-10-17  Saam Barati  <sbarati@apple.com>
3759
3760         Add more tests for the double->String conversion in ValueAdd constant folding
3761         https://bugs.webkit.org/show_bug.cgi?id=163517
3762
3763         Reviewed by Yusuke Suzuki.
3764
3765         * microbenchmarks/string-add-constant-folding.js:
3766         (test):
3767
3768 2016-10-17  JF Bastien  <jfbastien@apple.com>
3769
3770         WebAssembly JS API: implement basic stub
3771
3772         Implement the global WebAssembly JavaScript object, and its constructor +
3773         function properties as described in:
3774           https://github.com/WebAssembly/design/blob/master/JS.md
3775
3776         These don't do anything at the moment, the parent bug will take care of adding
3777         more functionality and associated tests.
3778
3779         WebAssembly JS API: implement basic stub
3780         https://bugs.webkit.org/show_bug.cgi?id=163404
3781
3782         Reviewed by Keith Miller.
3783
3784         * wasm.yaml:
3785         * wasm/js-api/test_basic_api.js: Added.
3786         (const.f.of.functionProperties.WebAssembly.f.undefined.throw.new.Error.Couldn.const.c.of.constructorProperties.WebAssembly.c.undefined.throw.new.Error.Couldn):
3787         (const.c.of.constructorProperties.catch):
3788
3789 2016-10-17  Yusuke Suzuki  <utatane.tea@gmail.com>
3790
3791         [DOMJIT] Use DOMJIT::Patchpoint in IC
3792         https://bugs.webkit.org/show_bug.cgi?id=163223
3793
3794         Reviewed by Saam Barati.
3795
3796         * stress/domjit-exception-ic.js: Added.
3797         (shouldBe):
3798         (access):
3799         * stress/domjit-exception.js: Added.
3800         (shouldBe):
3801         (access):
3802         * stress/domjit-getter-complex-with-incorrect-object.js: Added.
3803         (shouldThrow):
3804         (access):
3805         (i.shouldThrow):
3806         * stress/domjit-getter-complex.js: Added.
3807         (shouldBe):
3808         (access):
3809         * stress/domjit-getter-try-catch-getter-as-get-by-id-register-restoration.js: Added.
3810         (assert):
3811         (bar):
3812         (foo):
3813
3814 2016-10-15  Saam Barati  <sbarati@apple.com>
3815
3816         Assertion failed under operationToLowerCase with a rope with zero length
3817         https://bugs.webkit.org/show_bug.cgi?id=163314
3818
3819         Reviewed by Mark Lam.
3820
3821         * stress/to-lower-case-intrinsic-on-empty-rope.js: Added.
3822         (assert):
3823         (returnRope.helper):
3824         (returnRope):
3825         (lower):
3826
3827 2016-10-14  Benjamin Poulain  <bpoulain@apple.com>
3828
3829         [JSC] op_negate should with any type
3830         https://bugs.webkit.org/show_bug.cgi?id=162587
3831
3832         Reviewed by Saam Barati.
3833
3834         * stress/arith-abs-to-arith-negate-range-optimizaton.js: Added.
3835         Cover OSR Exits when converting Math.abs() into ArithNegate.
3836
3837         * stress/arith-negate-on-various-types.js: Added.
3838         Cover ArithNegate with all types.
3839
3840 2016-10-14  JF Bastien  <jfbastien@apple.com>
3841
3842         Basic WebAssembly testing
3843
3844         Create a small DSL in JavaScript which can build WebAssembly binary modules based on the JSON description of the format as described in:
3845         https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md
3846
3847         This DSL can then be used to write small text description of valid and invalid WebAssembly binaries, making testing the JSC implementation much easier.
3848
3849         Details and example in README.md.
3850
3851         Basic WebAssembly testing
3852         https://bugs.webkit.org/show_bug.cgi?id=163267
3853
3854         Reviewed by Keith Miller.
3855
3856         * stress/wasm/wasm.json: Removed.
3857         * wasm.yaml: Added.
3858         * wasm/Builder.js: Added.
3859         (const._isValidValue):
3860         (const._BuildWebAssemblyBinary):
3861         (export.default.Builder):
3862         (export.default.Builder.prototype.setChecked):
3863         (export.default.Builder.prototype.setPreamble):
3864         (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
3865         (export.default.Builder.prototype._registerSectionBuilders.this.Unknown):
3866         (export.default.Builder.prototype._registerSectionBuilders):
3867         (export.default.Builder.prototype._addSection):
3868         (export.default.Builder.prototype.optimize):
3869         (export.default.Builder.prototype.json):
3870         (export.default.Builder.prototype.AsmJS):
3871         (export.default.Builder.prototype.WebAssembly):
3872         * wasm/LowLevelBinary.js: Added.
3873         (const._getterRangeCheck):
3874         (const._hexdump):
3875         (export.default.LowLevelBinary):
3876         (export.default.LowLevelBinary.prototype.newPatchable):
3877         (export.default.LowLevelBinary.prototype.hexdump):
3878         (export.default.LowLevelBinary.prototype._maybeGrow):
3879         (export.default.LowLevelBinary.prototype._push8):
3880         (export.default.LowLevelBinary.prototype.uint8):
3881         (export.default.LowLevelBinary.prototype.uint16):
3882         (export.default.LowLevelBinary.prototype.uint32):
3883         (export.default.LowLevelBinary.prototype.varuint):
3884         (export.default.LowLevelBinary.prototype.varint):
3885         (export.default.LowLevelBinary.prototype.varuint7):
3886         (export.default.LowLevelBinary.prototype.string):
3887         (export.default.LowLevelBinary.prototype.getSize):
3888         (export.default.LowLevelBinary.prototype.getUint8):
3889         (export.default.LowLevelBinary.prototype.getUint16):
3890         (export.default.LowLevelBinary.prototype.getUint32):
3891         (export.default.LowLevelBinary.prototype.getVaruint):
3892         (export.default.LowLevelBinary.prototype.getVarint):
3893         (export.default.LowLevelBinary.prototype.getVaruint7):
3894         (export.default.LowLevelBinary.prototype.getString):
3895         (PatchableLowLevelBinary):
3896         (PatchableLowLevelBinary.prototype._push8):
3897         (PatchableLowLevelBinary.prototype.apply):
3898         * wasm/README.md: Added.
3899         * wasm/WASM.js: Added.
3900         * wasm/assert.js: Added.
3901         (export.const.notUndef):
3902         (export.const.eq):
3903         (export.const.ge):
3904         (export.const.throwsError):
3905         (export.const.throwsRangeError):
3906         * wasm/generate-wasmops-header.js: Renamed from JSTests/stress/wasm/generate-wasmops-header.js.
3907         * wasm/self-test/test_BuilderJSON.js: Added.
3908         (const.assertOpThrows):
3909         (EmptyModule):
3910         (CustomMagicNumber):
3911         (CustomVersion):
3912         (CustomSection):
3913         (CustomSectionAllBytes):
3914         (CustomSectionInvalidByte):
3915         (TwoCustomSections):
3916         (EmptyCodeSection):
3917         (CodeSectionWithEmptyFunction):
3918         (CodeSectionWithEmptyFunctionWithParameters):
3919         (InvalidFunctionParameters):
3920         (SimpleFunction):
3921         (TwoSimpleFunctions):
3922         (TwoBuildersAtTheSameTime):
3923         (CheckedOpcodeArgumentsTooMany):
3924         (CheckedOpcodeArgumentsNotEnough):
3925         (CallNoArguments):
3926         (CallInvalid):
3927         (I32ConstInvalid):
3928         (F32ConstInvalid):
3929         (F64ConstInvalid):
3930         (CallManyFromStack):
3931         (OpcodeAdd):
3932         (OpcodeUnreachable):
3933         (OpcodeUnreachableCombinations):
3934         (OpcodeSelect):
3935         * wasm/self-test/test_BuilderWebAssembly.js: Added.
3936         (EmptyModule):
3937         (CustomSection):
3938         (Basic):
3939         * wasm/self-test/test_LowLevelBinary_encode.js: Added.
3940         * wasm/self-test/test_LowLevelBinary_string.js: Added.
3941         * wasm/self-test/test_LowLevelBinary_uint16.js: Added.
3942         * wasm/self-test/test_LowLevelBinary_uint32.js: Added.
3943         * wasm/self-test/test_LowLevelBinary_uint8.js: Added.
3944         * wasm/self-test/test_LowLevelBinary_varint.js: Added.
3945         * wasm/self-test/test_LowLevelBinary_varuint.js: Added.
3946         * wasm/self-test/test_LowLevelBinary_varuint7.js: Added.
3947         * wasm/self-test/test_WASM.js: Added.
3948         * wasm/test.sh: Added.
3949         * wasm/utilities.js: Added.
3950         (const._read.filename.switch):
3951         (const._load.filename.switch):
3952         (const._json.filename.switch):
3953         * wasm/wasm.json: Added.
3954
3955 2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
3956
3957         test262: @isConstructor incorrectly thinks Math.cos is a constructor
3958         https://bugs.webkit.org/show_bug.cgi?id=163437
3959
3960         Reviewed by Saam Barati.
3961
3962         * stress/is-constructor.js: Added.
3963         (assert):
3964         (prototype.assert):
3965         New test to cover the @isConstructor builtin.
3966
3967         * test262.yaml:
3968         Test now passes.
3969
3970 2016-10-14  Ryan Haddad  <ryanhaddad@apple.com>
3971
3972         Unreviewed, rolling out r207322.
3973
3974         This change caused JSC test failures
3975
3976         Reverted changeset:
3977
3978         "Fix Array.prototype.splice ES6 compliance."
3979         https://bugs.webkit.org/show_bug.cgi?id=163372
3980         http://trac.webkit.org/changeset/207322
3981
3982 2016-10-14  Mark Lam  <mark.lam@apple.com>
3983
3984         JSON.parse should not modify frozen objects.
3985         https://bugs.webkit.org/show_bug.cgi?id=163430
3986
3987         Reviewed by Saam Barati.
3988
3989         * stress/json-parse-on-frozen-object.js: Added.
3990
3991 2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
3992
3993         test262: Failure with RegExp.prototype.compile when pattern is undefined
3994         https://bugs.webkit.org/show_bug.cgi?id=163431
3995
3996         Reviewed by Yusuke Suzuki.
3997
3998         * test262.yaml:
3999
4000 2016-10-13  Joseph Pecoraro  <pecoraro@apple.com>
4001
4002         Exception message for expressions with multiple bracket accesses is inconsistent / incorrect
4003         https://bugs.webkit.org/show_bug.cgi?id=163426
4004
4005         Reviewed by Geoffrey Garen.
4006
4007         * ChakraCore/test/Error/CallNonFunction_3.baseline-jsc:
4008         * ChakraCore/test/Object/null.baseline-jsc:
4009         * stress/exception-in-to-property-key-should-be-handled-early.js:
4010         Better exception messages.
4011
4012 2016-10-13  Mark Lam  <mark.lam@apple.com>
4013
4014         Fix Array.prototype.splice ES6 compliance.
4015         https://bugs.webkit.org/show_bug.cgi?id=163372
4016
4017         Reviewed by Geoffrey Garen and Yusuke Suzuki.
4018
4019         * stress/array-splice-on-frozen-object.js: Added.
4020
4021 2016-10-12  Keith Miller  <keith_miller@apple.com>
4022
4023         Handle non-function, non-undefined comparator in Array.prototype.sort
4024         https://bugs.webkit.org/show_bug.cgi?id=163085
4025
4026         Reviewed by Yusuke Suzuki.
4027
4028         * ChakraCore/test/Array/array_sort.baseline-jsc:
4029         * stress/array-sort-bad-comparator.js: Added.
4030         (test):
4031
4032 2016-10-12  Mark Lam  <mark.lam@apple.com>
4033
4034         Array.prototype.slice should not modify frozen objects.
4035         https://bugs.webkit.org/show_bug.cgi?id=163338
4036
4037         Reviewed by Filip Pizlo.
4038
4039         * stress/array-slice-on-frozen-object.js: Added.
4040
4041 2016-10-11  Mark Lam  <mark.lam@apple.com>
4042
4043         Array.prototype.concat should not modify frozen objects.
4044         https://bugs.webkit.org/show_bug.cgi?id=163302
4045
4046         Reviewed by Filip Pizlo.
4047
4048         * stress/array-concat-on-frozen-object.js: Added.
4049
4050 2016-10-11  Saam Barati  <sbarati@apple.com>
4051
4052         ValueAdd should be constant folded if the operands are constant String,Primitive or Primitive,String
4053         https://bugs.webkit.org/show_bug.cgi?id=163182
4054
4055         Reviewed by Filip Pizlo.
4056
4057         * microbenchmarks/string-add-constant-folding.js: Added.
4058         (assert):
4059         (runTests):
4060         (add):
4061         (test):
4062
4063 2016-10-07  Mark Lam  <mark.lam@apple.com>
4064
4065         Object.freeze() and seal() should throw if [[PreventExtensions]]() fails.
4066         https://bugs.webkit.org/show_bug.cgi?id=163160
4067
4068         Reviewed by Saam Barati.
4069
4070         * stress/object-freeze-with-proxy-preventExtensions.js: Added.
4071         * stress/object-seal-with-proxy-preventExtensions.js: Added.
4072
4073 2016-10-05  Yusuke Suzuki  <utatane.tea@gmail.com>
4074
4075         [DOMJIT] Add initial CheckDOM and CallDOM implementations
4076         https://bugs.webkit.org/show_bug.cgi?id=162941
4077
4078         Reviewed by Filip Pizlo.
4079
4080         * stress/domjit-getter-poly.js: Added.
4081         (shouldBe):
4082         (access):
4083         * stress/domjit-getter-proto.js: Added.
4084         (shouldBe):
4085         (access):
4086         * stress/domjit-getter-super-poly.js: Added.
4087         (shouldBe):
4088         (access):
4089         * stress/domjit-getter.js: Added.
4090         (shouldBe):
4091         (access):
4092
4093 2016-10-04  Saam Barati  <sbarati@apple.com>
4094
4095         String.prototype.toLowerCase should be a DFG/FTL intrinsic
4096         https://bugs.webkit.org/show_bug.cgi?id=162887
4097
4098         Reviewed by Filip Pizlo and Yusuke Suzuki.
4099
4100         * microbenchmarks/to-lower-case.js: Added.
4101         (assert):
4102         (foo):
4103         (bar):
4104         * stress/to-lower-case.js: Added.
4105         (assert):
4106         (foo):
4107
4108 2016-10-04  JF Bastien  <jfbastien@apple.com>
4109
4110         WebAssembly: handle a few corner cases
4111         https://bugs.webkit.org/show_bug.cgi?id=162884
4112
4113         Reviewed by Keith Miller.
4114
4115         * stress/wasm/generate-wasmops-header.js:
4116         (const.opcodeIterator): max opcode value
4117
4118 2016-10-03  JF Bastien  <jfbastien@apple.com>
4119
4120         Auto-generate WASMOps.h, share with testing JSON file
4121         https://bugs.webkit.org/show_bug.cgi?id=162870
4122
4123         Reviewed by Keith Miller.
4124
4125         * stress/wasm/to-c++.js: Added. Generates WASMOps.h, siilar to the current one but with more data.
4126         (const.opcode_iterator):
4127         (opcode_macroizer):
4128         * stress/wasm/wasm.json: Added. Data from 0xC binary format version.
4129
4130 2016-10-03  Saam Barati  <sbarati@apple.com>
4131
4132         MapHash should speculate on the type of its child node
4133         https://bugs.webkit.org/show_bug.cgi?id=161922
4134
4135         Reviewed by Filip Pizlo.
4136
4137         * microbenchmarks/map-key-well-typed.js: Added.
4138         (assert):
4139         (intKey):
4140         (doubleKey):
4141         (objectKey):
4142         (stringKey):
4143         (booleanKey):
4144         (symbolKey):
4145         (cellKey):
4146         (assert.doubleKey):
4147         (assert.booleanKey):
4148
4149 2016-10-03  Yusuke Suzuki  <utatane.tea@gmail.com>
4150
4151         [ES6] GeneratorFunction (a.k.a. GeneratorWrapperFunction)'s prototype object does not have constructor property
4152         https://bugs.webkit.org/show_bug.cgi?id=162849
4153
4154         Reviewed by Geoffrey Garen.
4155
4156         * test262.yaml:
4157
4158 2016-10-01  Yusuke Suzuki  <utatane.tea@gmail.com>
4159
4160         [ES6] Align attributes of Generator related properties to spec
4161         https://bugs.webkit.org/show_bug.cgi?id=162839
4162
4163         Reviewed by Saam Barati.
4164
4165         * test262.yaml:
4166
4167 2016-10-01  Yusuke Suzuki  <utatane.tea@gmail.com>
4168
4169         [ES6] GeneratorFunction constructor should instantiate generator function
4170         https://bugs.webkit.org/show_bug.cgi?id=162838
4171
4172         Reviewed by Saam Barati.
4173
4174         * stress/generator-function-constructor-is-subclassible.js: Added.
4175         (shouldBe):
4176         (GeneratorFunction):
4177         (prototype.hello):
4178         * stress/generator-function-constructor.js:
4179         * test262.yaml:
4180
4181 2016-09-30  Saam Barati  <sbarati@apple.com>
4182
4183         Arrow functions should not allow duplicate parameter names
4184         https://bugs.webkit.org/show_bug.cgi?id=162741
4185
4186         Reviewed by Filip Pizlo.
4187
4188         * test262.yaml:
4189
4190 2016-09-30  Saam Barati  <sbarati@apple.com>
4191
4192         Make some microbenchmarks run for less time.
4193
4194         Rubber stamped by Filip Pizlo.
4195
4196         * microbenchmarks/bound-function-construction-performance.js:
4197         (foo):
4198         * microbenchmarks/getter-richards-try-catch.js:
4199
4200 2016-09-29  Joseph Pecoraro  <pecoraro@apple.com>
4201
4202         Arrow functions do not infer name from computed property but normal functions do
4203         https://bugs.webkit.org/show_bug.cgi?id=162720
4204
4205         Reviewed by Saam Barati.
4206
4207         * stress/inferred-names.js:
4208
4209 2016-09-29  Mark Lam  <mark.lam@apple.com>
4210
4211         Break some slow running tests into smaller bits so they don't time out.
4212         https://bugs.webkit.org/show_bug.cgi?id=162743
4213
4214         Reviewed by Keith Miller.
4215
4216         The following tests have shown to be slow running:
4217             op_div.js
4218             op_lshift.js
4219             op_mod.js
4220             op_mul.js
4221             op_rshift.js
4222             op_sub.js
4223             op_urshift
4224
4225         These tests auto-generate permutations of values to apply to binary operations.
4226         They also test the operations with 3 permutations of value types:
4227             1. VarVar - both operands variables
4228             2. VarConst - variable operand 1, constant / literal operand 2
4229             3. ConstVar - constant / literal operand 1, variable operand 2
4230
4231         We can prevent these tests from timing out by breaking each up to only run 1 of
4232         the 3 permutations of value types.
4233
4234         * stress/op_div-ConstVar.js: Added.
4235         * stress/op_div-VarConst.js: Added.
4236         * stress/op_div-VarVar.js: Copied from JSTests/stress/op_div.js.
4237         (o1.valueOf): Deleted.
4238         * stress/op_div.js: Removed.
4239         * stress/op_lshift-ConstVar.js: Added.
4240         * stress/op_lshift-VarConst.js: Added.
4241         * stress/op_lshift-VarVar.js: Copied from JSTests/stress/op_lshift.js.
4242         (o1.valueOf): Deleted.
4243         * stress/op_lshift.js: Removed.
4244         * stress/op_mod-ConstVar.js: Added.
4245         * stress/op_mod-VarConst.js: Added.
4246         * stress/op_mod-VarVar.js: Copied from JSTests/stress/op_mod.js.
4247         (o1.valueOf): Deleted.
4248         * stress/op_mod.js: Removed.
4249         * stress/op_mul-ConstVar.js: Added.
4250         * stress/op_mul-VarConst.js: Added.
4251         * stress/op_mul-VarVar.js: Copied from JSTests/stress/op_mul.js.
4252         (o1.valueOf): Deleted.
4253         * stress/op_mul.js: Removed.
4254         * stress/op_rshift-ConstVar.js: Added.
4255         * stress/op_rshift-VarConst.js: Added.
4256         * stress/op_rshift-VarVar.js: Copied from JSTests/stress/op_rshift.js.
4257         (o1.valueOf): Deleted.
4258         * stress/op_rshift.js: Removed.
4259         * stress/op_sub-ConstVar.js: Added.
4260         * stress/op_sub-VarConst.js: Added.
4261         * stress/op_sub-VarVar.js: Copied from JSTests/stress/op_sub.js.
4262         (o1.valueOf): Deleted.
4263         * stress/op_sub.js: Removed.
4264         * stress/op_urshift-ConstVar.js: Added.
4265         * stress/op_urshift-VarConst.js: Added.
4266         * stress/op_urshift-VarVar.js: Copied from JSTests/stress/op_urshift.js.
4267         (o1.valueOf): Deleted.
4268         * stress/op_urshift.js: Removed.
4269         * stress/resources/binary-op-values.js: Added.
4270         (o1.valueOf):
4271
4272 2016-09-29  Joseph Pecoraro  <pecoraro@apple.com>
4273
4274         test262: class and function names should be inferred in assignment
4275         https://bugs.webkit.org/show_bug.cgi?id=146262
4276
4277         Reviewed by Saam Barati.
4278
4279         * stress/arrowfunction-name.js: Added.
4280         Quick tests for arrow function names.
4281
4282         * stress/inferred-names.js: Added.
4283         General test for inferred function names.
4284
4285         * test262.yaml:
4286         Pass many tests checking inferred function names.
4287
4288 2016-09-29  Saam Barati  <sbarati@apple.com>
4289
4290         We don't properly propagate non-simple-parameter-list when parsing a setter
4291         https://bugs.webkit.org/show_bug.cgi?id=160483
4292
4293         Reviewed by Joseph Pecoraro.
4294
4295         * test262.yaml:
4296
4297 2016-09-28  Saam Barati  <sbarati@apple.com>
4298
4299         stringProtoFuncRepeatCharacter will return `null` when it should not
4300         https://bugs.webkit.org/show_bug.cgi?id=161944
4301
4302         Reviewed by Yusuke Suzuki.
4303
4304         * stress/pad-start-calls-repeat-character-with-double.js: Added.
4305         (logLinesWithContext):
4306
4307 2016-09-27  Filip Pizlo  <fpizlo@apple.com>
4308
4309         B3::lowerMacros forgets to before->updatePredecessorsAfter() when lowering ChillMod on ARM64
4310         https://bugs.webkit.org/show_bug.cgi?id=162644
4311
4312         Reviewed by Keith Miller.
4313
4314         * stress/chill-mod-chill-mod.js: Added.
4315         (foo):
4316
4317 2016-09-26  Csaba Osztrogonác  <oszi@inf.u-szeged.hu>
4318
4319         Skip stress/string-joining-long-strings-should-not-crash.js on memory limited devices
4320         https://bugs.webkit.org/show_bug.cgi?id=162386
4321
4322         Unreviewed, relanding r206317 after typo fix.
4323
4324         * stress/string-joining-long-strings-should-not-crash.js:
4325
4326 2016-09-24  Caitlin Potter  <caitp@igalia.com>
4327
4328         [JSTests] fix test262 expectations following r206333
4329         https://bugs.webkit.org/show_bug.cgi?id=162533
4330
4331         Reviewed by Yusuke Suzuki.
4332
4333         * test262.yaml:
4334
4335 2016-09-23  Caitlin Potter  <caitp@igalia.com>
4336
4337         [JSC] Implement parsing of Async Functions
4338         https://bugs.webkit.org/show_bug.cgi?id=161409
4339
4340         Reviewed by Yusuke Suzuki.
4341
4342         * stress/async-await-syntax.js: Added.
4343         (testSyntax):
4344         (testSyntaxError):
4345         (testTopLevelAsyncAwaitSyntaxSloppyMode.testSyntax):
4346         (testTopLevelAsyncAwaitSyntaxSloppyMode):
4347         (testTopLevelAsyncAwaitSyntaxStrictMode):
4348         (testTopLevelAsyncAwaitSyntaxStrictMode.testSyntax):
4349         (testNestedAsyncAwaitSyntax.async):
4350         (testNestedAsyncAwaitSyntax.foo):
4351         (testTopLevelAsyncAwaitSyntaxSloppyMode.testSyntaxError):
4352
4353 2016-09-23  Ryan Haddad  <ryanhaddad@apple.com>
4354
4355         Unreviewed, rolling out r206317.
4356
4357         This change caused timeouts on El Capitan Release JSC tests
4358
4359         Reverted changeset:
4360
4361         "Skip stress/string-joining-long-strings-should-not-crash.js
4362         on memory limited devices"
4363         https://bugs.webkit.org/show_bug.cgi?id=162386
4364         http://trac.webkit.org/changeset/206317
4365
4366 2016-09-23  Csaba Osztrogonác  <ossy@webkit.org>
4367
4368         Skip mozilla-tests.yaml/js1_5/Array/regress-157652 on memory limited devices
4369         https://bugs.webkit.org/show_bug.cgi?id=162381
4370
4371         Reviewed by Mark Lam.
4372
4373         * mozilla/mozilla-tests.yaml:
4374
4375 2016-09-23  Csaba Osztrogonác  <ossy@webkit.org>
4376
4377         Skip stress/string-joining-long-strings-should-not-crash.js on memory limited devices
4378         https://bugs.webkit.org/show_bug.cgi?id=162386
4379
4380         Reviewed by Mark Lam.
4381
4382         * stress/string-joining-long-strings-should-not-crash.js:
4383
4384 2016-09-22  Benjamin Poulain  <bpoulain@apple.com>
4385
4386         [JSC] Use an inline cache to generate op_negate
4387         https://bugs.webkit.org/show_bug.cgi?id=162371
4388
4389         Reviewed by Saam Barati.
4390
4391         * stress/op-negate-inline-cache.js: Added.
4392
4393 2016-09-22  Mark Lam  <mark.lam@apple.com>
4394
4395         Array.prototype.join should do overflow checks on string joins.
4396         https://bugs.webkit.org/show_bug.cgi?id=162459
4397
4398         Reviewed by Saam Barati.
4399
4400         * stress/array-join-on-strings-need-overflow-checks.js: Added.
4401         (assert):
4402         (catch):
4403
4404 2016-09-22  Joseph Pecoraro  <pecoraro@apple.com>
4405
4406         test262: Function length should be number of parameters before parameters with default values
4407         https://bugs.webkit.org/show_bug.cgi?id=162377
4408
4409         Reviewed by Saam Barati.
4410