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