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