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