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