Links with empty hrefs should not be drag sources
[WebKit-https.git] / JSTests / ChangeLog
1 2017-03-29  JF Bastien  <jfbastien@apple.com>
2
3         WebAssembly: add shell-only Memory mode helper
4         https://bugs.webkit.org/show_bug.cgi?id=170227
5
6         Reviewed by Mark Lam.
7
8         * wasm/assert.js: fix a prior debug thing I forgot to remove
9         * wasm/function-tests/memory-section-and-import.js: the assert
10         issue was hiding a failure in error message here
11         * wasm/js-api/element.js: the assert issue was hiding a failure in
12         error message here
13         (badInstantiation.test):
14         (badInstantiation):
15         * wasm/js-api/extension-MemoryMode.js: Added.
16         (const.validateMode.what.switch):
17         (testMemoryNoMax):
18         (testMemory):
19         (testInstanceNoMemory):
20         (testInstanceNoMax):
21         (testInstance):
22         * wasm/js-api/test_memory.js: the assert issue was hiding a
23         failure in error message here
24         (test):
25
26 2017-03-28  Keith Miller  <keith_miller@apple.com>
27
28         WebAssembly: Make WebAssembly.instantiate/compile truly asynchronous
29         https://bugs.webkit.org/show_bug.cgi?id=169187
30
31         Reviewed by Saam Barati.
32
33         * wasm/assert.js:
34         * wasm/js-api/Module-compile.js:
35         (async.testPromiseAPI):
36         * wasm/js-api/web-assembly-compile-parallel.js: Added.
37         (async.throwExn):
38         (async.test):
39         * wasm/js-api/web-assembly-instantiate-parallel.js: Added.
40         (async.test):
41         * wasm/js-api/web-assembly-instantiate.js:
42         (assert.eq.async.test):
43         (assert.eq):
44         (assert.asyncTest.async.test):
45         (assert.asyncTest):
46         (assert.truthy.async.test): Deleted.
47         (assert.truthy): Deleted.
48
49 2017-03-28  JF Bastien  <jfbastien@apple.com>
50
51         WebAssembly: implement Module imports/exports
52         https://bugs.webkit.org/show_bug.cgi?id=166982
53
54         Reviewed by Saam Barati.
55
56         * wasm/js-api/Module.exports.js: Added.
57         (assert.throws.WebAssembly.Module.prototype.exports):
58         (assert.eq):
59         * wasm/js-api/Module.imports.js: Added.
60         (assert.throws.WebAssembly.Module.prototype.imports):
61         (assert.eq):
62
63 2017-03-27  JF Bastien  <jfbastien@apple.com>
64
65         WebAssembly: misc memory testing
66         https://bugs.webkit.org/show_bug.cgi?id=170137
67
68         Reviewed by Keith Miller.
69
70         * wasm/assert.js: handle newlines in code we print out, avoid regex
71         * wasm/function-tests/memory-import-and-grow.js: Added.
72         (const.instantiate):
73         (const.test):
74         * wasm/function-tests/memory-section-and-import.js: Added.
75         (const.instantiate):
76
77 2017-03-23  Yusuke Suzuki  <utatane.tea@gmail.com>
78
79         [JSC] Use jsNontrivialString agressively for ToString(Int52)
80         https://bugs.webkit.org/show_bug.cgi?id=170002
81
82         Reviewed by Sam Weinig.
83
84         * stress/to-string-int52.js: Added.
85         (shouldBe):
86         (toString10):
87         (expected):
88
89 2017-03-23  Yusuke Suzuki  <utatane.tea@gmail.com>
90
91         [JSC][DFG] Make addShouldSpeculateAnyInt more conservative to avoid regression caused by Double <-> Int52 conversions
92         https://bugs.webkit.org/show_bug.cgi?id=169998
93
94         Reviewed by Saam Barati.
95
96         * microbenchmarks/int52-back-and-forth.js: Added.
97         (shouldBe):
98         (num):
99
100 2017-03-23  Mark Lam  <mark.lam@apple.com>
101
102         Clients of JSArray::tryCreateForInitializationPrivate() should do their own null checks.
103         https://bugs.webkit.org/show_bug.cgi?id=169783
104
105         Reviewed by Saam Barati.
106
107         * stress/regress-169783.js: Added.
108
109 2017-03-22  Yusuke Suzuki  <utatane.tea@gmail.com>
110
111         [JSC][DFG] Propagate AnyIntAsDouble information carefully to utilize it in fixup
112         https://bugs.webkit.org/show_bug.cgi?id=169914
113
114         Reviewed by Saam Barati.
115
116         * stress/any-int-as-double-add.js: Added.
117         (shouldBe):
118         (test):
119         * stress/to-this-numbers.js: Added.
120         (shouldBe):
121         (Number.prototype.toThis):
122
123 2017-03-22  Mark Lam  <mark.lam@apple.com>
124
125         Add support for Error.stackTraceLimit.
126         https://bugs.webkit.org/show_bug.cgi?id=169904
127
128         Reviewed by Saam Barati.
129
130         * stress/error-stack-trace-limit.js: Added.
131
132 2017-03-22  Yusuke Suzuki  <utatane.tea@gmail.com>
133
134         [JSC] Use jsNontrivialString for Number toString operations
135         https://bugs.webkit.org/show_bug.cgi?id=169965
136
137         Reviewed by Mark Lam.
138
139         * stress/to-string-int32.js: Added.
140         (shouldBe):
141         (toString10):
142         (expected):
143
144 2017-03-22  JF Bastien  <jfbastien@apple.com>
145
146         WebAssembly: test module namespace object for WebAssembly.Instance
147         https://bugs.webkit.org/show_bug.cgi?id=169951
148
149         Reviewed by Saam Barati.
150
151         * wasm/js-api/test_basic_api.js:
152         (const.c.in.constructorProperties.switch):
153
154 2017-03-22  JF Bastien  <jfbastien@apple.com>
155
156         WebAssembly: constructors without new don't throw
157         https://bugs.webkit.org/show_bug.cgi?id=165995
158
159         Reviewed by Saam Barati.
160
161         * wasm/js-api/test_basic_api.js:
162         (const.c.in.constructorProperties.switch):
163
164 2017-03-21  Yusuke Suzuki  <utatane.tea@gmail.com>
165
166         [JSC] Optimize Number.prototype.toString on Int32 / Int52 / Double
167         https://bugs.webkit.org/show_bug.cgi?id=167454
168
169         Reviewed by Saam Barati.
170
171         * stress/number-to-string-abstract-operation.js: Added.
172         (shouldBe):
173         (int32ToString):
174         (shouldBe.int32ToString.new.Number.int52ToString):
175         (shouldBe.int32ToString.new.Number):
176         (shouldBe.doubleToString):
177         * stress/number-to-string-radix.js: Added.
178         (shouldBe):
179         (int32ToString):
180         (shouldBe.int32ToString.new.Number.int52ToString):
181         (shouldBe.int32ToString.new.Number):
182         (shouldBe.doubleToString):
183         * stress/number-to-string.js: Added.
184         (shouldBe):
185         (int32ToString):
186         (shouldBe.int32ToString.new.Number.int52ToString):
187         (shouldBe.int32ToString.new.Number):
188         (shouldBe.doubleToString):
189
190 2017-03-19  Chris Dumez  <cdumez@apple.com>
191
192         `const location = "foo"` throws in a worker
193         https://bugs.webkit.org/show_bug.cgi?id=169839
194
195         Reviewed by Mark Lam.
196
197         * ChakraCore/test/es6/letconst_global_shadow_builtins_nonconfigurable.baseline-jsc:
198         Update expected jsc result now that we throw a SyntaxError when trying to shadow undefined
199         with a let variable. We used not to throw because the value is undefined but this was not
200         as per EcmaScript. Both Firefox and Chrome throw in this case.
201
202         * stress/global-lexical-redeclare-variable.js:
203         (catch):
204         Update test that defines a non-configurable 'zoo' property on the global object and then
205         expected shadowing it with a 'let zoo' variable to work because its value was undefined.
206         This was not as per EcmaScript spec and both Firefox and Chrome throw in this case.
207
208 2017-03-19  Yusuke Suzuki  <utatane.tea@gmail.com>
209
210         import(arg) crashes when ToString(arg) throws
211         https://bugs.webkit.org/show_bug.cgi?id=169778
212
213         Reviewed by Saam Barati.
214
215         * stress/import-reject-with-exception.js: Added.
216         (shouldBe):
217         (let.x.get toString):
218
219 2017-03-16  Filip Pizlo  <fpizlo@apple.com>
220
221         FTL should support global and eval code
222         https://bugs.webkit.org/show_bug.cgi?id=169656
223
224         Reviewed by Geoffrey Garen and Saam Barati.
225         
226         Added basic performance tests of global and eval code. These tests will run a lot faster in with
227         the FTL because of the object allocation.
228
229         * microbenchmarks/eval-code-ftl-reentry.js: Added.
230         * microbenchmarks/eval-code-ftl.js: Added.
231         * microbenchmarks/global-code-ftl.js: Added.
232         * stress/arith-log-on-various-types.js: This was a flaky fail with concurrent JIT, so I stopped running it with concurrent JIT. The failure was its assertion about how many times something gets compiled.
233
234 2017-03-16  Caio Lima  <ticaiolima@gmail.com>
235
236         [ESnext] Implement Object Spread
237         https://bugs.webkit.org/show_bug.cgi?id=167963
238
239         Reviewed by Yusuke Suzuki.
240
241         * stress/object-spread.js: Added.
242         (let.assert):
243         (assert.sameValue):
244         (let.o.get a):
245         (let.obj.get c):
246         (cthulhu.get x):
247         (let.obj.set c):
248         (calls.o.get z):
249         (calls.o.get a):
250         (try.let.obj.get foo):
251         (get calls):
252
253 2017-03-15  Yusuke Suzuki  <utatane.tea@gmail.com>
254
255         [JSC] Default parameter part should be retrieved by op_get_argument opcode instead of changing arity
256         https://bugs.webkit.org/show_bug.cgi?id=164582
257
258         Reviewed by Saam Barati.
259
260         * stress/function-with-defaults-inlining.js: Added.
261         (shouldBe):
262         (ok):
263         (a):
264         * stress/function-with-defaults-non-inlining.js: Added.
265         (shouldBe):
266         (ok):
267         (a):
268
269 2017-03-15  Yusuke Suzuki  <utatane.tea@gmail.com>
270
271         [DFG] ToString operation should have fixup for primitives to say this node does not have side effects
272         https://bugs.webkit.org/show_bug.cgi?id=169544
273
274         Reviewed by Saam Barati.
275
276         * microbenchmarks/template-string-array.js: Added.
277         (test):
278         * stress/to-string-non-cell-use.js: Added.
279         (shouldBe):
280         (shouldThrow):
281
282 2017-03-13  Commit Queue  <commit-queue@webkit.org>
283
284         Unreviewed, rolling out r213856.
285         https://bugs.webkit.org/show_bug.cgi?id=169562
286
287         Breaks JSC stress test stress/super-property-access.js.ftl-
288         eager failing (Requested by mlam|g on #webkit).
289
290         Reverted changeset:
291
292         "FTL should not flush strict arguments unless it really needs
293         to"
294         https://bugs.webkit.org/show_bug.cgi?id=169519
295         http://trac.webkit.org/changeset/213856
296
297 2017-03-11  Filip Pizlo  <fpizlo@apple.com>
298
299         FTL should not flush strict arguments unless it really needs to
300         https://bugs.webkit.org/show_bug.cgi?id=169519
301
302         Reviewed by Mark Lam.
303         
304         This benchmark runs 3.5x faster thanks to this patch.
305
306         * microbenchmarks/strict-arguments-no-escape.js: Added.
307         (foo):
308         (bar):
309         (baz):
310
311 2017-03-13  Caio Lima  <ticaiolima@gmail.com>
312
313         [JSC] It should be possible create a label named let when parsing Statement in non strict mode
314         https://bugs.webkit.org/show_bug.cgi?id=168684
315
316         Reviewed by Saam Barati.
317
318         * ChakraCore/test/LetConst/DeclOutofBlock.baseline-jsc:
319
320 2017-03-10  Saam Barati  <sbarati@apple.com>
321
322         WebAssembly: Make more demos run
323         https://bugs.webkit.org/show_bug.cgi?id=165510
324         <rdar://problem/29760310>
325
326         Reviewed by Keith Miller.
327
328         * wasm/Builder.js:
329         (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
330         * wasm/js-api/wrapper-function.js: Added.
331         (exportImport):
332         (return.new.WebAssembly.Module):
333         (assert.throws.makeInstance):
334         (assert.throws.Bar):
335         (assert.throws):
336
337 2017-03-10  Mark Lam  <mark.lam@apple.com>
338
339         JSC: BindingNode::bindValue doesn't increase the scope's reference count.
340         https://bugs.webkit.org/show_bug.cgi?id=168546
341         <rdar://problem/30589551>
342
343         Reviewed by Saam Barati.
344
345         * stress/regress-168546.js: Added.
346
347 2017-03-09  Caio Lima  <ticaiolima@gmail.com>
348
349         [ESnext] Implement Object Rest - Implementing Object Rest Destructuring
350         https://bugs.webkit.org/show_bug.cgi?id=167962
351
352         Reviewed by Keith Miller.
353
354         * stress/object-rest-deconstruct.js: Added.
355         (let.assert):
356         (let.assertPropDescriptor):
357         (catch):
358         (get 3):
359         (foo):
360         (let.src.get y):
361         (let.src.set y):
362         (let.gen):
363
364 2017-03-09  Saam Barati  <sbarati@apple.com>
365
366         WebAssembly: Make the Unity AngryBots demo run
367         https://bugs.webkit.org/show_bug.cgi?id=169268
368
369         Reviewed by Keith Miller.
370
371         * wasm/function-tests/many-arguments-to-function.js: Added.
372         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.I32Const.0.I32Const.1.I32Const.2.I32Const.3.I32Const.4.I32Const.5.I32Const.6.I32Const.7.I32Const.8.I32Const.9.I32Const.10.I32Const.11.I32Const.12.I32Const.13.I32Const.14.I32Const.15.I32Const.16.I32Const.17.Call.0.Return.End.End.foo):
373         (i.instance.exports.f0.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.Call.Return.End.End.foo):
374         (i.instance.exports.f0):
375         (instance.exports.f0.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.Call.Return.End.End.foo):
376         (instance.exports.f0):
377
378 2017-03-08  Yusuke Suzuki  <utatane.tea@gmail.com>
379
380         [GTK] JSC test stress/arity-check-ftl-throw.js.ftl-no-cjit-validate-sampling-profiler crashing on GTK bot
381         https://bugs.webkit.org/show_bug.cgi?id=160124
382
383         Reviewed by Mark Lam.
384
385         * stress/spread-forward-call-varargs-stack-overflow.js:
386
387 2017-03-06  Saam Barati  <sbarati@apple.com>
388
389         WebAssembly: Implement the WebAssembly.instantiate API
390         https://bugs.webkit.org/show_bug.cgi?id=165982
391         <rdar://problem/29760110>
392
393         Reviewed by Keith Miller.
394
395         * wasm/js-api/web-assembly-instantiate.js: Added.
396         (assert.eq.async.test):
397         (assert.eq):
398         (assert.truthy.async.test):
399         (assert.truthy):
400
401 2017-03-06  Saam Barati  <sbarati@apple.com>
402
403         Unreviewed. Fix test expected error message.
404
405         * wasm/js-api/element.js:
406         (assert.throws):
407
408 2017-03-06  Caio Lima  <ticaiolima@gmail.com>
409
410         op_get_by_id_with_this should use inline caching
411         https://bugs.webkit.org/show_bug.cgi?id=162124
412
413         Reviewed by Saam Barati.
414
415         * microbenchmarks/super-getter.js: Added.
416         (A.prototype.get f):
417         (A):
418         (B.prototype.get f):
419         (B):
420         * stress/super-force-ic-fail.js: Added.
421         (let.assert):
422         (let.aObj.get foo):
423         (let.obj.jaz):
424         (let.bObj.get foo):
425         (let.obj2.foo):
426         * stress/super-get-by-id.js: Added.
427         (assert):
428         (Base):
429         (Base.prototype.get name):
430         (Base.prototype.set name):
431         (Subclass.prototype.get name):
432         (Subclass):
433         (getterName):
434         (getterValue):
435         (PolymorphicSubclass.prototype.get value):
436         (PolymorphicSubclass):
437         (i.let.BaseCode):
438         (i.get value):
439         (MegamorphicSubclass.prototype.get value):
440         (MegamorphicSubclass):
441         (let.subObj.get value):
442         (i.catch):
443         (subObj.get value):
444         (BaseException):
445         (BaseException.prototype.get name):
446         (SubclassException.prototype.get name):
447         (SubclassException):
448         (prototype.foo):
449         (prototype.get name):
450         (SubclassExceptionComplex.prototype.get name):
451         (SubclassExceptionComplex):
452         * stress/super-getter-reset-ic.js: Added.
453         (let.assert):
454         (let.B.f):
455
456 2017-03-06  Saam Barati  <sbarati@apple.com>
457
458         WebAssembly: implement init_expr for Element
459         https://bugs.webkit.org/show_bug.cgi?id=165888
460         <rdar://problem/29760199>
461
462         Reviewed by Keith Miller.
463
464         * wasm/Builder_WebAssemblyBinary.js:
465         (const.emitters.Element):
466         * wasm/assert.js:
467         * wasm/js-api/element.js:
468         (assert.throws):
469         (badInstantiation.makeModule):
470         (badInstantiation.test):
471         (badInstantiation):
472         * wasm/js-api/global-error.js:
473
474 2017-03-06  Carlos Alberto Lopez Perez  <clopez@igalia.com>
475
476         [JSC] [Linux] Test stress/spread-forward-call-varargs-stack-overflow.js fails
477         https://bugs.webkit.org/show_bug.cgi?id=169206
478
479         Unreviewed test gardening.
480
481         * stress/spread-forward-call-varargs-stack-overflow.js: Skip on Linux platforms.
482
483 2017-03-06  Yusuke Suzuki  <utatane.tea@gmail.com>
484
485         [JSC] Allow indexed module namespace object fields
486         https://bugs.webkit.org/show_bug.cgi?id=168870
487
488         Reviewed by Saam Barati.
489
490         * wasm/spec-tests/names.wast.js:
491
492 2017-03-06  Yusuke Suzuki  <utatane.tea@gmail.com>
493
494         Null pointer crash when loading module with unresolved import also as a script file
495         https://bugs.webkit.org/show_bug.cgi?id=168971
496
497         Reviewed by Saam Barati.
498
499         * stress/re-execute-error-module.js: Added.
500         (shouldBe):
501         (async):
502         * stress/resources/error-module.js: Added.
503
504 2017-03-02  Keith Miller  <keith_miller@apple.com>
505
506         WebAssemblyFunction should have Function.prototype as its prototype
507         https://bugs.webkit.org/show_bug.cgi?id=169101
508
509         Reviewed by Filip Pizlo.
510
511         * wasm/js-api/web-assembly-function.js: Added.
512
513 2017-02-28  Oleksandr Skachkov  <gskachkov@gmail.com>
514
515         Use of arguments in arrow function is slow
516         https://bugs.webkit.org/show_bug.cgi?id=168829
517
518         Reviewed by Saam Barati.
519
520         * microbenchmarks/arrowfunciton-direct-arguments.js: Added.
521         (fn):
522         * microbenchmarks/arrowfunciton-reference-arguments.js: Added.
523         (fn):
524
525 2017-02-27  Commit Queue  <commit-queue@webkit.org>
526
527         Unreviewed, rolling out r213019.
528         https://bugs.webkit.org/show_bug.cgi?id=168925
529
530         "It broke 32-bit jsc tests in debug builds" (Requested by
531         saamyjoon on #webkit).
532
533         Reverted changeset:
534
535         "op_get_by_id_with_this should use inline caching"
536         https://bugs.webkit.org/show_bug.cgi?id=162124
537         http://trac.webkit.org/changeset/213019
538
539 2017-02-27  JF Bastien  <jfbastien@apple.com>
540
541         WebAssembly: miscellaneous spec fixes part deux
542         https://bugs.webkit.org/show_bug.cgi?id=168861
543
544         Reviewed by Keith Miller.
545
546         * wasm.yaml: more passing tests
547         * wasm/Builder.js: use a Map instead of an Object for the function
548         index space, because Number entries such as 0 were colliding with
549         string entries such as "0". This in turn requires some hashing of
550         objects which are inserted, because Map uses Object's insertion
551         order when comparing.
552         (export.default.Builder):
553         (export.default.Builder.prototype._functionIndexSpaceKeyHash):
554         (export.default.Builder.prototype._registerFunctionToIndexSpace):
555         (export.default.Builder.prototype._getFunctionFromIndexSpace):
556         * wasm/js-api/test_Instance.js: add a FIXME test
557         * wasm/spec-tests/memory.wast.js:
558         (assert_unlinkable):
559         * wasm/spec-tests/names.wast.js:
560
561 2017-02-26  Caio Lima  <ticaiolima@gmail.com>
562
563         op_get_by_id_with_this should use inline caching
564         https://bugs.webkit.org/show_bug.cgi?id=162124
565
566         Reviewed by Saam Barati.
567
568         * microbenchmarks/super-getter.js: Added.
569         (A.prototype.get f):
570         (A):
571         (B.prototype.get f):
572         (B):
573         * stress/super-force-ic-fail.js: Added.
574         (let.assert):
575         (let.aObj.get foo):
576         (let.obj.jaz):
577         (let.bObj.get foo):
578         (let.obj2.foo):
579         * stress/super-get-by-id.js: Added.
580         (assert):
581         (Base):
582         (Base.prototype.get name):
583         (Base.prototype.set name):
584         (Subclass.prototype.get name):
585         (Subclass):
586         (getterName):
587         (getterValue):
588         (PolymorphicSubclass.prototype.get value):
589         (PolymorphicSubclass):
590         (i.let.BaseCode):
591         (i.get value):
592         (MegamorphicSubclass.prototype.get value):
593         (MegamorphicSubclass):
594         (let.subObj.get value):
595         (i.catch):
596         (subObj.get value):
597         (BaseException):
598         (BaseException.prototype.get name):
599         (SubclassException.prototype.get name):
600         (SubclassException):
601         (prototype.foo):
602         (prototype.get name):
603         (SubclassExceptionComplex.prototype.get name):
604         (SubclassExceptionComplex):
605         * stress/super-getter-reset-ic.js: Added.
606         (let.assert):
607         (let.B.f):
608
609 2017-02-24  JF Bastien  <jfbastien@apple.com>
610
611         WebAssembly: miscellaneous spec fixes
612         https://bugs.webkit.org/show_bug.cgi?id=168822
613
614         Reviewed by Saam Barati.
615
616         * wasm.yaml: mark some skip tests as normal, now that they pass
617         * wasm/Builder.js: error message was wrong, causing extra error if hit
618         * wasm/js-api/global-error.js: new tests
619         (assert.throws):
620         * wasm/spec-tests/call.wast.js: comment out stack check tests
621         * wasm/spec-tests/call_indirect.wast.js: comment out stack check tests
622         * wasm/spec-tests/fac.wast.js: comment out stack check tests
623         * wasm/spec-tests/float_exprs.wast.js: wabt is wrong, bug reported, we should update
624         * wasm/spec-tests/imports.wast.js: bug in old wabt, fixed in recent wabt
625         (assert_unlinkable):
626
627 2017-02-23  Saam Barati  <sbarati@apple.com>
628
629         Intrinsicify parseInt
630         https://bugs.webkit.org/show_bug.cgi?id=168627
631
632         Reviewed by Filip Pizlo.
633
634         * stress/parse-int-intrinsic.js: Added.
635         (assert):
636         (testIntrinsic.let.s):
637         (testIntrinsic):
638         (testIntrinsic2.baz):
639         (testIntrinsic2):
640         (testIntrinsic3.foo):
641         (testIntrinsic3):
642         (testIntrinsic4.foo):
643         (testIntrinsic4):
644         (testIntrinsic5.foo):
645         (testIntrinsic5):
646         (testIntrinsic6.foo):
647         (testIntrinsic6):
648         (testIntrinsic7.foo):
649         (testIntrinsic7):
650
651 2017-02-23  JF Bastien  <jfbastien@apple.com>
652
653         WebAssembly: support 0x1 version
654         https://bugs.webkit.org/show_bug.cgi?id=168672
655
656         Reviewed by Keith Miller.
657
658         Update the version number for all the tests. Note that the spec
659         tests are only updated with a new version number because spec+wabt
660         aren't ready for 0x1 yet. This is tracked by bug #168784.
661
662         * wasm/import-spec-tests.rb: use the new spec repository layout
663         * wasm/js-api/test_basic_api.js:
664         * wasm/self-test/test_BuilderWebAssembly.js:
665         (EmptyModule):
666         (CustomSection):
667         * wasm/spec-tests/address.wast.js:
668         * wasm/spec-tests/binary.wast.js:
669         * wasm/spec-tests/block.wast.js:
670         * wasm/spec-tests/br.wast.js:
671         * wasm/spec-tests/br_if.wast.js:
672         * wasm/spec-tests/br_table.wast.js:
673         * wasm/spec-tests/break-drop.wast.js:
674         * wasm/spec-tests/call.wast.js:
675         * wasm/spec-tests/call_indirect.wast.js:
676         * wasm/spec-tests/comments.wast.js:
677         * wasm/spec-tests/conversions.wast.js:
678         * wasm/spec-tests/custom_section.wast.js:
679         * wasm/spec-tests/endianness.wast.js:
680         * wasm/spec-tests/exports.wast.js:
681         * wasm/spec-tests/f32.wast.js:
682         * wasm/spec-tests/f32_cmp.wast.js:
683         * wasm/spec-tests/f64.wast.js:
684         * wasm/spec-tests/f64_cmp.wast.js:
685         * wasm/spec-tests/fac.wast.js:
686         * wasm/spec-tests/float_exprs.wast.js:
687         * wasm/spec-tests/float_literals.wast.js:
688         * wasm/spec-tests/float_memory.wast.js:
689         * wasm/spec-tests/float_misc.wast.js:
690         * wasm/spec-tests/forward.wast.js:
691         * wasm/spec-tests/func.wast.js:
692         * wasm/spec-tests/func_ptrs.wast.js:
693         * wasm/spec-tests/get_local.wast.js:
694         * wasm/spec-tests/globals.wast.js:
695         * wasm/spec-tests/i32.wast.js:
696         * wasm/spec-tests/i64.wast.js:
697         * wasm/spec-tests/imports.wast.js:
698         * wasm/spec-tests/int_exprs.wast.js:
699         * wasm/spec-tests/int_literals.wast.js:
700         * wasm/spec-tests/left-to-right.wast.js:
701         * wasm/spec-tests/linking.wast.js:
702         * wasm/spec-tests/loop.wast.js:
703         * wasm/spec-tests/memory.wast.js:
704         * wasm/spec-tests/memory_redundancy.wast.js:
705         * wasm/spec-tests/memory_trap.wast.js:
706         * wasm/spec-tests/names.wast.js:
707         * wasm/spec-tests/nop.wast.js:
708         * wasm/spec-tests/resizing.wast.js:
709         * wasm/spec-tests/return.wast.js:
710         * wasm/spec-tests/select.wast.js:
711         * wasm/spec-tests/set_local.wast.js:
712         * wasm/spec-tests/skip-stack-guard-page.wast.js:
713         * wasm/spec-tests/stack.wast.js:
714         * wasm/spec-tests/start.wast.js:
715         * wasm/spec-tests/store_retval.wast.js:
716         * wasm/spec-tests/switch.wast.js:
717         * wasm/spec-tests/tee_local.wast.js:
718         * wasm/spec-tests/traps.wast.js:
719         * wasm/spec-tests/typecheck.wast.js:
720         * wasm/spec-tests/unreachable.wast.js:
721         * wasm/spec-tests/unwind.wast.js:
722         * wasm/wasm.json:
723
724 2017-02-22  Yusuke Suzuki  <utatane.tea@gmail.com>
725
726         JSModuleNamespace object should have IC
727         https://bugs.webkit.org/show_bug.cgi?id=160590
728
729         Reviewed by Saam Barati.
730
731         * modules/module-assert-access-binding.js: Added.
732         * modules/module-assert-access-namespace.js: Added.
733         * modules/namespace-empty.js: Added.
734         (from.string_appeared_here.access):
735         (i.shouldThrow):
736         * stress/module-namespace-access-change.js: Added.
737         (shouldBe):
738         (access):
739         (import.string_appeared_here.then):
740         * stress/module-namespace-access-non-constant.js: Added.
741         (shouldBe):
742         (import.string_appeared_here.then):
743         * stress/module-namespace-access-poly.js: Added.
744         (shouldBe):
745         (access):
746         (import.string_appeared_here.then):
747         * stress/module-namespace-access-transitive-exports.js: Added.
748         (shouldBe):
749         (import.string_appeared_here.then):
750         * stress/module-namespace-access.js: Added.
751         (shouldBe):
752         (import.string_appeared_here.then):
753         * stress/resources/module-namespace-access-transitive-exports-2.js: Added.
754         (export.cocoa):
755         (export.change):
756         * stress/resources/module-namespace-access-transitive-exports.js: Added.
757         * stress/resources/module-namespace-access.js: Added.
758         (export.cocoa):
759         (export.change):
760
761 2017-02-20  Filip Pizlo  <fpizlo@apple.com>
762
763         The collector thread should only start when the mutator doesn't have heap access
764         https://bugs.webkit.org/show_bug.cgi?id=167737
765
766         Reviewed by Keith Miller.
767         
768         Add versions of splay that flash heap access, to simulate what might happen if a third-party app
769         was running concurrent GC. In this case, we might actually start the collector thread.
770
771         * stress/splay-flash-access-1ms.js: Added.
772         (performance.now):
773         (this.Setup.setup.setup):
774         (this.TearDown.tearDown.tearDown):
775         (Benchmark):
776         (BenchmarkResult):
777         (BenchmarkResult.prototype.valueOf):
778         (BenchmarkSuite):
779         (alert):
780         (Math.random):
781         (BenchmarkSuite.ResetRNG):
782         (RunStep):
783         (BenchmarkSuite.RunSuites):
784         (BenchmarkSuite.CountBenchmarks):
785         (BenchmarkSuite.GeometricMean):
786         (BenchmarkSuite.GeometricMeanTime):
787         (BenchmarkSuite.AverageAbovePercentile):
788         (BenchmarkSuite.GeometricMeanLatency):
789         (BenchmarkSuite.FormatScore):
790         (BenchmarkSuite.prototype.NotifyStep):
791         (BenchmarkSuite.prototype.NotifyResult):
792         (BenchmarkSuite.prototype.NotifyError):
793         (BenchmarkSuite.prototype.RunSingleBenchmark):
794         (RunNextSetup):
795         (RunNextBenchmark):
796         (RunNextTearDown):
797         (BenchmarkSuite.prototype.RunStep):
798         (GeneratePayloadTree):
799         (GenerateKey):
800         (SplayUpdateStats):
801         (InsertNewNode):
802         (SplaySetup):
803         (SplayTearDown):
804         (SplayRun):
805         (SplayTree):
806         (SplayTree.prototype.isEmpty):
807         (SplayTree.prototype.insert):
808         (SplayTree.prototype.remove):
809         (SplayTree.prototype.find):
810         (SplayTree.prototype.findMax):
811         (SplayTree.prototype.findGreatestLessThan):
812         (SplayTree.prototype.exportKeys):
813         (SplayTree.prototype.splay_):
814         (SplayTree.Node):
815         (SplayTree.Node.prototype.traverse_):
816         (jscSetUp):
817         (jscTearDown):
818         (jscRun):
819         (averageAbovePercentile):
820         (printPercentile):
821         * stress/splay-flash-access.js: Added.
822         (performance.now):
823         (this.Setup.setup.setup):
824         (this.TearDown.tearDown.tearDown):
825         (Benchmark):
826         (BenchmarkResult):
827         (BenchmarkResult.prototype.valueOf):
828         (BenchmarkSuite):
829         (alert):
830         (Math.random):
831         (BenchmarkSuite.ResetRNG):
832         (RunStep):
833         (BenchmarkSuite.RunSuites):
834         (BenchmarkSuite.CountBenchmarks):
835         (BenchmarkSuite.GeometricMean):
836         (BenchmarkSuite.GeometricMeanTime):
837         (BenchmarkSuite.AverageAbovePercentile):
838         (BenchmarkSuite.GeometricMeanLatency):
839         (BenchmarkSuite.FormatScore):
840         (BenchmarkSuite.prototype.NotifyStep):
841         (BenchmarkSuite.prototype.NotifyResult):
842         (BenchmarkSuite.prototype.NotifyError):
843         (BenchmarkSuite.prototype.RunSingleBenchmark):
844         (RunNextSetup):
845         (RunNextBenchmark):
846         (RunNextTearDown):
847         (BenchmarkSuite.prototype.RunStep):
848         (GeneratePayloadTree):
849         (GenerateKey):
850         (SplayUpdateStats):
851         (InsertNewNode):
852         (SplaySetup):
853         (SplayTearDown):
854         (SplayRun):
855         (SplayTree):
856         (SplayTree.prototype.isEmpty):
857         (SplayTree.prototype.insert):
858         (SplayTree.prototype.remove):
859         (SplayTree.prototype.find):
860         (SplayTree.prototype.findMax):
861         (SplayTree.prototype.findGreatestLessThan):
862         (SplayTree.prototype.exportKeys):
863         (SplayTree.prototype.splay_):
864         (SplayTree.Node):
865         (SplayTree.Node.prototype.traverse_):
866         (jscSetUp):
867         (jscTearDown):
868         (jscRun):
869         (averageAbovePercentile):
870         (printPercentile):
871
872 2017-02-21  Ryan Haddad  <ryanhaddad@apple.com>
873
874         Unreviewed, rolling out r212712.
875
876         This change broke the CLoop build.
877
878         Reverted changeset:
879
880         "JSModuleNamespace object should have IC"
881         https://bugs.webkit.org/show_bug.cgi?id=160590
882         http://trac.webkit.org/changeset/212712
883
884 2017-02-21  Yusuke Suzuki  <utatane.tea@gmail.com>
885
886         JSModuleNamespace object should have IC
887         https://bugs.webkit.org/show_bug.cgi?id=160590
888
889         Reviewed by Saam Barati.
890
891         * modules/module-assert-access-binding.js: Added.
892         * modules/module-assert-access-namespace.js: Added.
893         * modules/namespace-empty.js: Added.
894         (from.string_appeared_here.access):
895         (i.shouldThrow):
896         * stress/module-namespace-access-change.js: Added.
897         (shouldBe):
898         (access):
899         (import.string_appeared_here.then):
900         * stress/module-namespace-access-non-constant.js: Added.
901         (shouldBe):
902         (import.string_appeared_here.then):
903         * stress/module-namespace-access-poly.js: Added.
904         (shouldBe):
905         (access):
906         (import.string_appeared_here.then):
907         * stress/module-namespace-access-transitive-exports.js: Added.
908         (shouldBe):
909         (import.string_appeared_here.then):
910         * stress/module-namespace-access.js: Added.
911         (shouldBe):
912         (import.string_appeared_here.then):
913         * stress/resources/module-namespace-access-transitive-exports-2.js: Added.
914         (export.cocoa):
915         (export.change):
916         * stress/resources/module-namespace-access-transitive-exports.js: Added.
917         * stress/resources/module-namespace-access.js: Added.
918         (export.cocoa):
919         (export.change):
920
921 2017-02-21  Yusuke Suzuki  <utatane.tea@gmail.com>
922
923         ASSERTION FAILED: "!scope.exception()" with Object.isSealed/isFrozen and uninitialized module bindings
924         https://bugs.webkit.org/show_bug.cgi?id=168605
925
926         Reviewed by Saam Barati.
927
928         * modules/module-namespace-is-frozen.js: Added.
929         (from.string_appeared_here.shouldThrow):
930         (export.b):
931         * modules/module-namespace-is-sealed.js: Added.
932         (from.string_appeared_here.shouldThrow):
933         (export.b):
934
935 2017-02-19  Commit Queue  <commit-queue@webkit.org>
936
937         Unreviewed, rolling out r212466.
938         https://bugs.webkit.org/show_bug.cgi?id=168577
939
940         causes crashes on AArch64 on linux, maybe it's causing crashes
941         on iOS too (Requested by pizlo on #webkit).
942
943         Reverted changeset:
944
945         "The collector thread should only start when the mutator
946         doesn't have heap access"
947         https://bugs.webkit.org/show_bug.cgi?id=167737
948         http://trac.webkit.org/changeset/212466
949
950 2017-02-10  Filip Pizlo  <fpizlo@apple.com>
951
952         The collector thread should only start when the mutator doesn't have heap access
953         https://bugs.webkit.org/show_bug.cgi?id=167737
954
955         Reviewed by Keith Miller.
956         
957         Add versions of splay that flash heap access, to simulate what might happen if a third-party app
958         was running concurrent GC. In this case, we might actually start the collector thread.
959
960         * stress/splay-flash-access-1ms.js: Added.
961         (performance.now):
962         (this.Setup.setup.setup):
963         (this.TearDown.tearDown.tearDown):
964         (Benchmark):
965         (BenchmarkResult):
966         (BenchmarkResult.prototype.valueOf):
967         (BenchmarkSuite):
968         (alert):
969         (Math.random):
970         (BenchmarkSuite.ResetRNG):
971         (RunStep):
972         (BenchmarkSuite.RunSuites):
973         (BenchmarkSuite.CountBenchmarks):
974         (BenchmarkSuite.GeometricMean):
975         (BenchmarkSuite.GeometricMeanTime):
976         (BenchmarkSuite.AverageAbovePercentile):
977         (BenchmarkSuite.GeometricMeanLatency):
978         (BenchmarkSuite.FormatScore):
979         (BenchmarkSuite.prototype.NotifyStep):
980         (BenchmarkSuite.prototype.NotifyResult):
981         (BenchmarkSuite.prototype.NotifyError):
982         (BenchmarkSuite.prototype.RunSingleBenchmark):
983         (RunNextSetup):
984         (RunNextBenchmark):
985         (RunNextTearDown):
986         (BenchmarkSuite.prototype.RunStep):
987         (GeneratePayloadTree):
988         (GenerateKey):
989         (SplayUpdateStats):
990         (InsertNewNode):
991         (SplaySetup):
992         (SplayTearDown):
993         (SplayRun):
994         (SplayTree):
995         (SplayTree.prototype.isEmpty):
996         (SplayTree.prototype.insert):
997         (SplayTree.prototype.remove):
998         (SplayTree.prototype.find):
999         (SplayTree.prototype.findMax):
1000         (SplayTree.prototype.findGreatestLessThan):
1001         (SplayTree.prototype.exportKeys):
1002         (SplayTree.prototype.splay_):
1003         (SplayTree.Node):
1004         (SplayTree.Node.prototype.traverse_):
1005         (jscSetUp):
1006         (jscTearDown):
1007         (jscRun):
1008         (averageAbovePercentile):
1009         (printPercentile):
1010         * stress/splay-flash-access.js: Added.
1011         (performance.now):
1012         (this.Setup.setup.setup):
1013         (this.TearDown.tearDown.tearDown):
1014         (Benchmark):
1015         (BenchmarkResult):
1016         (BenchmarkResult.prototype.valueOf):
1017         (BenchmarkSuite):
1018         (alert):
1019         (Math.random):
1020         (BenchmarkSuite.ResetRNG):
1021         (RunStep):
1022         (BenchmarkSuite.RunSuites):
1023         (BenchmarkSuite.CountBenchmarks):
1024         (BenchmarkSuite.GeometricMean):
1025         (BenchmarkSuite.GeometricMeanTime):
1026         (BenchmarkSuite.AverageAbovePercentile):
1027         (BenchmarkSuite.GeometricMeanLatency):
1028         (BenchmarkSuite.FormatScore):
1029         (BenchmarkSuite.prototype.NotifyStep):
1030         (BenchmarkSuite.prototype.NotifyResult):
1031         (BenchmarkSuite.prototype.NotifyError):
1032         (BenchmarkSuite.prototype.RunSingleBenchmark):
1033         (RunNextSetup):
1034         (RunNextBenchmark):
1035         (RunNextTearDown):
1036         (BenchmarkSuite.prototype.RunStep):
1037         (GeneratePayloadTree):
1038         (GenerateKey):
1039         (SplayUpdateStats):
1040         (InsertNewNode):
1041         (SplaySetup):
1042         (SplayTearDown):
1043         (SplayRun):
1044         (SplayTree):
1045         (SplayTree.prototype.isEmpty):
1046         (SplayTree.prototype.insert):
1047         (SplayTree.prototype.remove):
1048         (SplayTree.prototype.find):
1049         (SplayTree.prototype.findMax):
1050         (SplayTree.prototype.findGreatestLessThan):
1051         (SplayTree.prototype.exportKeys):
1052         (SplayTree.prototype.splay_):
1053         (SplayTree.Node):
1054         (SplayTree.Node.prototype.traverse_):
1055         (jscSetUp):
1056         (jscTearDown):
1057         (jscRun):
1058         (averageAbovePercentile):
1059         (printPercentile):
1060
1061 2017-02-16  Yusuke Suzuki  <utatane.tea@gmail.com>
1062
1063         [JSC] Update module namespace object according to the latest ECMA262
1064         https://bugs.webkit.org/show_bug.cgi?id=168280
1065
1066         Reviewed by Saam Barati.
1067
1068         * modules/namespace-object-symbol-iterator-name.js:
1069         * modules/namespace-object-typed-array-fast-path.js:
1070         * modules/namespace.js:
1071         (shouldBe.JSON.stringify.Reflect.getOwnPropertyDescriptor):
1072         (shouldThrow):
1073
1074 2017-02-11  Yusuke Suzuki  <utatane.tea@gmail.com>
1075
1076         [JSC] Implement (Shared)ArrayBuffer.prototype.byteLength
1077         https://bugs.webkit.org/show_bug.cgi?id=166476
1078
1079         Reviewed by Saam Barati.
1080
1081         * ChakraCore/test/typedarray/arraybufferType.baseline-jsc:
1082         * stress/array-buffer-byte-length.js: Added.
1083         (shouldBe):
1084         (shouldThrow):
1085         (Symbol):
1086         * stress/reflect-set.js:
1087
1088 2017-02-10  Saam Barati  <sbarati@apple.com>
1089
1090         Object allocation sinking phase doesn't properly handle control flow when emitting a PutHint of a materialized object into a PromotedHeapLocation of a still sunken object
1091         https://bugs.webkit.org/show_bug.cgi?id=168140
1092         <rdar://problem/30205880>
1093
1094         Reviewed by Filip Pizlo.
1095
1096         * stress/allocation-sinking-puthint-control-flow.js: Added.
1097         (e):
1098         (bar):
1099         (let.y):
1100         (else.let.y):
1101         (baz):
1102         (foo):
1103         (catch):
1104
1105 2017-02-09  Mark Lam  <mark.lam@apple.com>
1106
1107         B3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
1108         https://bugs.webkit.org/show_bug.cgi?id=167437
1109         <rdar://problem/30198083>
1110
1111         Reviewed by Filip Pizlo.
1112
1113         * stress/b3-delete-orphans-should-neutralize-upsilons-with-dead-phis.js: Added.
1114
1115 2017-02-09  Saam Barati  <sbarati@apple.com>
1116
1117         Sloppy mode: We don't properly hoist functions names "arguments" when we have a non-simple parameter list
1118         https://bugs.webkit.org/show_bug.cgi?id=167319
1119         <rdar://problem/30149432>
1120
1121         Reviewed by Mark Lam.
1122
1123         * stress/sloppy-mode-hoist-arguments-function-non-simple-parameter-list.js: Added.
1124         (assert):
1125         (assert.arguments):
1126         (assert.b):
1127         (x.arguments):
1128         (x.b):
1129         (x):
1130
1131 2017-02-09  Mark Lam  <mark.lam@apple.com>
1132
1133         Fix max length check in ArrayPrototype.js' concatSlowPath().
1134         https://bugs.webkit.org/show_bug.cgi?id=167270
1135         <rdar://problem/30128133>
1136
1137         Reviewed by Filip Pizlo.
1138
1139         * stress/array-prototype-concat-of-long-spliced-arrays.js: Added.
1140         * stress/array-prototype-concat-of-long-spliced-arrays2.js: Added.
1141
1142 2017-02-09  Keith Miller  <keith_miller@apple.com>
1143
1144         We should not allow Function.caller to be used on native functions
1145         https://bugs.webkit.org/show_bug.cgi?id=165628
1146
1147         Reviewed by Mark Lam.
1148
1149         * stress/caller-native-code.js: Added.
1150         (f):
1151
1152 2017-02-04  Yusuke Suzuki  <utatane.tea@gmail.com>
1153
1154         [JSC] Add operationToInt32SensibleSlow to optimize kraken pbkdf2 and sha256
1155         https://bugs.webkit.org/show_bug.cgi?id=167736
1156
1157         Reviewed by Saam Barati.
1158
1159         * stress/to-int32-sensible.js: Added.
1160         (shouldBe):
1161         (toInt32):
1162         (test):
1163
1164 2017-02-01  Yusuke Suzuki  <utatane.tea@gmail.com>
1165
1166         Unreviewed, remove loop
1167         https://bugs.webkit.org/show_bug.cgi?id=167694
1168
1169         It causes timeout.
1170         Original bug can be tested even without this loop.
1171
1172         * stress/arity-fixup-should-not-touch-stack-area-below-sp.js:
1173
1174 2017-02-01  Yusuke Suzuki  <utatane.tea@gmail.com>
1175
1176         ArityFixup should adjust SP first
1177         https://bugs.webkit.org/show_bug.cgi?id=167239
1178
1179         Reviewed by Michael Saboff.
1180
1181         Significantly large arity fixup reliably causes this crash.
1182
1183         * stress/arity-fixup-should-not-touch-stack-area-below-sp.js: Added.
1184
1185 2017-01-31  Filip Pizlo  <fpizlo@apple.com>
1186
1187         Move slow-running microbenchmarks out of JSTests/microbenchmarks
1188         https://bugs.webkit.org/show_bug.cgi?id=167676
1189
1190         Reviewed by Saam Barati.
1191         
1192         The microbenchmarks directory is profitable when it's cheap to run. This change moves very slow
1193         tests (>=200ms running time on my machine) and puts them in JSTests/slowMicrobenchmarks instead.
1194         That directory is run only through `slow!; defaultQuickRun` and is not run by run-jsc-benchmarks.
1195         This is a big progression in test running time. But because it frontloads more slow tests, the
1196         tests will seem to run more slowly when you first start the test runner.
1197
1198         * microbenchmarks/default-derived-constructor.js: Removed.
1199         * microbenchmarks/dense-set.js: Removed.
1200         * microbenchmarks/ftl-polymorphic-div.js: Removed.
1201         * microbenchmarks/ftl-polymorphic-mul.js: Removed.
1202         * microbenchmarks/function-bind-inlining.js: Removed.
1203         * microbenchmarks/function-bind-no-inlining.js: Removed.
1204         * microbenchmarks/large-map-iteration-with-additions.js: Removed.
1205         * microbenchmarks/large-map-iteration-with-mutation.js: Removed.
1206         * microbenchmarks/map-get-get-cse.js: Removed.
1207         * microbenchmarks/misc-bugs-847389-jpeg2000.js: Removed.
1208         * microbenchmarks/spread-small-array.js: Removed.
1209         * microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Removed.
1210         * slowMicrobenchmarks: Added.
1211         * slowMicrobenchmarks.yaml: Added.
1212         * slowMicrobenchmarks/README: Added.
1213         * slowMicrobenchmarks/default-derived-constructor.js: Copied from JSTests/microbenchmarks/default-derived-constructor.js.
1214         * slowMicrobenchmarks/dense-set.js: Copied from JSTests/microbenchmarks/dense-set.js.
1215         * slowMicrobenchmarks/ftl-polymorphic-div.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-div.js.
1216         * slowMicrobenchmarks/ftl-polymorphic-mul.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-mul.js.
1217         * slowMicrobenchmarks/function-bind-inlining.js: Copied from JSTests/microbenchmarks/function-bind-inlining.js.
1218         * slowMicrobenchmarks/function-bind-no-inlining.js: Copied from JSTests/microbenchmarks/function-bind-no-inlining.js.
1219         * slowMicrobenchmarks/large-map-iteration-with-additions.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-additions.js.
1220         * slowMicrobenchmarks/large-map-iteration-with-mutation.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-mutation.js.
1221         * slowMicrobenchmarks/map-get-get-cse.js: Copied from JSTests/microbenchmarks/map-get-get-cse.js.
1222         * slowMicrobenchmarks/misc-bugs-847389-jpeg2000.js: Copied from JSTests/microbenchmarks/misc-bugs-847389-jpeg2000.js.
1223         * slowMicrobenchmarks/spread-small-array.js: Copied from JSTests/microbenchmarks/spread-small-array.js.
1224         * slowMicrobenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Copied from JSTests/microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js.
1225
1226 2017-01-30  Yusuke Suzuki  <utatane.tea@gmail.com>
1227
1228         [JSC] Do not reject WebAssembly.compile() with Exception
1229         https://bugs.webkit.org/show_bug.cgi?id=167585
1230
1231         Reviewed by Mark Lam.
1232
1233         * wasm/js-api/Module-compile.js:
1234         (async.testPromiseAPI):
1235
1236 2017-01-27  Yusuke Suzuki  <utatane.tea@gmail.com>
1237
1238         Lift template escape sequence restrictions in tagged templates
1239         https://bugs.webkit.org/show_bug.cgi?id=166871
1240
1241         Reviewed by Saam Barati.
1242
1243         Update the error messages and add new tests.
1244
1245         * ChakraCore/test/es6/unicode_6_identifier_Blue524737.baseline-jsc:
1246         * stress/lift-template-literal.js: Added.
1247         (dump):
1248         (testTag.return.tag):
1249         (testTag):
1250         * stress/template-literal-syntax.js:
1251
1252 2017-01-26  Mark Lam  <mark.lam@apple.com>
1253
1254         Fix missing exception check in genericTypedArrayViewProtoFuncSet().
1255         https://bugs.webkit.org/show_bug.cgi?id=166812
1256         <rdar://problem/29916672>
1257
1258         Reviewed by Saam Barati.
1259
1260         * stress/regress-166812.js: Added.
1261
1262 2017-01-26  Commit Queue  <commit-queue@webkit.org>
1263
1264         Unreviewed, rolling out r211224.
1265         https://bugs.webkit.org/show_bug.cgi?id=167479
1266
1267         "It was a Kraken performance regression" (Requested by
1268         saamyjoon on #webkit).
1269
1270         Reverted changeset:
1271
1272         "OSR entry: delay outer-loop compilation when at inner-loop"
1273         https://bugs.webkit.org/show_bug.cgi?id=167149
1274         http://trac.webkit.org/changeset/211224
1275
1276 2017-01-26  JF Bastien  <jfbastien@apple.com>
1277
1278         OSR entry: delay outer-loop compilation when at inner-loop
1279         https://bugs.webkit.org/show_bug.cgi?id=167149
1280
1281         Reviewed by Filip Pizlo.
1282
1283         Try to be mean to OSR entry by using nested loops, and having
1284         non-int32 types or truly varying types.
1285
1286         Mandelbrot currently never tiers up to FTL because it exits too
1287         many times before this. That shouldn't happen because it's just
1288         numbers and int32s. I'll file a bug to fix this.
1289
1290         * microbenchmarks/mandelbrot.js: Added.
1291         (mandelbrot):
1292         (printable):
1293         * microbenchmarks/nonude.js: Added.
1294         (Array.prototype.remove):
1295         (const.u):
1296         (const.load):
1297         (const.scan):
1298         (const.main):
1299
1300 2017-01-25  Saam Barati  <sbarati@apple.com>
1301
1302         WebAssembly JS API: coerce return values from imports
1303         https://bugs.webkit.org/show_bug.cgi?id=165480
1304         <rdar://problem/29760318>
1305
1306         Reviewed by Yusuke Suzuki.
1307
1308         * wasm/function-tests/function-import-return-value.js: Added.
1309         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.x.assert.eq):
1310         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.Math.fround):
1311         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.let.type.of.Reflect.ownKeys):
1312         (test.1):
1313         (assert.truthy):
1314         (assert.throws):
1315
1316 2017-01-25  Filip Pizlo  <fpizlo@apple.com>
1317
1318         jsc.cpp should have the $.agent stuff for testing SAB
1319         https://bugs.webkit.org/show_bug.cgi?id=167431
1320
1321         Reviewed by Saam Barati.
1322         
1323         Add a very basic test of Atomics using $.agent. This is based on
1324         LayoutTests/workers/sab/simple.html.
1325
1326         * stress/lars-sab-workers.js: Added.
1327         (startWorker):
1328         (resources):
1329         (wake):
1330         (else):
1331
1332 2017-01-24  Filip Pizlo  <fpizlo@apple.com>
1333
1334         Atomics.store should return the int-converted value according to toInteger
1335         https://bugs.webkit.org/show_bug.cgi?id=167399
1336
1337         Reviewed by Saam Barati.
1338
1339         * stress/atomics-add-uint32.js: Added.
1340         * stress/atomics-store-return.js: Fix the test to match what the spec wants.
1341
1342 2017-01-24  Yusuke Suzuki  <utatane.tea@gmail.com>
1343
1344         [JSC] Optimize Number#toString with Int52
1345         https://bugs.webkit.org/show_bug.cgi?id=167303
1346
1347         Reviewed by Sam Weinig.
1348
1349         * stress/to-string-with-int52.js: Added.
1350         (shouldBe):
1351
1352 2017-01-24  Filip Pizlo  <fpizlo@apple.com>
1353
1354         Atomics.store should return the int-converted value, not the value that it stored
1355         https://bugs.webkit.org/show_bug.cgi?id=167395
1356
1357         Reviewed by Saam Barati.
1358
1359         * stress/atomics-store-return.js: Added.
1360
1361 2017-01-24  Filip Pizlo  <fpizlo@apple.com>
1362
1363         -0 is a valid array index and AtomicsObject should know this
1364         https://bugs.webkit.org/show_bug.cgi?id=167386
1365
1366         Reviewed by Mark Lam.
1367
1368         * stress/atomics-neg-zero.js: Added.
1369
1370 2017-01-23  Saam Barati  <sbarati@apple.com>
1371
1372         https://bugs.webkit.org/show_bug.cgi?id=167247
1373         JSC: operationSpreadGeneric uses the wrong global object for the builtin function and slow_path_spread consults the wrong global object to prove if the iterator protocol is unobservable
1374         <rdar://problem/30121809>
1375
1376         Reviewed by Filip Pizlo.
1377
1378         * stress/spread-consults-correct-global-object.js: Added.
1379         (assert):
1380         (spread):
1381         * stress/spread-correct-global-object-on-exception.js: Added.
1382         (assert):
1383         (spread):
1384         (const.objectText.let.o.Symbol.iterator):
1385         (catch):
1386
1387 2017-01-21  Yusuke Suzuki  <utatane.tea@gmail.com>
1388
1389         dynamic import is ambiguous with import declaration at module code
1390         https://bugs.webkit.org/show_bug.cgi?id=167098
1391
1392         Reviewed by Darin Adler.
1393
1394         * modules/import-call.js: Added.
1395         (from.string_appeared_here.import.string_appeared_here.then):
1396         * modules/import-call/main.js: Added.
1397         * stress/import-syntax.js:
1398         (async):
1399
1400 2017-01-19  Skachkov Oleksandr  <gskachkov@gmail.com>
1401
1402         "this" missing after await in async arrow function
1403         https://bugs.webkit.org/show_bug.cgi?id=166919
1404
1405         Reviewed by Saam Barati.
1406
1407         * stress/async-arrow-functions-lexical-binding-in-class.js:
1408         (ChildClass.prototype.asyncThisPropWithAwaitBody):
1409         (ChildClass.prototype.asyncThisPropInEvalWithAwaitBody):
1410         (ChildClass.prototype.asyncThisValueBodyWithAwait):
1411         (ChildClass.prototype.asyncThisValueInEvalWithAwaitBody):
1412         (ChildClass):
1413         (ChildClass3):
1414         (ChildClass3.prototype.classValue):
1415         (ChildClass3.prototype.get classProperty):
1416         * stress/async-arrow-functions-lexical-new.target-binding.js:
1417         (C2WithAwait):
1418
1419 2017-01-16  Filip Pizlo  <fpizlo@apple.com>
1420
1421         Make opaque root scanning truly constraint-based
1422         https://bugs.webkit.org/show_bug.cgi?id=165760
1423
1424         Reviewed by Geoffrey Garen.
1425         
1426         Added this test, which demonstrates the benefit of having a dedicated string subspace.
1427
1428         * microbenchmarks/stringalloc.js: Added.
1429
1430 2017-01-17  Michael Saboff  <msaboff@apple.com>
1431
1432         Nested parenthesized regular expressions with non-zero minimum counts appear to hang and use lots of memory
1433         https://bugs.webkit.org/show_bug.cgi?id=167125
1434
1435         Reviewed by Filip Pizlo.
1436
1437         * microbenchmarks/regexp-nested-nonzero-min-counted-parens.js: Added.
1438         New test with limits that run slow and take a reasonable amount of memory
1439         before the change and run fast, using little memory with the change.
1440
1441 2017-01-14  Yusuke Suzuki  <utatane.tea@gmail.com>
1442
1443         Annotate large string tests with largeHeap
1444         https://bugs.webkit.org/show_bug.cgi?id=167054
1445
1446         Reviewed by Filip Pizlo.
1447
1448         * microbenchmarks/dense-set.js:
1449         * microbenchmarks/lots-of-fields.js:
1450         * stress/joined-strings-should-not-exceed-max-string-length.js:
1451         * stress/make-large-string-jit-strcat.js:
1452         * stress/make-large-string-jit.js:
1453         * stress/make-large-string-strcat.js:
1454         * stress/make-large-string.js:
1455         * stress/string-joining-long-strings-should-not-crash.js:
1456         * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
1457
1458 2017-01-14  Yusuke Suzuki  <utatane.tea@gmail.com>
1459
1460         Reserve capacity for StringBuilder in unescape
1461         https://bugs.webkit.org/show_bug.cgi?id=167008
1462
1463         Reviewed by Sam Weinig.
1464
1465         * stress/unescape.js: Added.
1466         (shouldBe):
1467
1468 2017-01-12  Saam Barati  <sbarati@apple.com>
1469
1470         Add a slice intrinsic to the DFG/FTL
1471         https://bugs.webkit.org/show_bug.cgi?id=166707
1472         <rdar://problem/29913445>
1473
1474         Reviewed by Filip Pizlo.
1475
1476         * stress/array-slice-intrinsic.js: Added.
1477         (assert):
1478         (shallowEq):
1479         (runTest1):
1480         (runTest2):
1481         * stress/array-slice-jettison-on-constructor-change.js: Added.
1482         (assert):
1483         (runTest1):
1484         (runTest2):
1485         (addRandomProperties):
1486         (runTests):
1487         * stress/array-slice-osr-exit-2.js: Added.
1488         (assert):
1489         (Foo):
1490         (shallowEq):
1491         (runTest1):
1492         (runTest2):
1493         (addRandomProperties):
1494         (runTests):
1495         * stress/array-slice-osr-exit.js: Added.
1496         (assert):
1497         (Foo):
1498         (shallowEq):
1499         (runTest1):
1500         (runTest2):
1501         (addRandomProperties):
1502         (runTests):
1503
1504 2017-01-11  Ryan Haddad  <ryanhaddad@apple.com>
1505
1506         Mark es6/typed_arrays_correct_prototype_chains.js as failing after r210570.
1507         https://bugs.webkit.org/show_bug.cgi?id=166931i
1508
1509         Unreviewed test gardening.
1510
1511         * es6.yaml:
1512
1513 2017-01-10  Commit Queue  <commit-queue@webkit.org>
1514
1515         Unreviewed, rolling out r210052.
1516         https://bugs.webkit.org/show_bug.cgi?id=166915
1517
1518         "breaks web compatability" (Requested by keith_miller on
1519         #webkit).
1520
1521         Reverted changeset:
1522
1523         "Add support for global"
1524         https://bugs.webkit.org/show_bug.cgi?id=165171
1525         http://trac.webkit.org/changeset/210052
1526
1527 2017-01-10  Mark Lam  <mark.lam@apple.com>
1528
1529         Property setters should not be called for bound arguments list entries.
1530         https://bugs.webkit.org/show_bug.cgi?id=165631
1531
1532         Reviewed by Filip Pizlo.
1533
1534         * stress/property-setters-should-not-be-called-for-bound-arguments-list-entries.js: Added.
1535
1536 2017-01-10  Skachkov Oleksandr  <gskachkov@gmail.com>
1537
1538         Calling async arrow function which is in a class's member function will cause error
1539         https://bugs.webkit.org/show_bug.cgi?id=166879
1540
1541         Reviewed by Saam Barati.
1542
1543         * stress/async-arrow-functions-lexical-binding-in-class.js: Added.
1544         (shouldBe):
1545         (shouldBeAsync):
1546         (BaseClass.prototype.baseClassValue):
1547         (BaseClass.prototype.get property):
1548         (BaseClass):
1549         (runSomething):
1550         (ChildClass.prototype.classValue):
1551         (ChildClass.prototype.get classProperty):
1552         (ChildClass.prototype.asyncValueExp):
1553         (ChildClass.prototype.asyncValueBody):
1554         (ChildClass.prototype.asyncThisPropExp):
1555         (ChildClass.prototype.asyncThisPropBody):
1556         (ChildClass.prototype.asyncThisPropInEvalExp):
1557         (ChildClass.prototype.asyncThisPropInEvalBody):
1558         (ChildClass.prototype.asyncThisValueExp):
1559         (ChildClass.prototype.asyncThisValueBody):
1560         (ChildClass.prototype.asyncThisValueInEvalExp):
1561         (ChildClass.prototype.asyncThisValueInEvalBody):
1562         (ChildClass):
1563         (ChildClass2):
1564         (ChildClass2.prototype.classValue):
1565         (ChildClass2.prototype.get classProperty):
1566         * stress/async-arrow-functions-lexical-super-binding.js:
1567
1568 2017-01-09  Yusuke Suzuki  <utatane.tea@gmail.com>
1569
1570         [JSC] Prototype dynamic-import
1571         https://bugs.webkit.org/show_bug.cgi?id=165724
1572
1573         Reviewed by Saam Barati.
1574
1575         * stress/import-basic.js: Added.
1576         (async.async.load):
1577         (async):
1578         (catch):
1579         * stress/import-from-eval.js: Added.
1580         (async):
1581         (catch):
1582         * stress/import-syntax.js: Added.
1583         (testSyntaxError):
1584         * stress/import-tests/cocoa.js: Added.
1585         (export.Cocoa):
1586         (export.hello):
1587         * stress/import-tests/multiple.js: Added.
1588         (export.result):
1589         * stress/import-tests/multiple2.js: Added.
1590         (export.ok):
1591         * stress/import-tests/should.js: Added.
1592         (export.shouldBe):
1593         (export.shouldThrow):
1594         * stress/modules-syntax-error.js:
1595
1596 2017-01-09  Commit Queue  <commit-queue@webkit.org>
1597
1598         Unreviewed, rolling out r210476.
1599         https://bugs.webkit.org/show_bug.cgi?id=166859
1600
1601         "4% JSBench regression" (Requested by keith_mi_ on #webkit).
1602
1603         Reverted changeset:
1604
1605         "Add a slice intrinsic to the DFG/FTL"
1606         https://bugs.webkit.org/show_bug.cgi?id=166707
1607         http://trac.webkit.org/changeset/210476
1608
1609 2017-01-06  Saam Barati  <sbarati@apple.com>
1610
1611         Add a slice intrinsic to the DFG/FTL
1612         https://bugs.webkit.org/show_bug.cgi?id=166707
1613
1614         Reviewed by Filip Pizlo.
1615
1616         * stress/array-slice-intrinsic.js: Added.
1617         (assert):
1618         (shallowEq):
1619         (runTest1):
1620         (runTest2):
1621         * stress/array-slice-jettison-on-constructor-change.js: Added.
1622         (assert):
1623         (runTest1):
1624         (runTest2):
1625         (addRandomProperties):
1626         (runTests):
1627         * stress/array-slice-osr-exit-2.js: Added.
1628         (assert):
1629         (Foo):
1630         (shallowEq):
1631         (runTest1):
1632         (runTest2):
1633         (addRandomProperties):
1634         (runTests):
1635         * stress/array-slice-osr-exit.js: Added.
1636         (assert):
1637         (Foo):
1638         (shallowEq):
1639         (runTest1):
1640         (runTest2):
1641         (addRandomProperties):
1642         (runTests):
1643
1644 2017-01-06  Michael Saboff  <msaboff@apple.com>
1645
1646         @putByValDirect in Array.of and Array.from overwrites non-writable/configurable properties
1647         https://bugs.webkit.org/show_bug.cgi?id=153486
1648
1649         Reviewed by Saam Barati.
1650
1651         New regression test.
1652
1653         * stress/regress-153486.js: Added.
1654         (shouldEqual):
1655         (makeUnwriteableUnconfigurableObject):
1656         (testArrayOf):
1657         (testArrayFrom):
1658         (runTest):
1659
1660 2016-12-30  Filip Pizlo  <fpizlo@apple.com>
1661
1662         DeferGC::~DeferGC should be super cheap
1663         https://bugs.webkit.org/show_bug.cgi?id=166626
1664
1665         Reviewed by Saam Barati.
1666
1667         * stress/slow-path-generator-updating-current-node-dfg.js:
1668         * stress/unshift-array-storage.js:
1669
1670 2017-01-04  JF Bastien  <jfbastien@apple.com>
1671
1672         WebAssembly: sections with the same name are allowed
1673         https://bugs.webkit.org/show_bug.cgi?id=166708
1674
1675         Reviewed by Saam Barati.
1676
1677         * wasm/self-test/test_BuilderJSON.js:
1678         (SectionsWithSameCustomName):
1679
1680 2017-01-04  Saam Barati  <sbarati@apple.com>
1681
1682         stress/spread-calling.js timing out on the bots
1683         https://bugs.webkit.org/show_bug.cgi?id=166689
1684         <rdar://problem/29779182>
1685
1686         Reviewed by Mark Lam.
1687
1688         * stress/spread-calling.js:
1689
1690 2017-01-04  JF Bastien  <jfbastien@apple.com>
1691
1692         WebAssembly JS API: add Module.sections
1693         https://bugs.webkit.org/show_bug.cgi?id=165159
1694         <rdar://problem/29760326>
1695
1696         Reviewed by Mark Lam.
1697
1698         As described here: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymodulecustomsections
1699
1700         * wasm/Builder.js: allow custom sections to be duplicated
1701         * wasm/js-api/Module.customSection.js: Added.
1702         (assert.throws.WebAssembly.Module.prototype.customSections):
1703         (assert.eq):
1704
1705 2017-01-04  Saam Barati  <sbarati@apple.com>
1706
1707         We don't properly handle exceptions inside the nativeCallTrampoline macro in the LLInt
1708         https://bugs.webkit.org/show_bug.cgi?id=163720
1709
1710         Reviewed by Mark Lam.
1711
1712         * stress/bound-function-tail-call-with-exception.js: Added.
1713         (bar):
1714         (foo):
1715         (catch):
1716
1717 2017-01-03  JF Bastien  <jfbastien@apple.com>
1718
1719         WebAssembly JS API: check and test in-call / out-call values
1720         https://bugs.webkit.org/show_bug.cgi?id=164876
1721         <rdar://problem/29844107>
1722
1723         Reviewed by Saam Barati.
1724
1725         * wasm.yaml:
1726         * wasm/assert.js: add an assert for NaN comparison
1727         * wasm/fuzz/export-function.js: Added. Generate random wasm export
1728         signatures, and call them with random parameters.
1729         (const.paramExporter):
1730         (const.setBuffer):
1731         (const.types.generate):
1732         (generate):
1733         * wasm/js-api/export-arity.js: Added.
1734         (const.paramExporter): Test that mismatched arities when JS calls
1735         wasm follow the defined semantics: i32 is 0, f32 / f64 are NaN.
1736         https://github.com/WebAssembly/design/blob/master/JS.md#exported-function-exotic-objects
1737         * wasm/js-api/export-void-is-undef.js: Added. Test that "void"
1738         wasm functions return "undefined" in JS.
1739
1740 2017-01-02  JF Bastien  <jfbastien@apple.com>
1741
1742         WebAssembly: handle and optimize wasm export → wasm import calls
1743         https://bugs.webkit.org/show_bug.cgi?id=165282
1744
1745         Reviewed by Saam Barati.
1746
1747         * wasm/Builder.js: Add a Proxy to Builder.js, which intercepts
1748         unknown property lookups. This creates way better error messages
1749         on typos than 'undefined is not a function', which happens
1750         semi-frequently as I typo opcode names (and which one is a typo is
1751         hard to find because we chain builders).
1752         (const._isValidValue):
1753         (get target):
1754         (const._importFunctionContinuation):
1755         (const._importMemoryContinuation):
1756         (const._importTableContinuation):
1757         (const._exportFunctionContinuation):
1758         (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
1759         (export.default.Builder.prototype._registerSectionBuilders.this.Unknown):
1760         * wasm/LowLevelBinary.js: Add limited support for var{u}int64 (only the 32-bit values)
1761         (export.default.LowLevelBinary.prototype.varint32):
1762         (export.default.LowLevelBinary.prototype.varuint64):
1763         (export.default.LowLevelBinary.prototype.varint64):
1764         * wasm/function-tests/exceptions.js: update error message
1765         * wasm/function-tests/trap-load.js: update error message
1766         * wasm/function-tests/trap-store.js: update error message
1767         * wasm/js-api/wasm-to-wasm-bad-signature.js: Added. Test a bunch of bad wasm->wasm import signatures
1768         (const.makeImportee.signature.switch):
1769         (BadSignatureDropStartParams):
1770         * wasm/js-api/wasm-to-wasm.js: Added. Test 64-bit wasm->wasm import calls
1771         (const.callerModule):
1772         (const.calleeModule):
1773         (WasmToWasm):
1774
1775 2017-01-02  Saam Barati  <sbarati@apple.com>
1776
1777         WebAssembly: Some loads don't take into account the offset
1778         https://bugs.webkit.org/show_bug.cgi?id=166616
1779         <rdar://problem/29841541>
1780
1781         Reviewed by Keith Miller.
1782
1783         * wasm/function-tests/load-offset.js: Added.
1784
1785 2016-12-29  Saam Barati  <sbarati@apple.com>
1786
1787         WebAssembly: Rebase spec-tests now that wabt has been updated to produce certain kinds of invalid modules
1788         https://bugs.webkit.org/show_bug.cgi?id=166491
1789         <rdar://problem/29814999>
1790
1791         Reviewed by Yusuke Suzuki.
1792
1793         Based off these revisions:
1794         - spec: b055d01ea1dfdd7a5231ae779095435f836de97f
1795         - wabt: d0d44702c753f851b094615298a2f4d4e3c21035
1796
1797         The reason for the rebase is that wabt was updated to stop
1798         silently rejecting invalid modules. This was needed because
1799         some of the spec tests check to make sure that the module
1800         is invalid, but wabt was silently ignoring the errors and
1801         generating valid modules:
1802         https://github.com/WebAssembly/wabt/issues/256
1803
1804         * wasm.yaml:
1805         * wasm/spec-tests/address.wast.js:
1806         * wasm/spec-tests/binary.wast.js:
1807         * wasm/spec-tests/block.wast.js:
1808         * wasm/spec-tests/br.wast.js:
1809         * wasm/spec-tests/br_if.wast.js:
1810         * wasm/spec-tests/br_table.wast.js:
1811         * wasm/spec-tests/break-drop.wast.js:
1812         * wasm/spec-tests/call.wast.js:
1813         * wasm/spec-tests/call_indirect.wast.js:
1814         * wasm/spec-tests/comments.wast.js:
1815         * wasm/spec-tests/conversions.wast.js:
1816         * wasm/spec-tests/custom_section.wast.js:
1817         * wasm/spec-tests/endianness.wast.js:
1818         * wasm/spec-tests/exports.wast.js:
1819         * wasm/spec-tests/f32.wast.js:
1820         * wasm/spec-tests/f32_cmp.wast.js:
1821         * wasm/spec-tests/f64.wast.js:
1822         * wasm/spec-tests/f64_cmp.wast.js:
1823         * wasm/spec-tests/fac.wast.js:
1824         * wasm/spec-tests/float_exprs.wast.js:
1825         * wasm/spec-tests/float_literals.wast.js:
1826         * wasm/spec-tests/float_memory.wast.js:
1827         * wasm/spec-tests/float_misc.wast.js:
1828         * wasm/spec-tests/forward.wast.js:
1829         * wasm/spec-tests/func.wast.js:
1830         * wasm/spec-tests/func_ptrs.wast.js:
1831         * wasm/spec-tests/get_local.wast.js:
1832         * wasm/spec-tests/globals.wast.js:
1833         * wasm/spec-tests/i32.wast.js:
1834         * wasm/spec-tests/i64.wast.js:
1835         * wasm/spec-tests/imports.wast.js:
1836         * wasm/spec-tests/int_exprs.wast.js:
1837         * wasm/spec-tests/int_literals.wast.js:
1838         * wasm/spec-tests/left-to-right.wast.js:
1839         * wasm/spec-tests/linking.wast.js:
1840         * wasm/spec-tests/loop.wast.js:
1841         * wasm/spec-tests/memory.wast.js:
1842         * wasm/spec-tests/memory_redundancy.wast.js:
1843         * wasm/spec-tests/memory_trap.wast.js:
1844         * wasm/spec-tests/names.wast.js:
1845         * wasm/spec-tests/nop.wast.js:
1846         * wasm/spec-tests/resizing.wast.js:
1847         * wasm/spec-tests/return.wast.js:
1848         * wasm/spec-tests/select.wast.js:
1849         * wasm/spec-tests/set_local.wast.js:
1850         * wasm/spec-tests/skip-stack-guard-page.wast.js:
1851         * wasm/spec-tests/stack.wast.js:
1852         * wasm/spec-tests/start.wast.js:
1853         * wasm/spec-tests/store_retval.wast.js:
1854         * wasm/spec-tests/switch.wast.js:
1855         * wasm/spec-tests/tee_local.wast.js:
1856         * wasm/spec-tests/traps.wast.js:
1857         * wasm/spec-tests/typecheck.wast.js:
1858         * wasm/spec-tests/unreachable.wast.js:
1859         * wasm/spec-tests/unwind.wast.js:
1860
1861 2016-12-28  Saam Barati  <sbarati@apple.com>
1862
1863         WebAssembly: Don't allow duplicate export names
1864         https://bugs.webkit.org/show_bug.cgi?id=166490
1865         <rdar://problem/29815000>
1866
1867         Reviewed by Keith Miller.
1868
1869         * wasm.yaml:
1870         * wasm/function-tests/invalid-duplicate-export.js: Added.
1871
1872 2016-12-28  Saam Barati  <sbarati@apple.com>
1873
1874         WebAssembly: Implement grow_memory and current_memory
1875         https://bugs.webkit.org/show_bug.cgi?id=166448
1876         <rdar://problem/29803676>
1877
1878         Reviewed by Keith Miller.
1879
1880         I rewrote some of the testWasmModuleFunctions that used Memory to use
1881         the JS API since the jsc.cpp version can no longer use memory.
1882
1883         * wasm.yaml:
1884         * wasm/function-tests/add-12.js:
1885         (testWasmModuleFunctions):
1886         * wasm/function-tests/br-if-loop-less-than.js:
1887         (testWasmModuleFunctions):
1888         * wasm/function-tests/brTableAsIf.js:
1889         (testWasmModuleFunctions):
1890         * wasm/function-tests/brTableManyValues.js:
1891         (testWasmModuleFunctions):
1892         * wasm/function-tests/brTableWithLoop.js:
1893         (testWasmModuleFunctions):
1894         * wasm/function-tests/dumb-eq-if-then-else.js:
1895         * wasm/function-tests/eqz.js:
1896         * wasm/function-tests/grow-memory-2.js: Added.
1897         (const.func):
1898         (assert.eq.instance.exports.foo):
1899         * wasm/function-tests/grow-memory-3.js: Added.
1900         * wasm/function-tests/grow-memory-4.js: Added.
1901         (const.func):
1902         * wasm/function-tests/grow-memory.js: Added.
1903         (binaryShouldNotParse):
1904         (assert.truthy):
1905         (assert.eq):
1906         (memory.grow):
1907         * wasm/function-tests/i32-load.js:
1908         (testWasmModuleFunctions):
1909         * wasm/function-tests/i32-load8-s.js:
1910         * wasm/function-tests/max.js:
1911         * wasm/function-tests/min.js:
1912         * wasm/js-api/memory-grow.js: Added.
1913         (i.i):
1914         (assertEq):
1915         * wasm/js-api/test_memory.js:
1916         * wasm/wasm.json:
1917
1918 2016-12-25  Yusuke Suzuki  <utatane.tea@gmail.com>
1919
1920         Propagate the source origin as much as possible
1921         https://bugs.webkit.org/show_bug.cgi?id=166348
1922
1923         Reviewed by Darin Adler.
1924
1925         * stress/source-origin.js: Added.
1926         (shouldBe):
1927
1928 2016-12-24  Caio Lima  <ticaiolima@gmail.com>
1929
1930         [test262] Fixing mapped arguments object property test case
1931         https://bugs.webkit.org/show_bug.cgi?id=159398
1932
1933         Reviewed by Saam Barati.
1934
1935         * stress/arguments-bizarre-behaviour-disable-enumerability.js:
1936         * stress/arguments-define-property.js: Added.
1937         (assert):
1938         (testProperties):
1939         * stress/arguments-non-configurable.js: Added.
1940         (assert):
1941         (tryChangeNonConfigurableDescriptor):
1942         (set tryChangeNonConfigurableDescriptor):
1943         (tryChangeWritableOfNonConfigurableDescriptor):
1944         * test262.yaml:
1945
1946 016-12-20  Caio Lima  <ticaiolima@gmail.com>
1947
1948         [test262] Fixing mapped arguments object property test case
1949         https://bugs.webkit.org/show_bug.cgi?id=159398
1950
1951         Reviewed by .
1952
1953         * stress/arguments-bizarre-behaviour-disable-enumerability.js:
1954         * stress/arguments-define-property.js: Added.
1955         (assert):
1956         (testProperties):
1957         * stress/arguments-non-configurable.js: Added.
1958         (assert):
1959         (tryChangeNonConfigurableDescriptor):
1960         (set tryChangeNonConfigurableDescriptor):
1961         (tryChangeWritableOfNonConfigurableDescriptor):
1962         * test262.yaml:
1963
1964 2016-12-23  Keith Miller  <keith_miller@apple.com>
1965
1966         WebAssembly: trap on bad division.
1967         https://bugs.webkit.org/show_bug.cgi?id=164786
1968
1969         Reviewed by Mark Lam.
1970
1971         Also, mark conversions as passing.
1972
1973         * wasm.yaml:
1974         * wasm/wasm.json:
1975
1976 2016-12-22  Keith Miller  <keith_miller@apple.com>
1977
1978         WebAssembly: Make spec-tests/f32.wast.js and spec-tests/f64.wast.js pass
1979         https://bugs.webkit.org/show_bug.cgi?id=166447
1980
1981         Reviewed by Saam Barati.
1982
1983         * wasm.yaml:
1984         * wasm/wasm.json:
1985
1986 2016-12-22  Saam Barati  <sbarati@apple.com>
1987
1988         WebAssembly: Make calling Wasm functions that returns or takes an i64 as a parameter an early exception
1989         https://bugs.webkit.org/show_bug.cgi?id=166437
1990         <rdar://problem/29793949>
1991
1992         Reviewed by Keith Miller.
1993
1994         * wasm.yaml:
1995         * wasm/function-tests/i64-from-js-exceptions.js: Added.
1996         (const.imp.import.sideEffects):
1997         (assert.throws.instance.exports.foo.valueOf):
1998
1999 2016-12-22  Mark Lam  <mark.lam@apple.com>
2000
2001         De-duplicate finally blocks.
2002         https://bugs.webkit.org/show_bug.cgi?id=160168
2003
2004         Reviewed by Saam Barati.
2005
2006         Re-landing r209952 with a few new tests added in test-finally.js.
2007
2008         * stress/deeply-nested-finallys.js: Copied from JSTests/stress/deeply-nested-finallys.js.
2009         - Tests many levels of finally nesting.  This causes the old code to hang (and
2010           crashes eventually) while trying to generate bytecode for the exponentially
2011           duplicated finally blocks.  The new code completes this test almost instantly.
2012
2013         * stress/test-finally.js: Copied from JSTests/stress/test-finally.js.
2014         - Tests control flow through various permutations of finally blocks.
2015
2016 2016-12-22  Saam Barati  <sbarati@apple.com>
2017
2018         WebAssembly: Make the spec-tests/address.wast.js test pass
2019         https://bugs.webkit.org/show_bug.cgi?id=166429
2020         <rdar://problem/29793220>
2021
2022         Reviewed by Keith Miller.
2023
2024         * wasm.yaml:
2025
2026 2016-12-22  Keith Miller  <keith_miller@apple.com>
2027
2028         WebAssembly: The validator should not allow unused stack entries at the end of a block
2029         https://bugs.webkit.org/show_bug.cgi?id=166411
2030
2031         Reviewed by Saam Barati.
2032
2033         Test cleanup and enable new passing tests.
2034
2035         * wasm.yaml:
2036         * wasm/function-tests/br-if-as-return.js:
2037
2038 2016-12-22  Saam Barati  <sbarati@apple.com>
2039
2040         WebAssembly: Make the spec-tests/start.wast.js test pass
2041         https://bugs.webkit.org/show_bug.cgi?id=166416
2042         <rdar://problem/29784532>
2043
2044         Reviewed by Yusuke Suzuki.
2045
2046         * wasm.yaml:
2047
2048 2016-12-21  Keith Miller  <keith_miller@apple.com>
2049
2050         WebAssembly: Fix decode floating point constants in unreachable code
2051         https://bugs.webkit.org/show_bug.cgi?id=166400
2052
2053         Reviewed by Saam Barati.
2054
2055         * wasm.yaml:
2056
2057 2016-12-21  Keith Miller  <keith_miller@apple.com>
2058
2059         WebAssembly: Allow br, br_if, and br_table to act as a return
2060         https://bugs.webkit.org/show_bug.cgi?id=166393
2061
2062         Reviewed by Saam Barati.
2063
2064         Add tests for breaks acting as returns and fix tests that
2065         validate error messages.
2066
2067         * wasm/function-tests/br-as-return.js: Added.
2068         * wasm/function-tests/br-if-as-return.js: Added.
2069         * wasm/function-tests/br-table-as-return.js: Added.
2070         * wasm/function-tests/if-no-else-non-void.js:
2071         * wasm/function-tests/struct.js: Added.
2072         * wasm/js-api/global-error.js:
2073         (assert.throws):
2074         * wasm/js-api/table.js:
2075         (assert.throws):
2076
2077 2016-12-21  Saam Barati  <sbarati@apple.com>
2078
2079         WebAssembly: Import spec tests
2080         https://bugs.webkit.org/show_bug.cgi?id=166395
2081
2082         Rubber stamped by Keith Miller.
2083
2084         This patch implements the Wasm spec's tests found here:
2085         https://github.com/WebAssembly/spec/tree/master/interpreter/test
2086         
2087         These tests are in .wast s-epxression format. To convert
2088         them to JS, I use a script from the wabt library, found here:
2089         https://github.com/WebAssembly/wabt/blob/master/test/run-gen-spec-js.py
2090         
2091         I also added a script that automatically imports the tests as
2092         JS files. The inputs to the script is the path to the Wasm spec
2093         git repo and the path to the wabt git repo. This will make importing
2094         new tests easy in the future.
2095
2096         The wasm spec imported is at commit: b055d01ea1dfdd7a5231ae779095435f836de97f
2097         The wabt used to do the import is at commit: 622b42dced6d793e9d49e9b1fd1d1524defd1387
2098
2099         * wasm.yaml:
2100         * wasm/import-spec-tests.rb: Added.
2101         * wasm/spec-tests: Added.
2102         * wasm/spec-tests/address.wast.js: Added.
2103         (register):
2104         (module):
2105         (instance):
2106         (assert_malformed):
2107         (assert_invalid):
2108         (assert_soft_invalid):
2109         (assert_unlinkable):
2110         (assert_uninstantiable):
2111         (assert_trap):
2112         (assert_return):
2113         (assert_return_nan):
2114         * wasm/spec-tests/binary.wast.js: Added.
2115         (register):
2116         (module):
2117         (instance):
2118         (assert_malformed):
2119         (assert_invalid):
2120         (assert_soft_invalid):
2121         (assert_unlinkable):
2122         (assert_uninstantiable):
2123         (assert_trap):
2124         (assert_return):
2125         (assert_return_nan):
2126         * wasm/spec-tests/block.wast.js: Added.
2127         (register):
2128         (module):
2129         (instance):
2130         (assert_malformed):
2131         (assert_invalid):
2132         (assert_soft_invalid):
2133         (assert_unlinkable):
2134         (assert_uninstantiable):
2135         (assert_trap):
2136         (assert_return):
2137         (assert_return_nan):
2138         * wasm/spec-tests/br.wast.js: Added.
2139         (register):
2140         (module):
2141         (instance):
2142         (assert_malformed):
2143         (assert_invalid):
2144         (assert_soft_invalid):
2145         (assert_unlinkable):
2146         (assert_uninstantiable):
2147         (assert_trap):
2148         (assert_return):
2149         (assert_return_nan):
2150         * wasm/spec-tests/br_if.wast.js: Added.
2151         (register):
2152         (module):
2153         (instance):
2154         (assert_malformed):
2155         (assert_invalid):
2156         (assert_soft_invalid):
2157         (assert_unlinkable):
2158         (assert_uninstantiable):
2159         (assert_trap):
2160         (assert_return):
2161         (assert_return_nan):
2162         * wasm/spec-tests/br_table.wast.js: Added.
2163         (register):
2164         (module):
2165         (instance):
2166         (assert_malformed):
2167         (assert_invalid):
2168         (assert_soft_invalid):
2169         (assert_unlinkable):
2170         (assert_uninstantiable):
2171         (assert_trap):
2172         (assert_return):
2173         (assert_return_nan):
2174         * wasm/spec-tests/break-drop.wast.js: Added.
2175         (register):
2176         (module):
2177         (instance):
2178         (assert_malformed):
2179         (assert_invalid):
2180         (assert_soft_invalid):
2181         (assert_unlinkable):
2182         (assert_uninstantiable):
2183         (assert_trap):
2184         (assert_return):
2185         (assert_return_nan):
2186         * wasm/spec-tests/call.wast.js: Added.
2187         (register):
2188         (module):
2189         (instance):
2190         (assert_malformed):
2191         (assert_invalid):
2192         (assert_soft_invalid):
2193         (assert_unlinkable):
2194         (assert_uninstantiable):
2195         (assert_trap):
2196         (assert_return):
2197         (assert_return_nan):
2198         * wasm/spec-tests/call_indirect.wast.js: Added.
2199         (register):
2200         (module):
2201         (instance):
2202         (assert_malformed):
2203         (assert_invalid):
2204         (assert_soft_invalid):
2205         (assert_unlinkable):
2206         (assert_uninstantiable):
2207         (assert_trap):
2208         (assert_return):
2209         (assert_return_nan):
2210         * wasm/spec-tests/comments.wast.js: Added.
2211         (register):
2212         (module):
2213         (instance):
2214         (assert_malformed):
2215         (assert_invalid):
2216         (assert_soft_invalid):
2217         (assert_unlinkable):
2218         (assert_uninstantiable):
2219         (assert_trap):
2220         (assert_return):
2221         (assert_return_nan):
2222         * wasm/spec-tests/conversions.wast.js: Added.
2223         (register):
2224         (module):
2225         (instance):
2226         (assert_malformed):
2227         (assert_invalid):
2228         (assert_soft_invalid):
2229         (assert_unlinkable):
2230         (assert_uninstantiable):
2231         (assert_trap):
2232         (assert_return):
2233         (assert_return_nan):
2234         * wasm/spec-tests/custom_section.wast.js: Added.
2235         (register):
2236         (module):
2237         (instance):
2238         (assert_malformed):
2239         (assert_invalid):
2240         (assert_soft_invalid):
2241         (assert_unlinkable):
2242         (assert_uninstantiable):
2243         (assert_trap):
2244         (assert_return):
2245         (assert_return_nan):
2246         * wasm/spec-tests/endianness.wast.js: Added.
2247         (register):
2248         (module):
2249         (instance):
2250         (assert_malformed):
2251         (assert_invalid):
2252         (assert_soft_invalid):
2253         (assert_unlinkable):
2254         (assert_uninstantiable):
2255         (assert_trap):
2256         (assert_return):
2257         (assert_return_nan):
2258         * wasm/spec-tests/exports.wast.js: Added.
2259         (register):
2260         (module):
2261         (instance):
2262         (assert_malformed):
2263         (assert_invalid):
2264         (assert_soft_invalid):
2265         (assert_unlinkable):
2266         (assert_uninstantiable):
2267         (assert_trap):
2268         (assert_return):
2269         (assert_return_nan):
2270         * wasm/spec-tests/f32.wast.js: Added.
2271         (register):
2272         (module):
2273         (instance):
2274         (assert_malformed):
2275         (assert_invalid):
2276         (assert_soft_invalid):
2277         (assert_unlinkable):
2278         (assert_uninstantiable):
2279         (assert_trap):
2280         (assert_return):
2281         (assert_return_nan):
2282         * wasm/spec-tests/f32_cmp.wast.js: Added.
2283         (register):
2284         (module):
2285         (instance):
2286         (assert_malformed):
2287         (assert_invalid):
2288         (assert_soft_invalid):
2289         (assert_unlinkable):
2290         (assert_uninstantiable):
2291         (assert_trap):
2292         (assert_return):
2293         (assert_return_nan):
2294         * wasm/spec-tests/f64.wast.js: Added.
2295         (register):
2296         (module):
2297         (instance):
2298         (assert_malformed):
2299         (assert_invalid):
2300         (assert_soft_invalid):
2301         (assert_unlinkable):
2302         (assert_uninstantiable):
2303         (assert_trap):
2304         (assert_return):
2305         (assert_return_nan):
2306         * wasm/spec-tests/f64_cmp.wast.js: Added.
2307         (register):
2308         (module):
2309         (instance):
2310         (assert_malformed):
2311         (assert_invalid):
2312         (assert_soft_invalid):
2313         (assert_unlinkable):
2314         (assert_uninstantiable):
2315         (assert_trap):
2316         (assert_return):
2317         (assert_return_nan):
2318         * wasm/spec-tests/fac.wast.js: Added.
2319         (register):
2320         (module):
2321         (instance):
2322         (assert_malformed):
2323         (assert_invalid):
2324         (assert_soft_invalid):
2325         (assert_unlinkable):
2326         (assert_uninstantiable):
2327         (assert_trap):
2328         (assert_return):
2329         (assert_return_nan):
2330         * wasm/spec-tests/float_exprs.wast.js: Added.
2331         (register):
2332         (module):
2333         (instance):
2334         (assert_malformed):
2335         (assert_invalid):
2336         (assert_soft_invalid):
2337         (assert_unlinkable):
2338         (assert_uninstantiable):
2339         (assert_trap):
2340         (assert_return):
2341         (assert_return_nan):
2342         * wasm/spec-tests/float_literals.wast.js: Added.
2343         (register):
2344         (module):
2345         (instance):
2346         (assert_malformed):
2347         (assert_invalid):
2348         (assert_soft_invalid):
2349         (assert_unlinkable):
2350         (assert_uninstantiable):
2351         (assert_trap):
2352         (assert_return):
2353         (assert_return_nan):
2354         * wasm/spec-tests/float_memory.wast.js: Added.
2355         (register):
2356         (module):
2357         (instance):
2358         (assert_malformed):
2359         (assert_invalid):
2360         (assert_soft_invalid):
2361         (assert_unlinkable):
2362         (assert_uninstantiable):
2363         (assert_trap):
2364         (assert_return):
2365         (assert_return_nan):
2366         * wasm/spec-tests/float_misc.wast.js: Added.
2367         (register):
2368         (module):
2369         (instance):
2370         (assert_malformed):
2371         (assert_invalid):
2372         (assert_soft_invalid):
2373         (assert_unlinkable):
2374         (assert_uninstantiable):
2375         (assert_trap):
2376         (assert_return):
2377         (assert_return_nan):
2378         * wasm/spec-tests/forward.wast.js: Added.
2379         (register):
2380         (module):
2381         (instance):
2382         (assert_malformed):
2383         (assert_invalid):
2384         (assert_soft_invalid):
2385         (assert_unlinkable):
2386         (assert_uninstantiable):
2387         (assert_trap):
2388         (assert_return):
2389         (assert_return_nan):
2390         * wasm/spec-tests/func.wast.js: Added.
2391         (register):
2392         (module):
2393         (instance):
2394         (assert_malformed):
2395         (assert_invalid):
2396         (assert_soft_invalid):
2397         (assert_unlinkable):
2398         (assert_uninstantiable):
2399         (assert_trap):
2400         (assert_return):
2401         (assert_return_nan):
2402         * wasm/spec-tests/func_ptrs.wast.js: Added.
2403         (register):
2404         (module):
2405         (instance):
2406         (assert_malformed):
2407         (assert_invalid):
2408         (assert_soft_invalid):
2409         (assert_unlinkable):
2410         (assert_uninstantiable):
2411         (assert_trap):
2412         (assert_return):
2413         (assert_return_nan):
2414         * wasm/spec-tests/get_local.wast.js: Added.
2415         (register):
2416         (module):
2417         (instance):
2418         (assert_malformed):
2419         (assert_invalid):
2420         (assert_soft_invalid):
2421         (assert_unlinkable):
2422         (assert_uninstantiable):
2423         (assert_trap):
2424         (assert_return):
2425         (assert_return_nan):
2426         * wasm/spec-tests/globals.wast.js: Added.
2427         (register):
2428         (module):
2429         (instance):
2430         (assert_malformed):
2431         (assert_invalid):
2432         (assert_soft_invalid):
2433         (assert_unlinkable):
2434         (assert_uninstantiable):
2435         (assert_trap):
2436         (assert_return):
2437         (assert_return_nan):
2438         * wasm/spec-tests/i32.wast.js: Added.
2439         (register):
2440         (module):
2441         (instance):
2442         (assert_malformed):
2443         (assert_invalid):
2444         (assert_soft_invalid):
2445         (assert_unlinkable):
2446         (assert_uninstantiable):
2447         (assert_trap):
2448         (assert_return):
2449         (assert_return_nan):
2450         * wasm/spec-tests/i64.wast.js: Added.
2451         (register):
2452         (module):
2453         (instance):
2454         (assert_malformed):
2455         (assert_invalid):
2456         (assert_soft_invalid):
2457         (assert_unlinkable):
2458         (assert_uninstantiable):
2459         (assert_trap):
2460         (assert_return):
2461         (assert_return_nan):
2462         * wasm/spec-tests/imports.wast.js: Added.
2463         (register):
2464         (module):
2465         (instance):
2466         (assert_malformed):
2467         (assert_invalid):
2468         (assert_soft_invalid):
2469         (assert_unlinkable):
2470         (assert_uninstantiable):
2471         (assert_trap):
2472         (assert_return):
2473         (assert_return_nan):
2474         * wasm/spec-tests/int_exprs.wast.js: Added.
2475         (register):
2476         (module):
2477         (instance):
2478         (assert_malformed):
2479         (assert_invalid):
2480         (assert_soft_invalid):
2481         (assert_unlinkable):
2482         (assert_uninstantiable):
2483         (assert_trap):
2484         (assert_return):
2485         (assert_return_nan):
2486         * wasm/spec-tests/int_literals.wast.js: Added.
2487         (register):
2488         (module):
2489         (instance):
2490         (assert_malformed):
2491         (assert_invalid):
2492         (assert_soft_invalid):
2493         (assert_unlinkable):
2494         (assert_uninstantiable):
2495         (assert_trap):
2496         (assert_return):
2497         (assert_return_nan):
2498         * wasm/spec-tests/left-to-right.wast.js: Added.
2499         (register):
2500         (module):
2501         (instance):
2502         (assert_malformed):
2503         (assert_invalid):
2504         (assert_soft_invalid):
2505         (assert_unlinkable):
2506         (assert_uninstantiable):
2507         (assert_trap):
2508         (assert_return):
2509         (assert_return_nan):
2510         * wasm/spec-tests/linking.wast.js: Added.
2511         (register):
2512         (module):
2513         (instance):
2514         (assert_malformed):
2515         (assert_invalid):
2516         (assert_soft_invalid):
2517         (assert_unlinkable):
2518         (assert_uninstantiable):
2519         (assert_trap):
2520         (assert_return):
2521         (assert_return_nan):
2522         * wasm/spec-tests/loop.wast.js: Added.
2523         (register):
2524         (module):
2525         (instance):
2526         (assert_malformed):
2527         (assert_invalid):
2528         (assert_soft_invalid):
2529         (assert_unlinkable):
2530         (assert_uninstantiable):
2531         (assert_trap):
2532         (assert_return):
2533         (assert_return_nan):
2534         * wasm/spec-tests/memory.wast.js: Added.
2535         (register):
2536         (module):
2537         (instance):
2538         (assert_malformed):
2539         (assert_invalid):
2540         (assert_soft_invalid):
2541         (assert_unlinkable):
2542         (assert_uninstantiable):
2543         (assert_trap):
2544         (assert_return):
2545         (assert_return_nan):
2546         * wasm/spec-tests/memory_redundancy.wast.js: Added.
2547         (register):
2548         (module):
2549         (instance):
2550         (assert_malformed):
2551         (assert_invalid):
2552         (assert_soft_invalid):
2553         (assert_unlinkable):
2554         (assert_uninstantiable):
2555         (assert_trap):
2556         (assert_return):
2557         (assert_return_nan):
2558         * wasm/spec-tests/memory_trap.wast.js: Added.
2559         (register):
2560         (module):
2561         (instance):
2562         (assert_malformed):
2563         (assert_invalid):
2564         (assert_soft_invalid):
2565         (assert_unlinkable):
2566         (assert_uninstantiable):
2567         (assert_trap):
2568         (assert_return):
2569         (assert_return_nan):
2570         * wasm/spec-tests/names.wast.js: Added.
2571         (register):
2572         (module):
2573         (instance):
2574         (assert_malformed):
2575         (assert_invalid):
2576         (assert_soft_invalid):
2577         (assert_unlinkable):
2578         (assert_uninstantiable):
2579         (assert_trap):
2580         (assert_return):
2581         (assert_return_nan):
2582         * wasm/spec-tests/nop.wast.js: Added.
2583         (register):
2584         (module):
2585         (instance):
2586         (assert_malformed):
2587         (assert_invalid):
2588         (assert_soft_invalid):
2589         (assert_unlinkable):
2590         (assert_uninstantiable):
2591         (assert_trap):
2592         (assert_return):
2593         (assert_return_nan):
2594         * wasm/spec-tests/resizing.wast.js: Added.
2595         (register):
2596         (module):
2597         (instance):
2598         (assert_malformed):
2599         (assert_invalid):
2600         (assert_soft_invalid):
2601         (assert_unlinkable):
2602         (assert_uninstantiable):
2603         (assert_trap):
2604         (assert_return):
2605         (assert_return_nan):
2606         * wasm/spec-tests/return.wast.js: Added.
2607         (register):
2608         (module):
2609         (instance):
2610         (assert_malformed):
2611         (assert_invalid):
2612         (assert_soft_invalid):
2613         (assert_unlinkable):
2614         (assert_uninstantiable):
2615         (assert_trap):
2616         (assert_return):
2617         (assert_return_nan):
2618         * wasm/spec-tests/select.wast.js: Added.
2619         (register):
2620         (module):
2621         (instance):
2622         (assert_malformed):
2623         (assert_invalid):
2624         (assert_soft_invalid):
2625         (assert_unlinkable):
2626         (assert_uninstantiable):
2627         (assert_trap):
2628         (assert_return):
2629         (assert_return_nan):
2630         * wasm/spec-tests/set_local.wast.js: Added.
2631         (register):
2632         (module):
2633         (instance):
2634         (assert_malformed):
2635         (assert_invalid):
2636         (assert_soft_invalid):
2637         (assert_unlinkable):
2638         (assert_uninstantiable):
2639         (assert_trap):
2640         (assert_return):
2641         (assert_return_nan):
2642         * wasm/spec-tests/skip-stack-guard-page.wast.js: Added.
2643         (register):
2644         (module):
2645         (instance):
2646         (assert_malformed):
2647         (assert_invalid):
2648         (assert_soft_invalid):
2649         (assert_unlinkable):
2650         (assert_uninstantiable):
2651         (assert_trap):
2652         (assert_return):
2653         (assert_return_nan):
2654         * wasm/spec-tests/stack.wast.js: Added.
2655         (register):
2656         (module):
2657         (instance):
2658         (assert_malformed):
2659         (assert_invalid):
2660         (assert_soft_invalid):
2661         (assert_unlinkable):
2662         (assert_uninstantiable):
2663         (assert_trap):
2664         (assert_return):
2665         (assert_return_nan):
2666         * wasm/spec-tests/start.wast.js: Added.
2667         (register):
2668         (module):
2669         (instance):
2670         (assert_malformed):
2671         (assert_invalid):
2672         (assert_soft_invalid):
2673         (assert_unlinkable):
2674         (assert_uninstantiable):
2675         (assert_trap):
2676         (assert_return):
2677         (assert_return_nan):
2678         * wasm/spec-tests/store_retval.wast.js: Added.
2679         (register):
2680         (module):
2681         (instance):
2682         (assert_malformed):
2683         (assert_invalid):
2684         (assert_soft_invalid):
2685         (assert_unlinkable):
2686         (assert_uninstantiable):
2687         (assert_trap):
2688         (assert_return):
2689         (assert_return_nan):
2690         * wasm/spec-tests/switch.wast.js: Added.
2691         (register):
2692         (module):
2693         (instance):
2694         (assert_malformed):
2695         (assert_invalid):
2696         (assert_soft_invalid):
2697         (assert_unlinkable):
2698         (assert_uninstantiable):
2699         (assert_trap):
2700         (assert_return):
2701         (assert_return_nan):
2702         * wasm/spec-tests/tee_local.wast.js: Added.
2703         (register):
2704         (module):
2705         (instance):
2706         (assert_malformed):
2707         (assert_invalid):
2708         (assert_soft_invalid):
2709         (assert_unlinkable):
2710         (assert_uninstantiable):
2711         (assert_trap):
2712         (assert_return):
2713         (assert_return_nan):
2714         * wasm/spec-tests/traps.wast.js: Added.
2715         (register):
2716         (module):
2717         (instance):
2718         (assert_malformed):
2719         (assert_invalid):
2720         (assert_soft_invalid):
2721         (assert_unlinkable):
2722         (assert_uninstantiable):
2723         (assert_trap):
2724         (assert_return):
2725         (assert_return_nan):
2726         * wasm/spec-tests/typecheck.wast.js: Added.
2727         (register):
2728         (module):
2729         (instance):
2730         (assert_malformed):
2731         (assert_invalid):
2732         (assert_soft_invalid):
2733         (assert_unlinkable):
2734         (assert_uninstantiable):
2735         (assert_trap):
2736         (assert_return):
2737         (assert_return_nan):
2738         * wasm/spec-tests/unreachable.wast.js: Added.
2739         (register):
2740         (module):
2741         (instance):
2742         (assert_malformed):
2743         (assert_invalid):
2744         (assert_soft_invalid):
2745         (assert_unlinkable):
2746         (assert_uninstantiable):
2747         (assert_trap):
2748         (assert_return):
2749         (assert_return_nan):
2750         * wasm/spec-tests/unwind.wast.js: Added.
2751         (register):
2752         (module):
2753         (instance):
2754         (assert_malformed):
2755         (assert_invalid):
2756         (assert_soft_invalid):
2757         (assert_unlinkable):
2758         (assert_uninstantiable):
2759         (assert_trap):
2760         (assert_return):
2761         (assert_return_nan):
2762
2763 2016-12-20  Keith Miller  <keith_miller@apple.com>
2764
2765         Add support for global
2766         https://bugs.webkit.org/show_bug.cgi?id=165171
2767
2768         Reviewed by Filip Pizlo.
2769
2770         * stress/global.js: Added.
2771
2772 2016-12-20  JF Bastien  <jfbastien@apple.com>
2773
2774         WebAssembly API: implement WebAssembly.LinkError
2775         https://bugs.webkit.org/show_bug.cgi?id=165805
2776         <rdar://problem/29747874>
2777
2778         Reviewed by Mark lam.
2779
2780         Update all exception sites which now throw WebAssembly.LinkError.
2781
2782         * wasm/js-api/element-data.js:
2783         * wasm/js-api/element.js:
2784         (assert.throws):
2785         * wasm/js-api/global-error.js:
2786         (new.Number):
2787         * wasm/js-api/table.js:
2788         (assert.throws):
2789         (new.WebAssembly.Table):
2790         * wasm/js-api/test_Data.js:
2791         * wasm/js-api/test_basic_api.js:
2792         (const.c.in.constructorProperties.switch):
2793         * wasm/js-api/test_memory.js:
2794         (test):
2795         (test.testMemImportError): Deleted.
2796
2797 2016-12-20  JF Bastien  <jfbastien@apple.com>
2798
2799         WebAssembly: unique function signatures
2800         https://bugs.webkit.org/show_bug.cgi?id=165957
2801         <rdar://problem/29735737>
2802
2803         Reviewed by Saam Barati.
2804
2805         * wasm/function-tests/table-basic.js: FIXME is now addressed,
2806         though instance to instance calls still need work which bug
2807         #165282 will address
2808         (i.assert.eq.foo):
2809         * wasm/js-api/unique-signature.js: Added.
2810         (CallIndirectWithDuplicateSignatures):
2811
2812 2016-12-19  Mark Lam  <mark.lam@apple.com>
2813
2814         Rolling out r209974 and r209952. They break some websites in mysterious ways. Step 2: Rollout r209952.
2815         https://bugs.webkit.org/show_bug.cgi?id=166049
2816
2817         Not reviewed.
2818
2819         * stress/deeply-nested-finallys.js: Removed.
2820         * stress/test-finally.js: Removed.
2821
2822 2016-12-19  Saam Barati  <sbarati@apple.com>
2823
2824         WebAssembly: Make running Wasm tests take less time by reducing some tests' iteration count and by splitting some tests into different files
2825         https://bugs.webkit.org/show_bug.cgi?id=166017
2826
2827         Reviewed by Yusuke Suzuki.
2828
2829         * wasm/function-tests/trap-load-2.js: Added.
2830         (assert):
2831         (wasmFrameCountFromError):
2832         (continuation):
2833         (i.catch):
2834         * wasm/function-tests/trap-load.js:
2835         (assert.continuation): Deleted.
2836         * wasm/function-tests/trap-store-2.js: Added.
2837         (import.Builder.from.string_appeared_here.assert):
2838         (continuation):
2839         (i.catch):
2840         * wasm/function-tests/trap-store.js:
2841         (assert.continuation): Deleted.
2842         (assert): Deleted.
2843         * wasm/js-api/test_memory.js:
2844         (test):
2845
2846 2016-12-18  Saam Barati  <sbarati@apple.com>
2847
2848         WebAssembly: Implement the WebAssembly.compile and WebAssembly.validate
2849         https://bugs.webkit.org/show_bug.cgi?id=165936
2850
2851         Reviewed by Mark Lam.
2852
2853         * wasm/js-api/Module-compile.js: Added.
2854         (async.testPromiseAPI):
2855         * wasm/js-api/test_basic_api.js:
2856         (const.c.in.constructorProperties.switch):
2857         * wasm/js-api/validate.js: Added.
2858         (assert.truthy.WebAssembly.validate.builder.WebAssembly):
2859
2860 2016-12-16  Mark Lam  <mark.lam@apple.com>
2861
2862         De-duplicate finally blocks.
2863         https://bugs.webkit.org/show_bug.cgi?id=160168
2864
2865         Reviewed by Keith Miller.
2866
2867         * stress/deeply-nested-finallys.js: Added.
2868         - Tests many levels of finally nesting.  This causes the old code to hang (and
2869           crashes eventually) while trying to generate bytecode for the exponentially
2870           duplicated finally blocks.  The new code completes this test almost instantly.
2871
2872         * stress/test-finally.js: Added.
2873         - Tests control flow through various permutations of finally blocks.
2874
2875 2016-12-16  Saam Barati  <sbarati@apple.com>
2876
2877         WebAssembly: WasmB3IRGenerator should throw exceptions instead of crash
2878         https://bugs.webkit.org/show_bug.cgi?id=165834
2879
2880         Reviewed by Keith Miller.
2881
2882         * wasm/function-tests/exceptions.js: Added.
2883         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
2884         * wasm/function-tests/table-basic.js:
2885         (i.i.42.throw.new.Error):
2886
2887 2016-12-16  Keith Miller  <keith_miller@apple.com>
2888
2889         i64.eqz should use an Int64 zero
2890         https://bugs.webkit.org/show_bug.cgi?id=165942
2891
2892         Reviewed by Mark Lam.
2893
2894         * wasm/wasm.json:
2895
2896 2016-12-15  Keith Miller  <keith_miller@apple.com>
2897
2898         Fix validation of non-void if blocks with no else
2899         https://bugs.webkit.org/show_bug.cgi?id=165938
2900
2901         Reviewed by Saam Barati.
2902
2903         Add a new failing test and a fix an existing one.
2904
2905         * wasm/function-tests/dead-call.js:
2906         * wasm/function-tests/if-no-else-non-void.js: Added.
2907
2908 2016-12-15  Keith Miller  <keith_miller@apple.com>
2909
2910         Wasm should not create empty unlinked callsites
2911         https://bugs.webkit.org/show_bug.cgi?id=165933
2912
2913         Reviewed by Mark Lam.
2914
2915         * wasm/function-tests/dead-call.js: Added.
2916
2917 2016-12-15  JF Bastien  <jfbastien@apple.com>
2918
2919         WebAssembly: improve compilation error messages
2920         https://bugs.webkit.org/show_bug.cgi?id=163919
2921
2922         Reviewed by Saam Barati.
2923
2924         Update error messages in these tests.
2925         Use the assert.throws facility in many of them which weren't already.
2926
2927         * wasm/js-api/element.js:
2928         (assert.throws.new.WebAssembly.Module.builder.WebAssembly):
2929         (assert.throws):
2930         * wasm/js-api/global-error.js:
2931         (assert.throws.new.WebAssembly.Module.bin):
2932         (assert.throws):
2933         (new.Number):
2934         * wasm/js-api/table.js:
2935         (assert.throws.new.WebAssembly.Module.builder.WebAssembly):
2936         (assert.throws):
2937         (assertBadTableImport):
2938         * wasm/js-api/test_Data.js:
2939         (DataSectionWithoutMemory):
2940         * wasm/js-api/test_Start.js:
2941         (InvalidStartFunctionIndex):
2942         * wasm/js-api/test_basic_api.js:
2943         (const.c.in.constructorProperties.switch):
2944
2945 2016-12-15  JF Bastien  <jfbastien@apple.com>
2946
2947         WebAssembly API: improve data section errors
2948         https://bugs.webkit.org/show_bug.cgi?id=165733
2949
2950         Reviewed by Keith Miller.
2951
2952         * wasm/js-api/element-data.js: Added.
2953         (ElementBeforeData.set const):
2954         (ElementBeforeData): check the order of initialization, which is observable on failure
2955         * wasm/js-api/test_Data.js:
2956         (DataSectionWithoutMemory):
2957         (DataSectionOffTheEnd): Deleted.
2958         (DataSectionPartlyOffTheEnd): Deleted.
2959         (DataSectionEmptyOffTheEnd): Deleted.
2960         (DataSectionSeenByStart): Deleted.
2961
2962 2016-12-15  Keith Miller  <keith_miller@apple.com>
2963
2964         Fix 64-bit shift family Wasm opcodes
2965         https://bugs.webkit.org/show_bug.cgi?id=165902
2966
2967         Reviewed by Geoffrey Garen.
2968
2969         Add tests for shift family of instructions. Since
2970         we can't generate i64 values to pass to wasm we only compile
2971         the code for those functions. Attempting to generate any i64
2972         code using these instructions would have been enough to cause
2973         the B3 Validation error anyway.
2974
2975         * wasm/assert.js:
2976         * wasm/function-tests/rotl.js: Added.
2977         * wasm/function-tests/rotr.js: Added.
2978         * wasm/function-tests/shl.js: Added.
2979         * wasm/function-tests/shr-s.js: Added.
2980         * wasm/function-tests/shr-u.js: Added.
2981         * wasm/wasm.json:
2982
2983 2016-12-14  Keith Miller  <keith_miller@apple.com>
2984
2985         WebAssembly: test_BuilderJSON.js is broken
2986         https://bugs.webkit.org/show_bug.cgi?id=165893
2987
2988         Reviewed by Michael Saboff.
2989
2990         * wasm/Builder.js:
2991         (const._isValidValue):
2992         * wasm/self-test/test_BuilderJSON.js:
2993
2994 2016-12-14  Keith Miller  <keith_miller@apple.com>
2995
2996         Unreviewed, fix test.
2997
2998         * wasm/function-tests/i32-const.js:
2999
3000 2016-12-14  Keith Miller  <keith_miller@apple.com>
3001
3002         Wasm should decode constants correctly
3003         https://bugs.webkit.org/show_bug.cgi?id=165886
3004
3005         Reviewed by Saam Barati.
3006
3007         * wasm/Builder.js:
3008         (const._isValidValue):
3009         * wasm/Builder_WebAssemblyBinary.js:
3010         (const.putOp):
3011         * wasm/LowLevelBinary.js:
3012         (export.default.LowLevelBinary.prototype.float):
3013         (export.default.LowLevelBinary.prototype.double):
3014         * wasm/function-tests/f32-const.js: Added.
3015         * wasm/function-tests/f64-const.js: Added.
3016         * wasm/function-tests/i32-const.js: Added.
3017         * wasm/wasm.json:
3018
3019 2016-12-14  Saam Barati  <sbarati@apple.com>
3020
3021         WebAssembly: Add various low hanging fruit that will allow us to run the LLVM torture tests in Wasm
3022         https://bugs.webkit.org/show_bug.cgi?id=165883
3023
3024         Reviewed by Keith Miller.
3025
3026         * wasm/Builder.js:
3027         (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
3028         * wasm/Builder_WebAssemblyBinary.js:
3029         (const.emitters.Export):
3030         * wasm/js-api/table.js:
3031         (assertBadBinary):
3032         (assertBadTable):
3033         (assert.truthy):
3034         * wasm/js-api/test_memory.js:
3035         (binaryShouldNotParse):
3036         (test):
3037         (test.testMemImportError):
3038         (assert.truthy):
3039         (assert): Deleted.
3040
3041 2016-12-14  Filip Pizlo  <fpizlo@apple.com>
3042
3043         DirectTailCall implementation needs to tell the shuffler what to put into the ArgumentCount explicitly
3044         https://bugs.webkit.org/show_bug.cgi?id=165882
3045
3046         Reviewed by Mark Lam.
3047
3048         * stress/direct-tail-call-arity-mismatch-count-args.js: Added.
3049         (foo):
3050         (bar):
3051
3052 2016-12-14  Keith Miller  <keith_miller@apple.com>
3053
3054         WebAssembly JS API: implement Global
3055         https://bugs.webkit.org/show_bug.cgi?id=164133
3056
3057         Reviewed by Saam Barati.
3058
3059         * wasm/Builder.js:
3060         (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
3061         * wasm/Builder_WebAssemblyBinary.js:
3062         (const.valueType.WASM.description.type.i32.type.const.putGlobalType):
3063         (const.putOp):
3064         (const.putInitExpr):
3065         (const.emitters.Import):
3066         (const.emitters.Global):
3067         (const.emitters.Export):
3068         (const.emitters.Code):
3069         * wasm/LowLevelBinary.js:
3070         (export.default.LowLevelBinary.prototype.varuint32):
3071         (export.default.LowLevelBinary.prototype.varint32):
3072         * wasm/js-api/global-error.js: Added.
3073         (catch):
3074         (assert.truthy):
3075         * wasm/js-api/global-external-init-from-import.js: Added.
3076         * wasm/js-api/global-internal-init-from-import.js: Added.
3077         * wasm/js-api/global-mutate.js: Added.
3078         (createInternalGlobalModule):
3079         * wasm/js-api/globals-export.js: Added.
3080         * wasm/js-api/globals-import.js: Added.
3081         * wasm/wasm.json:
3082
3083 2016-12-13  Saam Barati  <sbarati@apple.com>
3084
3085         WebAssembly: implement the elements section
3086         https://bugs.webkit.org/show_bug.cgi?id=165715
3087
3088         Reviewed by Keith Miller.
3089
3090         * wasm/Builder.js:
3091         (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
3092         (export.default.Builder.prototype._registerSectionBuilders.switch):
3093         * wasm/Builder_WebAssemblyBinary.js:
3094         (const.emitters.Element):
3095         * wasm/function-tests/basic-element.js: Added.
3096         * wasm/js-api/element.js: Added.
3097         (assertBadBinary):
3098         (assertBadBinary.badInstantiation):
3099
3100 2016-12-13  Saam Barati  <sbarati@apple.com>
3101
3102         WebAssembly: implement the table section and table import
3103         https://bugs.webkit.org/show_bug.cgi?id=165716
3104
3105         Reviewed by Keith Miller.
3106
3107         * wasm/Builder.js:
3108         (const._importMemoryContinuation):
3109         (const._importTableContinuation):
3110         (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
3111         (const._importMemoryContinuation.section): Deleted.
3112         (const): Deleted.
3113         (const._importMemoryContinuation.assert): Deleted.
3114         * wasm/Builder_WebAssemblyBinary.js:
3115         (const.putResizableLimits):
3116         (const.putTable):
3117         (const.emitters.Import):
3118         (const.emitters.Table):
3119         * wasm/function-tests/call-indirect-params.js:
3120         * wasm/function-tests/call-indirect.js:
3121         * wasm/function-tests/table-basic-2.js: Added.
3122         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
3123         (func):
3124         * wasm/function-tests/table-basic.js: Added.
3125         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
3126         * wasm/js-api/call-indirect-results.js:
3127         (const.wasmModuleWhichImportJS): Deleted.
3128         (MonomorphicImport): Deleted.
3129         * wasm/js-api/call-indirect.js:
3130         (const.wasmModuleWhichImportJS):
3131         (const.makeTable):
3132         (Polyphic2Import):
3133         (VirtualImport):
3134         (MonomorphicImport): Deleted.
3135         * wasm/js-api/table.js: Added.
3136         (assertBadBinary):
3137         (assert.truthy):
3138         (assertBadTable):
3139         (assertBadTableImport):
3140         (assertBadBinary.assertBadTableInstance):
3141         (assertBadTableInstance):
3142         (new.WebAssembly.Table):
3143         * wasm/js-api/test_basic_api.js:
3144         (const.c.in.constructorProperties.switch):
3145
3146 2016-12-13  Commit Queue  <commit-queue@webkit.org>
3147
3148         Unreviewed, rolling out r209725.
3149         https://bugs.webkit.org/show_bug.cgi?id=165811
3150
3151         "Broke ARMv7 builds" (Requested by msaboff on #webkit).
3152
3153         Reverted changeset:
3154
3155         "REGRESSION(r209653): speedometer crashes making virtual slow
3156         path tailcalls"
3157         https://bugs.webkit.org/show_bug.cgi?id=165748
3158         http://trac.webkit.org/changeset/209725
3159
3160 2016-12-12  Michael Saboff  <msaboff@apple.com>
3161
3162         REGRESSION(r209653): speedometer crashes making virtual slow path tailcalls
3163         https://bugs.webkit.org/show_bug.cgi?id=165748
3164
3165         Reviewed by Filip Pizlo.
3166
3167         New regression test.
3168
3169         * stress/regress-165748.js: Added.
3170         (sum1):
3171         (sum2):
3172         (sum3):
3173         (sum4):
3174         (sum5):
3175         (sum6):
3176         (tailCaller):
3177         (test):
3178
3179 2016-12-12  Mark Lam  <mark.lam@apple.com>
3180
3181         Debug JSC test timeout: stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js.ftl-no-cjit.
3182         https://bugs.webkit.org/show_bug.cgi?id=164630
3183
3184         Reviewed by Keith Miller.
3185
3186         Speculative fix for timeout issue.  It looks like this test just runs a bit
3187         slower on debug builds.  So, we'll give it a little more time to run.
3188
3189         * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
3190
3191 2016-12-11  Saam Barati  <sbarati@apple.com>
3192
3193         We should be able to throw exceptions from Wasm code and when Wasm frames are on the stack
3194         https://bugs.webkit.org/show_bug.cgi?id=165429
3195
3196         Reviewed by Keith Miller.
3197
3198         * wasm/function-tests/trap-load.js: Added.
3199         (assert):
3200         (wasmFrameCountFromError):
3201         (i.catch):
3202         (assert.continuation):
3203         * wasm/function-tests/trap-store.js: Added.
3204         (import.Builder.from.string_appeared_here.assert):
3205         (i.catch):
3206         (assert.continuation):
3207         (assert):
3208         * wasm/js-api/test_memory_constructor.js:
3209         (assert):
3210
3211 2016-12-10  Commit Queue  <commit-queue@webkit.org>
3212
3213         Unreviewed, rolling out r209653, r209654, r209663, and
3214         r209673.
3215         https://bugs.webkit.org/show_bug.cgi?id=165739
3216
3217         speedometer crashes (Requested by pizlo on #webkit).
3218
3219         Reverted changesets:
3220
3221         "JSVALUE64: Pass arguments in platform argument registers when
3222         making JavaScript calls"
3223         https://bugs.webkit.org/show_bug.cgi?id=160355
3224         http://trac.webkit.org/changeset/209653
3225
3226         "Unreviewed build fix for 32 bit builds."
3227         http://trac.webkit.org/changeset/209654
3228
3229         "Unreviewed build fix for the CLOOP after r209653"
3230         http://trac.webkit.org/changeset/209663
3231
3232         "REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()"
3233         https://bugs.webkit.org/show_bug.cgi?id=165728
3234         http://trac.webkit.org/changeset/209673
3235
3236 2016-12-10  Michael Saboff  <msaboff@apple.com>
3237
3238         REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()
3239         https://bugs.webkit.org/show_bug.cgi?id=165728
3240
3241         Reviewed by Filip Pizlo.
3242
3243         New regression test.
3244
3245         * stress/regress-165728.js: Added.
3246         (sum1):
3247         (sum2):
3248         (tailCaller):
3249         (test):
3250
3251 2016-12-10  Keith Miller  <keith_miller@apple.com>
3252
3253         Fix indirect_call if the result type is used.
3254         https://bugs.webkit.org/show_bug.cgi?id=165727
3255
3256         Reviewed by Michael Saboff.
3257
3258         * wasm/js-api/call-indirect-results.js: Added.
3259         (const.wasmModuleWhichImportJS):
3260         (MonomorphicImport):
3261
3262 2016-12-10  Yusuke Suzuki  <utatane.tea@gmail.com>
3263
3264         [JSC] Module namespace object behaves like immutable prototype exotic object
3265         https://bugs.webkit.org/show_bug.cgi?id=165598
3266
3267         Reviewed by Mark Lam.
3268
3269         * modules/namespace-prototype-assignment.js: Added.
3270         (else):
3271         (reportError):
3272         (shouldEqual):
3273         (shouldThrow):
3274         (stringify):
3275         (makeTestID):
3276         (doInternalSetPrototypeOf):
3277         (ordinarySetPrototypeOf):
3278         (setImmutablePrototype):
3279         (windowProxySetPrototypeOf):
3280         (initSetterExpectation):
3281         (throwIfNoExceptionPending):
3282         (objectSetPrototypeOf):
3283         (setUnderscoreProto):
3284         (reflectSetPrototypeOf):
3285         (setPrototypeOf):
3286         (newObjectProto.toString):
3287         (Symbol):
3288         (test):
3289         (runTests):
3290         * modules/namespace-set-prototype-of.js: Added.
3291         (shouldThrow):
3292         (TypeError.Cannot.set prototype):
3293
3294 2016-12-09  Michael Saboff  <msaboff@apple.com>
3295
3296         JSVALUE64: Pass arguments in platform argument registers when making JavaScript calls
3297         https://bugs.webkit.org/show_bug.cgi?id=160355
3298
3299         Reviewed by Filip Pizlo.
3300
3301         New microbenchmarks to measure call type performance.
3302
3303         * microbenchmarks/calling-computed-args.js: Added.
3304         * microbenchmarks/calling-many-callees.js: Added.
3305         * microbenchmarks/calling-one-callee-fixed.js: Added.
3306         * microbenchmarks/calling-one-callee.js: Added.
3307         * microbenchmarks/calling-poly-callees.js: Added.
3308         * microbenchmarks/calling-poly-extra-arity-callees.js: Added.
3309         * microbenchmarks/calling-tailcall.js: Added.
3310         * microbenchmarks/calling-virtual-arity-fixup-callees.js: Added.
3311         * microbenchmarks/calling-virtual-arity-fixup-stackargs.js: Added.
3312         * microbenchmarks/calling-virtual-callees.js: Added.
3313         * microbenchmarks/calling-virtual-extra-arity-callees.js: Added.
3314
3315 2016-12-09  Keith Miller  <keith_miller@apple.com>
3316
3317         Wasm should support call_indirect
3318         https://bugs.webkit.org/show_bug.cgi?id=165718
3319
3320         Reviewed by Filip Pizlo.
3321
3322         * wasm/Builder.js:
3323         * wasm/function-tests/call-indirect-params.js: Added.
3324         * wasm/function-tests/call-indirect.js: Added.
3325         * wasm/js-api/call-indirect.js: Added.
3326         (const.wasmModuleWhichImportJS):
3327         (MonomorphicImport):
3328         (Polyphic2Import):
3329         (VirtualImport):
3330         * wasm/wasm.json:
3331
3332 2016-12-09  JF Bastien  <jfbastien@apple.com>
3333
3334         WebAssembly: implement data section
3335         https://bugs.webkit.org/show_bug.cgi?id=165696
3336
3337         Reviewed by Keith Miller.
3338
3339         As specified in https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#data-section
3340         Note that some of the interesting corner cases are ill-defined by the spec: https://github.com/WebAssembly/design/issues/897
3341
3342         * wasm/Builder.js: create a data section from JavaScript
3343         * wasm/Builder_WebAssemblyBinary.js: assemble the data section into the proper binary encoding
3344         (const.emitters.Data):
3345         * wasm/js-api/test_Data.js: Added.
3346         (DataSection):
3347         (DataSectionOffTheEnd):
3348         (DataSectionPartlyOffTheEnd):
3349         (DataSectionEmptyOffTheEnd):
3350         (DataSectionSeenByStart):
3351         * wasm/self-test/test_BuilderJSON.js: make sure the JSON structure is fine (this sanity checks before going to binary)
3352
3353 2016-12-09  JF Bastien  <jfbastien@apple.com>
3354
3355         WebAssembly JS API: implement start function
3356         https://bugs.webkit.org/show_bug.cgi?id=165150
3357
3358         Reviewed by Saam Barati.
3359
3360         * wasm/Builder.js: allow building a .Start()
3361         * wasm/Builder_WebAssemblyBinary.js:
3362         * wasm/js-api/test_Start.js: Added.
3363         (const.emitters.Start): serialize a start section
3364         * wasm/self-test/test_BuilderJSON.js: validate the start section's content
3365
3366 2016-12-09  Saam Barati  <sbarati@apple.com>
3367
3368         WebAssembly JS API: implement importing and defining Memory
3369         https://bugs.webkit.org/show_bug.cgi?id=164134
3370
3371         Reviewed by Keith Miller.
3372
3373         * wasm/Builder.js:
3374         (const._importMemoryContinuation.section):
3375         (const._importMemoryContinuation.assert):
3376         (const._importMemoryContinuation):
3377         (const._exportFunctionContinuation.const): Deleted.
3378         (const._exportFunctionContinuation): Deleted.
3379         * wasm/Builder_WebAssemblyBinary.js:
3380         (const.emitters.Import):
3381         * wasm/js-api/test_basic_api.js:
3382         (const.c.in.constructorProperties.switch):
3383         * wasm/js-api/test_memory.js: Added.
3384         (assert):
3385         (binaryShouldNotParse):
3386         (test):
3387         (test.testMemImportError):
3388         * wasm/js-api/test_memory_constructor.js: Added.
3389         (assert):
3390         (throw.new.Error):
3391         (testInvalidSize):
3392         (assert.testInvalidInitial):
3393         (testInvalidInitial.testInvalidMaximum):
3394         (testInvalidInitial):
3395         (testInvalidMaximum):
3396         * wasm/self-test/test_BuilderJSON.js:
3397
3398 2016-12-08  JF Bastien  <jfbastien@apple.com>
3399
3400         WebAssembly: JSC::link* shouldn't need a CodeBlock
3401         https://bugs.webkit.org/show_bug.cgi?id=165591
3402
3403         Reviewed by Keith Miller.
3404
3405         test that wasm -> JS works, including the IC
3406
3407         * wasm/js-api/test_Instance.js:
3408         (const.wasmModuleWhichImportJS):
3409         (MonomorphicImport):
3410         (Polyphic2Import):
3411         (Polyphic3Import):
3412         (VirtualImport):
3413
3414 2016-12-08  Filip Pizlo  <fpizlo@apple.com>
3415
3416         Green the cloop bot by raising this threshold.
3417
3418         * mozilla/js1_5/Array/regress-101964.js:
3419
3420 2016-12-08  JF Bastien  <jfbastien@apple.com>
3421
3422         WebAssembly JS API: wire up Instance imports
3423         https://bugs.webkit.org/show_bug.cgi?id=165118
3424
3425         Reviewed by Saam Barati.
3426
3427         * wasm/js-api/test_Instance.js: add the test, disabled for now
3428
3429 2016-12-07  Keith Miller  <keith_miller@apple.com>
3430
3431         Add more missing trivial wasm ops.
3432         https://bugs.webkit.org/show_bug.cgi?id=165564
3433
3434         Add tests for drop and tee_local.
3435
3436         Reviewed by Geoffrey Garen.
3437
3438         * wasm/function-tests/drop.js: Added.
3439         * wasm/function-tests/nop.js: Added.
3440         * wasm/function-tests/tee-local.js: Added.
3441
3442 2016-12-06  Keith Miller  <keith_miller@apple.com>
3443
3444         Add support for truncation operators
3445         https://bugs.webkit.org/show_bug.cgi?id=165519
3446
3447         Reviewed by Geoffrey Garen.
3448
3449         * wasm/function-tests/i32-trunc-s-f32.js: Added.
3450         * wasm/function-tests/i32-trunc-s-f64.js: Added.
3451         * wasm/function-tests/i32-trunc-u-f32.js: Added.
3452         * wasm/function-tests/i32-trunc-u-f64.js: Added.
3453         * wasm/function-tests/i64-trunc-s-f32.js: Added.
3454         * wasm/function-tests/i64-trunc-s-f64.js: Added.
3455         * wasm/function-tests/i64-trunc-u-f32.js: Added.
3456         * wasm/function-tests/i64-trunc-u-f64.js: Added.
3457
3458 2016-12-06  Mark Lam  <mark.lam@apple.com>
3459
3460         Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
3461         https://bugs.webkit.org/show_bug.cgi?id=165227
3462         <rdar://problem/29442665>
3463
3464         Reviewed by Saam Barati.
3465
3466         * stress/get-from-scope-dynamic-onto-proxy.js:
3467         - Updated error message.
3468
3469         * stress/proxy-dont-infinite-loop.js: Removed.
3470         * stress/proxy-json-path.js: Removed.
3471         * stress/rest-parameter-allocation-elimination-watchpoints-6.js: Removed.
3472         - Removed these tests because the issue they are testing relies on being able to
3473           set Object.prototype.__proto__ to something else (which is now not possible).
3474
3475 2016-12-05  Caitlin Potter  <caitp@igalia.com>
3476
3477         [JSC] report unexpected token when "async" is followed by identifier 
3478         https://bugs.webkit.org/show_bug.cgi?id=165091
3479
3480         Reviewed by Mark Lam.
3481
3482         * stress/bug-165091.js:
3483
3484 2016-12-05  Keith Miller  <keith_miller@apple.com>
3485
3486         Add Wasm i64 to i32 conversion.
3487         https://bugs.webkit.org/show_bug.cgi?id=165378
3488
3489         Reviewed by Filip Pizlo.
3490
3491         It turns out the wrap operation is just B3's Trunc.
3492
3493         * wasm/wasm.json:
3494
3495 2016-12-04  Keith Miller  <keith_miller@apple.com>
3496
3497         Add support for Wasm ctz and popcnt
3498         https://bugs.webkit.org/show_bug.cgi?id=165369
3499
3500         Reviewed by Saam Barati.
3501
3502         * wasm/function-tests/ctz.js: Added.
3503         * wasm/function-tests/popcnt.js: Added.
3504
3505 2016-12-03  JF Bastien  <jfbastien@apple.com>
3506
3507         WebAssembly: update binary format to 0xD version
3508         https://bugs.webkit.org/show_bug.cgi?id=165345
3509
3510         Reviewed by Keith Miller.
3511
3512         As described in the following PR: https://github.com/WebAssembly/design/pull/836
3513         Originally committed in r209175, reverted in r209242, and fixed in r209284.
3514
3515         * wasm/Builder.js:
3516         (const._normalizeFunctionSignature):
3517         * wasm/Builder_WebAssemblyBinary.js:
3518         (const.emitters.Type):
3519         (const.emitters.Code):
3520         * wasm/LowLevelBinary.js:
3521         (export.default.LowLevelBinary.prototype.block_type):
3522         (export.default.LowLevelBinary.prototype.inline_signature_type): Deleted.
3523         * wasm/WASM.js:
3524         * wasm/js-api/test_basic_api.js:
3525         * wasm/self-test/test_BuilderWebAssembly.js:
3526         (EmptyModule):
3527         (CustomSection):
3528         * wasm/self-test/test_WASM.js:
3529         * wasm/wasm.json:
3530
3531 2016-12-02  Keith Miller  <keith_miller@apple.com>
3532
3533         Add Wasm copysign
3534         https://bugs.webkit.org/show_bug.cgi?id=165355
3535
3536         Reviewed by Filip Pizlo.
3537
3538         * wasm/function-tests/copysign.js: Added.
3539
3540 2016-12-03  Commit Queue  <commit-queue@webkit.org>
3541
3542         Unreviewed, rolling out r209298.
3543         https://bugs.webkit.org/show_bug.cgi?id=165359
3544
3545         broke the build (Requested by smfr on #webkit).
3546
3547         Reverted changeset:
3548
3549         "Add Wasm copysign"
3550         https://bugs.webkit.org/show_bug.cgi?id=165355
3551         http://trac.webkit.org/changeset/209298
3552
3553 2016-12-02  Keith Miller  <keith_miller@apple.com>
3554
3555         Add Wasm copysign
3556         https://bugs.webkit.org/show_bug.cgi?id=165355
3557
3558         Reviewed by Filip Pizlo.
3559
3560         * wasm/function-tests/copysign.js: Added.
3561
3562 2016-12-02  Keith Miller  <keith_miller@apple.com>
3563
3564         Unreviewed, fix git having a breakdown over trying to reland a rollout.
3565
3566 2016-12-02  Keith Miller  <keith_miller@apple.com>
3567
3568         Add Wasm floating point nearest and trunc
3569         https://bugs.webkit.org/show_bug.cgi?id=165339
3570
3571         Reviewed by Saam Barati.
3572
3573         * wasm/function-tests/nearest.js: Added.
3574         * wasm/function-tests/trunc.js: Added.
3575
3576 2016-12-02  Caitlin Potter  <caitp@igalia.com>
3577
3578 [JSC] add additional bit to JSTokenType bitfield
3579         https://bugs.webkit.org/show_bug.cgi?id=165091
3580
3581         Reviewed by Geoffrey Garen.
3582
3583         * stress/bug-165091.js: Added.
3584         (shouldThrowSyntaxError):
3585
3586 2016-12-02  Commit Queue  <commit-queue@webkit.org>
3587
3588         Unreviewed, rolling out r209275 and r209276.
3589         https://bugs.webkit.org/show_bug.cgi?id=165348
3590
3591         "broke the arm build" (Requested by keith_miller on #webkit).
3592
3593         Reverted changesets:
3594
3595         "Add Wasm floating point nearest and trunc"
3596         https://bugs.webkit.org/show_bug.cgi?id=165339
3597         http://trac.webkit.org/changeset/209275
3598
3599         "Unreviewed, forgot to change instruction after renaming."
3600         http://trac.webkit.org/changeset/209276
3601
3602 2016-12-02  Keith Miller  <keith_miller@apple.com>
3603
3604         Add Wasm floating point nearest and trunc
3605         https://bugs.webkit.org/show_bug.cgi?id=165339
3606
3607         Reviewed by Filip Pizlo.
3608
3609         * wasm/function-tests/nearest.js: Added.
3610         * wasm/function-tests/trunc.js: Added.
3611
3612 2016-12-02  JF Bastien  <jfbastien@apple.com>
3613
3614         WebAssembly: revert patch causing odd breakage
3615         https://bugs.webkit.org/show_bug.cgi?id=165308
3616
3617         Unreviewed.
3618
3619         Bug #164724 seems to cause build issues which I haven't tracked down yet. WasmOps.h can't be found:
3620         ./Source/JavaScriptCore/wasm/WasmFormat.h:34:10: fatal error: 'WasmOps.h' file not found
3621
3622         It's weird since the file is auto-generated and has been for a while. #164724 merely includes it in WasmFormat.h.
3623
3624         * wasm/Builder.js:
3625         (const._normalizeFunctionSignature):
3626         * wasm/Builder_WebAssemblyBinary.js:
3627         (const.emitters.Type):
3628         (const.emitters.Code):
3629         * wasm/LowLevelBinary.js:
3630         (export.default.LowLevelBinary.prototype.inline_signature_type):
3631         (export.default.LowLevelBinary.prototype.block_type): Deleted.
3632         * wasm/WASM.js:
3633         * wasm/js-api/test_basic_api.js:
3634         * wasm/self-test/test_BuilderWebAssembly.js:
3635         (EmptyModule):
3636         (CustomSection):
3637         * wasm/self-test/test_WASM.js:
3638         * wasm/wasm.json:
3639
3640 2016-12-01  Ryan Haddad  <ryanhaddad@apple.com>
3641
3642         Skip flaky test ChakraCore/test/fieldopts/objtypespec-newobj-invalidation.1.js
3643         https://bugs.webkit.org/show_bug.cgi?id=162567
3644
3645         Reviewed by Saam Barati.
3646
3647         * ChakraCore.yaml:
3648
3649 2016-12-01  Keith Miller  <keith_miller@apple.com>
3650
3651         Add wasm int to floating point opcodes
3652         https://bugs.webkit.org/show_bug.cgi?id=165252
3653
3654         Reviewed by Geoffrey Garen.
3655
3656         Add tests for Wasm integral to floating point conversion opcodes.
3657
3658         * wasm/function-tests/int-to-floating-point.js: Added.
3659         * wasm/wasm.json:
3660
3661 2016-12-01  Geoffrey Garen  <ggaren@apple.com>
3662
3663         Land a test case for <rdar://problem/27889416>
3664         https://bugs.webkit.org/show_bug.cgi?id=165272
3665
3666         Reviewed by Saam Barati.
3667
3668         * stress/marked-argument-buffer.js: Added.
3669         (allocate):
3670         (test.o.toString):
3671         (test):
3672
3673 2016-11-29  Per Arne Vollan  <pvollan@apple.com>
3674
3675         [Win] Skip failing JSC tests.
3676         https://bugs.webkit.org/show_bug.cgi?id=165140
3677
3678         Reviewed by Mark Lam.
3679
3680         * ChakraCore.yaml:
3681         * microbenchmarks/tan.js:
3682
3683 2016-11-30  JF Bastien  <jfbastien@apple.com>
3684
3685         WebAssembly builder: don't throw when checker not implemented
3686         https://bugs.webkit.org/show_bug.cgi?id=165219
3687
3688         Reviewed by Mark Lam.
3689
3690         We should perform whichever checks we've implemented, and assume the rest are OK until bug #163421 is fixed.
3691
3692         * wasm/Builder.js:
3693         * wasm/README.md:
3694         * wasm/function-tests/add-12.js:
3695         * wasm/function-tests/br-if-loop-less-than.js:
3696         * wasm/function-tests/brTableAsIf.js:
3697         * wasm/function-tests/brTableManyValues.js:
3698         * wasm/function-tests/brTableWithLoop.js:
3699         * wasm/function-tests/dumb-eq-if-then-else.js:
3700         * wasm/function-tests/dumb-less-than-fallthrough.js:
3701         * wasm/function-tests/dumb-less-than-ite.js:
3702         * wasm/function-tests/eqz.js:
3703         * wasm/function-tests/factorial.js:
3704         * wasm/function-tests/float-sub.js:
3705         * wasm/function-tests/i32-load.js:
3706         * wasm/function-tests/i32-load8-s.js:
3707         * wasm/function-tests/if-then-else-fallthrough.js:
3708         * wasm/function-tests/if-then-fallthrough.js:
3709         * wasm/function-tests/loop-mult.js:
3710         * wasm/function-tests/loop-sum.js:
3711         * wasm/function-tests/max.js:
3712         * wasm/function-tests/min.js:
3713         * wasm/function-tests/ret5.js:
3714         * wasm/function-tests/select.js:
3715         * wasm/self-test/test_BuilderJSON.js:
3716
3717 2016-11-29  JF Bastien  <jfbastien@apple.com>
3718
3719         WebAssembly JS API: improve Instance
3720         https://bugs.webkit.org/show_bug.cgi?id=164757
3721
3722         Reviewed by Keith Miller.
3723
3724         An Instance's `exports` property wasn't populated with exports.
3725
3726         A follow-up patch will do imports.
3727
3728         A few things of note:
3729
3730          - LowLevelBinary: support 3-byte integers.
3731          - LowLevelBinary: support proper UTF-8 2003 code points (instead of UTF-16).
3732
3733         * wasm/Builder.js:
3734         * wasm/Builder_WebAssemblyBinary.js: wire up exports, stub other things out some more
3735         (const.emitters.Export):
3736         * wasm/LowLevelBinary.js:
3737         (export.default.LowLevelBinary.prototype.uint24): add, used for UTF-8
3738         (export.default.LowLevelBinary.prototype.string): support UTF-8