1 2017-03-15 Yusuke Suzuki <utatane.tea@gmail.com>
3 [DFG] ToString operation should have fixup for primitives to say this node does not have side effects
4 https://bugs.webkit.org/show_bug.cgi?id=169544
6 Reviewed by Saam Barati.
8 * microbenchmarks/template-string-array.js: Added.
10 * stress/to-string-non-cell-use.js: Added.
14 2017-03-13 Commit Queue <commit-queue@webkit.org>
16 Unreviewed, rolling out r213856.
17 https://bugs.webkit.org/show_bug.cgi?id=169562
19 Breaks JSC stress test stress/super-property-access.js.ftl-
20 eager failing (Requested by mlam|g on #webkit).
24 "FTL should not flush strict arguments unless it really needs
26 https://bugs.webkit.org/show_bug.cgi?id=169519
27 http://trac.webkit.org/changeset/213856
29 2017-03-11 Filip Pizlo <fpizlo@apple.com>
31 FTL should not flush strict arguments unless it really needs to
32 https://bugs.webkit.org/show_bug.cgi?id=169519
36 This benchmark runs 3.5x faster thanks to this patch.
38 * microbenchmarks/strict-arguments-no-escape.js: Added.
43 2017-03-13 Caio Lima <ticaiolima@gmail.com>
45 [JSC] It should be possible create a label named let when parsing Statement in non strict mode
46 https://bugs.webkit.org/show_bug.cgi?id=168684
48 Reviewed by Saam Barati.
50 * ChakraCore/test/LetConst/DeclOutofBlock.baseline-jsc:
52 2017-03-10 Saam Barati <sbarati@apple.com>
54 WebAssembly: Make more demos run
55 https://bugs.webkit.org/show_bug.cgi?id=165510
56 <rdar://problem/29760310>
58 Reviewed by Keith Miller.
61 (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
62 * wasm/js-api/wrapper-function.js: Added.
64 (return.new.WebAssembly.Module):
65 (assert.throws.makeInstance):
69 2017-03-10 Mark Lam <mark.lam@apple.com>
71 JSC: BindingNode::bindValue doesn't increase the scope's reference count.
72 https://bugs.webkit.org/show_bug.cgi?id=168546
73 <rdar://problem/30589551>
75 Reviewed by Saam Barati.
77 * stress/regress-168546.js: Added.
79 2017-03-09 Caio Lima <ticaiolima@gmail.com>
81 [ESnext] Implement Object Rest - Implementing Object Rest Destructuring
82 https://bugs.webkit.org/show_bug.cgi?id=167962
84 Reviewed by Keith Miller.
86 * stress/object-rest-deconstruct.js: Added.
88 (let.assertPropDescriptor):
96 2017-03-09 Saam Barati <sbarati@apple.com>
98 WebAssembly: Make the Unity AngryBots demo run
99 https://bugs.webkit.org/show_bug.cgi?id=169268
101 Reviewed by Keith Miller.
103 * wasm/function-tests/many-arguments-to-function.js: Added.
104 (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):
105 (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):
106 (i.instance.exports.f0):
107 (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):
108 (instance.exports.f0):
110 2017-03-08 Yusuke Suzuki <utatane.tea@gmail.com>
112 [GTK] JSC test stress/arity-check-ftl-throw.js.ftl-no-cjit-validate-sampling-profiler crashing on GTK bot
113 https://bugs.webkit.org/show_bug.cgi?id=160124
115 Reviewed by Mark Lam.
117 * stress/spread-forward-call-varargs-stack-overflow.js:
119 2017-03-06 Saam Barati <sbarati@apple.com>
121 WebAssembly: Implement the WebAssembly.instantiate API
122 https://bugs.webkit.org/show_bug.cgi?id=165982
123 <rdar://problem/29760110>
125 Reviewed by Keith Miller.
127 * wasm/js-api/web-assembly-instantiate.js: Added.
128 (assert.eq.async.test):
130 (assert.truthy.async.test):
133 2017-03-06 Saam Barati <sbarati@apple.com>
135 Unreviewed. Fix test expected error message.
137 * wasm/js-api/element.js:
140 2017-03-06 Caio Lima <ticaiolima@gmail.com>
142 op_get_by_id_with_this should use inline caching
143 https://bugs.webkit.org/show_bug.cgi?id=162124
145 Reviewed by Saam Barati.
147 * microbenchmarks/super-getter.js: Added.
152 * stress/super-force-ic-fail.js: Added.
158 * stress/super-get-by-id.js: Added.
161 (Base.prototype.get name):
162 (Base.prototype.set name):
163 (Subclass.prototype.get name):
167 (PolymorphicSubclass.prototype.get value):
168 (PolymorphicSubclass):
171 (MegamorphicSubclass.prototype.get value):
172 (MegamorphicSubclass):
173 (let.subObj.get value):
177 (BaseException.prototype.get name):
178 (SubclassException.prototype.get name):
181 (prototype.get name):
182 (SubclassExceptionComplex.prototype.get name):
183 (SubclassExceptionComplex):
184 * stress/super-getter-reset-ic.js: Added.
188 2017-03-06 Saam Barati <sbarati@apple.com>
190 WebAssembly: implement init_expr for Element
191 https://bugs.webkit.org/show_bug.cgi?id=165888
192 <rdar://problem/29760199>
194 Reviewed by Keith Miller.
196 * wasm/Builder_WebAssemblyBinary.js:
197 (const.emitters.Element):
199 * wasm/js-api/element.js:
201 (badInstantiation.makeModule):
202 (badInstantiation.test):
204 * wasm/js-api/global-error.js:
206 2017-03-06 Carlos Alberto Lopez Perez <clopez@igalia.com>
208 [JSC] [Linux] Test stress/spread-forward-call-varargs-stack-overflow.js fails
209 https://bugs.webkit.org/show_bug.cgi?id=169206
211 Unreviewed test gardening.
213 * stress/spread-forward-call-varargs-stack-overflow.js: Skip on Linux platforms.
215 2017-03-06 Yusuke Suzuki <utatane.tea@gmail.com>
217 [JSC] Allow indexed module namespace object fields
218 https://bugs.webkit.org/show_bug.cgi?id=168870
220 Reviewed by Saam Barati.
222 * wasm/spec-tests/names.wast.js:
224 2017-03-06 Yusuke Suzuki <utatane.tea@gmail.com>
226 Null pointer crash when loading module with unresolved import also as a script file
227 https://bugs.webkit.org/show_bug.cgi?id=168971
229 Reviewed by Saam Barati.
231 * stress/re-execute-error-module.js: Added.
234 * stress/resources/error-module.js: Added.
236 2017-03-02 Keith Miller <keith_miller@apple.com>
238 WebAssemblyFunction should have Function.prototype as its prototype
239 https://bugs.webkit.org/show_bug.cgi?id=169101
241 Reviewed by Filip Pizlo.
243 * wasm/js-api/web-assembly-function.js: Added.
245 2017-02-28 Oleksandr Skachkov <gskachkov@gmail.com>
247 Use of arguments in arrow function is slow
248 https://bugs.webkit.org/show_bug.cgi?id=168829
250 Reviewed by Saam Barati.
252 * microbenchmarks/arrowfunciton-direct-arguments.js: Added.
254 * microbenchmarks/arrowfunciton-reference-arguments.js: Added.
257 2017-02-27 Commit Queue <commit-queue@webkit.org>
259 Unreviewed, rolling out r213019.
260 https://bugs.webkit.org/show_bug.cgi?id=168925
262 "It broke 32-bit jsc tests in debug builds" (Requested by
263 saamyjoon on #webkit).
267 "op_get_by_id_with_this should use inline caching"
268 https://bugs.webkit.org/show_bug.cgi?id=162124
269 http://trac.webkit.org/changeset/213019
271 2017-02-27 JF Bastien <jfbastien@apple.com>
273 WebAssembly: miscellaneous spec fixes part deux
274 https://bugs.webkit.org/show_bug.cgi?id=168861
276 Reviewed by Keith Miller.
278 * wasm.yaml: more passing tests
279 * wasm/Builder.js: use a Map instead of an Object for the function
280 index space, because Number entries such as 0 were colliding with
281 string entries such as "0". This in turn requires some hashing of
282 objects which are inserted, because Map uses Object's insertion
283 order when comparing.
284 (export.default.Builder):
285 (export.default.Builder.prototype._functionIndexSpaceKeyHash):
286 (export.default.Builder.prototype._registerFunctionToIndexSpace):
287 (export.default.Builder.prototype._getFunctionFromIndexSpace):
288 * wasm/js-api/test_Instance.js: add a FIXME test
289 * wasm/spec-tests/memory.wast.js:
291 * wasm/spec-tests/names.wast.js:
293 2017-02-26 Caio Lima <ticaiolima@gmail.com>
295 op_get_by_id_with_this should use inline caching
296 https://bugs.webkit.org/show_bug.cgi?id=162124
298 Reviewed by Saam Barati.
300 * microbenchmarks/super-getter.js: Added.
305 * stress/super-force-ic-fail.js: Added.
311 * stress/super-get-by-id.js: Added.
314 (Base.prototype.get name):
315 (Base.prototype.set name):
316 (Subclass.prototype.get name):
320 (PolymorphicSubclass.prototype.get value):
321 (PolymorphicSubclass):
324 (MegamorphicSubclass.prototype.get value):
325 (MegamorphicSubclass):
326 (let.subObj.get value):
330 (BaseException.prototype.get name):
331 (SubclassException.prototype.get name):
334 (prototype.get name):
335 (SubclassExceptionComplex.prototype.get name):
336 (SubclassExceptionComplex):
337 * stress/super-getter-reset-ic.js: Added.
341 2017-02-24 JF Bastien <jfbastien@apple.com>
343 WebAssembly: miscellaneous spec fixes
344 https://bugs.webkit.org/show_bug.cgi?id=168822
346 Reviewed by Saam Barati.
348 * wasm.yaml: mark some skip tests as normal, now that they pass
349 * wasm/Builder.js: error message was wrong, causing extra error if hit
350 * wasm/js-api/global-error.js: new tests
352 * wasm/spec-tests/call.wast.js: comment out stack check tests
353 * wasm/spec-tests/call_indirect.wast.js: comment out stack check tests
354 * wasm/spec-tests/fac.wast.js: comment out stack check tests
355 * wasm/spec-tests/float_exprs.wast.js: wabt is wrong, bug reported, we should update
356 * wasm/spec-tests/imports.wast.js: bug in old wabt, fixed in recent wabt
359 2017-02-23 Saam Barati <sbarati@apple.com>
361 Intrinsicify parseInt
362 https://bugs.webkit.org/show_bug.cgi?id=168627
364 Reviewed by Filip Pizlo.
366 * stress/parse-int-intrinsic.js: Added.
368 (testIntrinsic.let.s):
370 (testIntrinsic2.baz):
372 (testIntrinsic3.foo):
374 (testIntrinsic4.foo):
376 (testIntrinsic5.foo):
378 (testIntrinsic6.foo):
380 (testIntrinsic7.foo):
383 2017-02-23 JF Bastien <jfbastien@apple.com>
385 WebAssembly: support 0x1 version
386 https://bugs.webkit.org/show_bug.cgi?id=168672
388 Reviewed by Keith Miller.
390 Update the version number for all the tests. Note that the spec
391 tests are only updated with a new version number because spec+wabt
392 aren't ready for 0x1 yet. This is tracked by bug #168784.
394 * wasm/import-spec-tests.rb: use the new spec repository layout
395 * wasm/js-api/test_basic_api.js:
396 * wasm/self-test/test_BuilderWebAssembly.js:
399 * wasm/spec-tests/address.wast.js:
400 * wasm/spec-tests/binary.wast.js:
401 * wasm/spec-tests/block.wast.js:
402 * wasm/spec-tests/br.wast.js:
403 * wasm/spec-tests/br_if.wast.js:
404 * wasm/spec-tests/br_table.wast.js:
405 * wasm/spec-tests/break-drop.wast.js:
406 * wasm/spec-tests/call.wast.js:
407 * wasm/spec-tests/call_indirect.wast.js:
408 * wasm/spec-tests/comments.wast.js:
409 * wasm/spec-tests/conversions.wast.js:
410 * wasm/spec-tests/custom_section.wast.js:
411 * wasm/spec-tests/endianness.wast.js:
412 * wasm/spec-tests/exports.wast.js:
413 * wasm/spec-tests/f32.wast.js:
414 * wasm/spec-tests/f32_cmp.wast.js:
415 * wasm/spec-tests/f64.wast.js:
416 * wasm/spec-tests/f64_cmp.wast.js:
417 * wasm/spec-tests/fac.wast.js:
418 * wasm/spec-tests/float_exprs.wast.js:
419 * wasm/spec-tests/float_literals.wast.js:
420 * wasm/spec-tests/float_memory.wast.js:
421 * wasm/spec-tests/float_misc.wast.js:
422 * wasm/spec-tests/forward.wast.js:
423 * wasm/spec-tests/func.wast.js:
424 * wasm/spec-tests/func_ptrs.wast.js:
425 * wasm/spec-tests/get_local.wast.js:
426 * wasm/spec-tests/globals.wast.js:
427 * wasm/spec-tests/i32.wast.js:
428 * wasm/spec-tests/i64.wast.js:
429 * wasm/spec-tests/imports.wast.js:
430 * wasm/spec-tests/int_exprs.wast.js:
431 * wasm/spec-tests/int_literals.wast.js:
432 * wasm/spec-tests/left-to-right.wast.js:
433 * wasm/spec-tests/linking.wast.js:
434 * wasm/spec-tests/loop.wast.js:
435 * wasm/spec-tests/memory.wast.js:
436 * wasm/spec-tests/memory_redundancy.wast.js:
437 * wasm/spec-tests/memory_trap.wast.js:
438 * wasm/spec-tests/names.wast.js:
439 * wasm/spec-tests/nop.wast.js:
440 * wasm/spec-tests/resizing.wast.js:
441 * wasm/spec-tests/return.wast.js:
442 * wasm/spec-tests/select.wast.js:
443 * wasm/spec-tests/set_local.wast.js:
444 * wasm/spec-tests/skip-stack-guard-page.wast.js:
445 * wasm/spec-tests/stack.wast.js:
446 * wasm/spec-tests/start.wast.js:
447 * wasm/spec-tests/store_retval.wast.js:
448 * wasm/spec-tests/switch.wast.js:
449 * wasm/spec-tests/tee_local.wast.js:
450 * wasm/spec-tests/traps.wast.js:
451 * wasm/spec-tests/typecheck.wast.js:
452 * wasm/spec-tests/unreachable.wast.js:
453 * wasm/spec-tests/unwind.wast.js:
456 2017-02-22 Yusuke Suzuki <utatane.tea@gmail.com>
458 JSModuleNamespace object should have IC
459 https://bugs.webkit.org/show_bug.cgi?id=160590
461 Reviewed by Saam Barati.
463 * modules/module-assert-access-binding.js: Added.
464 * modules/module-assert-access-namespace.js: Added.
465 * modules/namespace-empty.js: Added.
466 (from.string_appeared_here.access):
468 * stress/module-namespace-access-change.js: Added.
471 (import.string_appeared_here.then):
472 * stress/module-namespace-access-non-constant.js: Added.
474 (import.string_appeared_here.then):
475 * stress/module-namespace-access-poly.js: Added.
478 (import.string_appeared_here.then):
479 * stress/module-namespace-access-transitive-exports.js: Added.
481 (import.string_appeared_here.then):
482 * stress/module-namespace-access.js: Added.
484 (import.string_appeared_here.then):
485 * stress/resources/module-namespace-access-transitive-exports-2.js: Added.
488 * stress/resources/module-namespace-access-transitive-exports.js: Added.
489 * stress/resources/module-namespace-access.js: Added.
493 2017-02-20 Filip Pizlo <fpizlo@apple.com>
495 The collector thread should only start when the mutator doesn't have heap access
496 https://bugs.webkit.org/show_bug.cgi?id=167737
498 Reviewed by Keith Miller.
500 Add versions of splay that flash heap access, to simulate what might happen if a third-party app
501 was running concurrent GC. In this case, we might actually start the collector thread.
503 * stress/splay-flash-access-1ms.js: Added.
505 (this.Setup.setup.setup):
506 (this.TearDown.tearDown.tearDown):
509 (BenchmarkResult.prototype.valueOf):
513 (BenchmarkSuite.ResetRNG):
515 (BenchmarkSuite.RunSuites):
516 (BenchmarkSuite.CountBenchmarks):
517 (BenchmarkSuite.GeometricMean):
518 (BenchmarkSuite.GeometricMeanTime):
519 (BenchmarkSuite.AverageAbovePercentile):
520 (BenchmarkSuite.GeometricMeanLatency):
521 (BenchmarkSuite.FormatScore):
522 (BenchmarkSuite.prototype.NotifyStep):
523 (BenchmarkSuite.prototype.NotifyResult):
524 (BenchmarkSuite.prototype.NotifyError):
525 (BenchmarkSuite.prototype.RunSingleBenchmark):
529 (BenchmarkSuite.prototype.RunStep):
530 (GeneratePayloadTree):
538 (SplayTree.prototype.isEmpty):
539 (SplayTree.prototype.insert):
540 (SplayTree.prototype.remove):
541 (SplayTree.prototype.find):
542 (SplayTree.prototype.findMax):
543 (SplayTree.prototype.findGreatestLessThan):
544 (SplayTree.prototype.exportKeys):
545 (SplayTree.prototype.splay_):
547 (SplayTree.Node.prototype.traverse_):
551 (averageAbovePercentile):
553 * stress/splay-flash-access.js: Added.
555 (this.Setup.setup.setup):
556 (this.TearDown.tearDown.tearDown):
559 (BenchmarkResult.prototype.valueOf):
563 (BenchmarkSuite.ResetRNG):
565 (BenchmarkSuite.RunSuites):
566 (BenchmarkSuite.CountBenchmarks):
567 (BenchmarkSuite.GeometricMean):
568 (BenchmarkSuite.GeometricMeanTime):
569 (BenchmarkSuite.AverageAbovePercentile):
570 (BenchmarkSuite.GeometricMeanLatency):
571 (BenchmarkSuite.FormatScore):
572 (BenchmarkSuite.prototype.NotifyStep):
573 (BenchmarkSuite.prototype.NotifyResult):
574 (BenchmarkSuite.prototype.NotifyError):
575 (BenchmarkSuite.prototype.RunSingleBenchmark):
579 (BenchmarkSuite.prototype.RunStep):
580 (GeneratePayloadTree):
588 (SplayTree.prototype.isEmpty):
589 (SplayTree.prototype.insert):
590 (SplayTree.prototype.remove):
591 (SplayTree.prototype.find):
592 (SplayTree.prototype.findMax):
593 (SplayTree.prototype.findGreatestLessThan):
594 (SplayTree.prototype.exportKeys):
595 (SplayTree.prototype.splay_):
597 (SplayTree.Node.prototype.traverse_):
601 (averageAbovePercentile):
604 2017-02-21 Ryan Haddad <ryanhaddad@apple.com>
606 Unreviewed, rolling out r212712.
608 This change broke the CLoop build.
612 "JSModuleNamespace object should have IC"
613 https://bugs.webkit.org/show_bug.cgi?id=160590
614 http://trac.webkit.org/changeset/212712
616 2017-02-21 Yusuke Suzuki <utatane.tea@gmail.com>
618 JSModuleNamespace object should have IC
619 https://bugs.webkit.org/show_bug.cgi?id=160590
621 Reviewed by Saam Barati.
623 * modules/module-assert-access-binding.js: Added.
624 * modules/module-assert-access-namespace.js: Added.
625 * modules/namespace-empty.js: Added.
626 (from.string_appeared_here.access):
628 * stress/module-namespace-access-change.js: Added.
631 (import.string_appeared_here.then):
632 * stress/module-namespace-access-non-constant.js: Added.
634 (import.string_appeared_here.then):
635 * stress/module-namespace-access-poly.js: Added.
638 (import.string_appeared_here.then):
639 * stress/module-namespace-access-transitive-exports.js: Added.
641 (import.string_appeared_here.then):
642 * stress/module-namespace-access.js: Added.
644 (import.string_appeared_here.then):
645 * stress/resources/module-namespace-access-transitive-exports-2.js: Added.
648 * stress/resources/module-namespace-access-transitive-exports.js: Added.
649 * stress/resources/module-namespace-access.js: Added.
653 2017-02-21 Yusuke Suzuki <utatane.tea@gmail.com>
655 ASSERTION FAILED: "!scope.exception()" with Object.isSealed/isFrozen and uninitialized module bindings
656 https://bugs.webkit.org/show_bug.cgi?id=168605
658 Reviewed by Saam Barati.
660 * modules/module-namespace-is-frozen.js: Added.
661 (from.string_appeared_here.shouldThrow):
663 * modules/module-namespace-is-sealed.js: Added.
664 (from.string_appeared_here.shouldThrow):
667 2017-02-19 Commit Queue <commit-queue@webkit.org>
669 Unreviewed, rolling out r212466.
670 https://bugs.webkit.org/show_bug.cgi?id=168577
672 causes crashes on AArch64 on linux, maybe it's causing crashes
673 on iOS too (Requested by pizlo on #webkit).
677 "The collector thread should only start when the mutator
678 doesn't have heap access"
679 https://bugs.webkit.org/show_bug.cgi?id=167737
680 http://trac.webkit.org/changeset/212466
682 2017-02-10 Filip Pizlo <fpizlo@apple.com>
684 The collector thread should only start when the mutator doesn't have heap access
685 https://bugs.webkit.org/show_bug.cgi?id=167737
687 Reviewed by Keith Miller.
689 Add versions of splay that flash heap access, to simulate what might happen if a third-party app
690 was running concurrent GC. In this case, we might actually start the collector thread.
692 * stress/splay-flash-access-1ms.js: Added.
694 (this.Setup.setup.setup):
695 (this.TearDown.tearDown.tearDown):
698 (BenchmarkResult.prototype.valueOf):
702 (BenchmarkSuite.ResetRNG):
704 (BenchmarkSuite.RunSuites):
705 (BenchmarkSuite.CountBenchmarks):
706 (BenchmarkSuite.GeometricMean):
707 (BenchmarkSuite.GeometricMeanTime):
708 (BenchmarkSuite.AverageAbovePercentile):
709 (BenchmarkSuite.GeometricMeanLatency):
710 (BenchmarkSuite.FormatScore):
711 (BenchmarkSuite.prototype.NotifyStep):
712 (BenchmarkSuite.prototype.NotifyResult):
713 (BenchmarkSuite.prototype.NotifyError):
714 (BenchmarkSuite.prototype.RunSingleBenchmark):
718 (BenchmarkSuite.prototype.RunStep):
719 (GeneratePayloadTree):
727 (SplayTree.prototype.isEmpty):
728 (SplayTree.prototype.insert):
729 (SplayTree.prototype.remove):
730 (SplayTree.prototype.find):
731 (SplayTree.prototype.findMax):
732 (SplayTree.prototype.findGreatestLessThan):
733 (SplayTree.prototype.exportKeys):
734 (SplayTree.prototype.splay_):
736 (SplayTree.Node.prototype.traverse_):
740 (averageAbovePercentile):
742 * stress/splay-flash-access.js: Added.
744 (this.Setup.setup.setup):
745 (this.TearDown.tearDown.tearDown):
748 (BenchmarkResult.prototype.valueOf):
752 (BenchmarkSuite.ResetRNG):
754 (BenchmarkSuite.RunSuites):
755 (BenchmarkSuite.CountBenchmarks):
756 (BenchmarkSuite.GeometricMean):
757 (BenchmarkSuite.GeometricMeanTime):
758 (BenchmarkSuite.AverageAbovePercentile):
759 (BenchmarkSuite.GeometricMeanLatency):
760 (BenchmarkSuite.FormatScore):
761 (BenchmarkSuite.prototype.NotifyStep):
762 (BenchmarkSuite.prototype.NotifyResult):
763 (BenchmarkSuite.prototype.NotifyError):
764 (BenchmarkSuite.prototype.RunSingleBenchmark):
768 (BenchmarkSuite.prototype.RunStep):
769 (GeneratePayloadTree):
777 (SplayTree.prototype.isEmpty):
778 (SplayTree.prototype.insert):
779 (SplayTree.prototype.remove):
780 (SplayTree.prototype.find):
781 (SplayTree.prototype.findMax):
782 (SplayTree.prototype.findGreatestLessThan):
783 (SplayTree.prototype.exportKeys):
784 (SplayTree.prototype.splay_):
786 (SplayTree.Node.prototype.traverse_):
790 (averageAbovePercentile):
793 2017-02-16 Yusuke Suzuki <utatane.tea@gmail.com>
795 [JSC] Update module namespace object according to the latest ECMA262
796 https://bugs.webkit.org/show_bug.cgi?id=168280
798 Reviewed by Saam Barati.
800 * modules/namespace-object-symbol-iterator-name.js:
801 * modules/namespace-object-typed-array-fast-path.js:
802 * modules/namespace.js:
803 (shouldBe.JSON.stringify.Reflect.getOwnPropertyDescriptor):
806 2017-02-11 Yusuke Suzuki <utatane.tea@gmail.com>
808 [JSC] Implement (Shared)ArrayBuffer.prototype.byteLength
809 https://bugs.webkit.org/show_bug.cgi?id=166476
811 Reviewed by Saam Barati.
813 * ChakraCore/test/typedarray/arraybufferType.baseline-jsc:
814 * stress/array-buffer-byte-length.js: Added.
818 * stress/reflect-set.js:
820 2017-02-10 Saam Barati <sbarati@apple.com>
822 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
823 https://bugs.webkit.org/show_bug.cgi?id=168140
824 <rdar://problem/30205880>
826 Reviewed by Filip Pizlo.
828 * stress/allocation-sinking-puthint-control-flow.js: Added.
837 2017-02-09 Mark Lam <mark.lam@apple.com>
839 B3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
840 https://bugs.webkit.org/show_bug.cgi?id=167437
841 <rdar://problem/30198083>
843 Reviewed by Filip Pizlo.
845 * stress/b3-delete-orphans-should-neutralize-upsilons-with-dead-phis.js: Added.
847 2017-02-09 Saam Barati <sbarati@apple.com>
849 Sloppy mode: We don't properly hoist functions names "arguments" when we have a non-simple parameter list
850 https://bugs.webkit.org/show_bug.cgi?id=167319
851 <rdar://problem/30149432>
853 Reviewed by Mark Lam.
855 * stress/sloppy-mode-hoist-arguments-function-non-simple-parameter-list.js: Added.
863 2017-02-09 Mark Lam <mark.lam@apple.com>
865 Fix max length check in ArrayPrototype.js' concatSlowPath().
866 https://bugs.webkit.org/show_bug.cgi?id=167270
867 <rdar://problem/30128133>
869 Reviewed by Filip Pizlo.
871 * stress/array-prototype-concat-of-long-spliced-arrays.js: Added.
872 * stress/array-prototype-concat-of-long-spliced-arrays2.js: Added.
874 2017-02-09 Keith Miller <keith_miller@apple.com>
876 We should not allow Function.caller to be used on native functions
877 https://bugs.webkit.org/show_bug.cgi?id=165628
879 Reviewed by Mark Lam.
881 * stress/caller-native-code.js: Added.
884 2017-02-04 Yusuke Suzuki <utatane.tea@gmail.com>
886 [JSC] Add operationToInt32SensibleSlow to optimize kraken pbkdf2 and sha256
887 https://bugs.webkit.org/show_bug.cgi?id=167736
889 Reviewed by Saam Barati.
891 * stress/to-int32-sensible.js: Added.
896 2017-02-01 Yusuke Suzuki <utatane.tea@gmail.com>
898 Unreviewed, remove loop
899 https://bugs.webkit.org/show_bug.cgi?id=167694
902 Original bug can be tested even without this loop.
904 * stress/arity-fixup-should-not-touch-stack-area-below-sp.js:
906 2017-02-01 Yusuke Suzuki <utatane.tea@gmail.com>
908 ArityFixup should adjust SP first
909 https://bugs.webkit.org/show_bug.cgi?id=167239
911 Reviewed by Michael Saboff.
913 Significantly large arity fixup reliably causes this crash.
915 * stress/arity-fixup-should-not-touch-stack-area-below-sp.js: Added.
917 2017-01-31 Filip Pizlo <fpizlo@apple.com>
919 Move slow-running microbenchmarks out of JSTests/microbenchmarks
920 https://bugs.webkit.org/show_bug.cgi?id=167676
922 Reviewed by Saam Barati.
924 The microbenchmarks directory is profitable when it's cheap to run. This change moves very slow
925 tests (>=200ms running time on my machine) and puts them in JSTests/slowMicrobenchmarks instead.
926 That directory is run only through `slow!; defaultQuickRun` and is not run by run-jsc-benchmarks.
927 This is a big progression in test running time. But because it frontloads more slow tests, the
928 tests will seem to run more slowly when you first start the test runner.
930 * microbenchmarks/default-derived-constructor.js: Removed.
931 * microbenchmarks/dense-set.js: Removed.
932 * microbenchmarks/ftl-polymorphic-div.js: Removed.
933 * microbenchmarks/ftl-polymorphic-mul.js: Removed.
934 * microbenchmarks/function-bind-inlining.js: Removed.
935 * microbenchmarks/function-bind-no-inlining.js: Removed.
936 * microbenchmarks/large-map-iteration-with-additions.js: Removed.
937 * microbenchmarks/large-map-iteration-with-mutation.js: Removed.
938 * microbenchmarks/map-get-get-cse.js: Removed.
939 * microbenchmarks/misc-bugs-847389-jpeg2000.js: Removed.
940 * microbenchmarks/spread-small-array.js: Removed.
941 * microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Removed.
942 * slowMicrobenchmarks: Added.
943 * slowMicrobenchmarks.yaml: Added.
944 * slowMicrobenchmarks/README: Added.
945 * slowMicrobenchmarks/default-derived-constructor.js: Copied from JSTests/microbenchmarks/default-derived-constructor.js.
946 * slowMicrobenchmarks/dense-set.js: Copied from JSTests/microbenchmarks/dense-set.js.
947 * slowMicrobenchmarks/ftl-polymorphic-div.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-div.js.
948 * slowMicrobenchmarks/ftl-polymorphic-mul.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-mul.js.
949 * slowMicrobenchmarks/function-bind-inlining.js: Copied from JSTests/microbenchmarks/function-bind-inlining.js.
950 * slowMicrobenchmarks/function-bind-no-inlining.js: Copied from JSTests/microbenchmarks/function-bind-no-inlining.js.
951 * slowMicrobenchmarks/large-map-iteration-with-additions.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-additions.js.
952 * slowMicrobenchmarks/large-map-iteration-with-mutation.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-mutation.js.
953 * slowMicrobenchmarks/map-get-get-cse.js: Copied from JSTests/microbenchmarks/map-get-get-cse.js.
954 * slowMicrobenchmarks/misc-bugs-847389-jpeg2000.js: Copied from JSTests/microbenchmarks/misc-bugs-847389-jpeg2000.js.
955 * slowMicrobenchmarks/spread-small-array.js: Copied from JSTests/microbenchmarks/spread-small-array.js.
956 * slowMicrobenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Copied from JSTests/microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js.
958 2017-01-30 Yusuke Suzuki <utatane.tea@gmail.com>
960 [JSC] Do not reject WebAssembly.compile() with Exception
961 https://bugs.webkit.org/show_bug.cgi?id=167585
963 Reviewed by Mark Lam.
965 * wasm/js-api/Module-compile.js:
966 (async.testPromiseAPI):
968 2017-01-27 Yusuke Suzuki <utatane.tea@gmail.com>
970 Lift template escape sequence restrictions in tagged templates
971 https://bugs.webkit.org/show_bug.cgi?id=166871
973 Reviewed by Saam Barati.
975 Update the error messages and add new tests.
977 * ChakraCore/test/es6/unicode_6_identifier_Blue524737.baseline-jsc:
978 * stress/lift-template-literal.js: Added.
980 (testTag.return.tag):
982 * stress/template-literal-syntax.js:
984 2017-01-26 Mark Lam <mark.lam@apple.com>
986 Fix missing exception check in genericTypedArrayViewProtoFuncSet().
987 https://bugs.webkit.org/show_bug.cgi?id=166812
988 <rdar://problem/29916672>
990 Reviewed by Saam Barati.
992 * stress/regress-166812.js: Added.
994 2017-01-26 Commit Queue <commit-queue@webkit.org>
996 Unreviewed, rolling out r211224.
997 https://bugs.webkit.org/show_bug.cgi?id=167479
999 "It was a Kraken performance regression" (Requested by
1000 saamyjoon on #webkit).
1004 "OSR entry: delay outer-loop compilation when at inner-loop"
1005 https://bugs.webkit.org/show_bug.cgi?id=167149
1006 http://trac.webkit.org/changeset/211224
1008 2017-01-26 JF Bastien <jfbastien@apple.com>
1010 OSR entry: delay outer-loop compilation when at inner-loop
1011 https://bugs.webkit.org/show_bug.cgi?id=167149
1013 Reviewed by Filip Pizlo.
1015 Try to be mean to OSR entry by using nested loops, and having
1016 non-int32 types or truly varying types.
1018 Mandelbrot currently never tiers up to FTL because it exits too
1019 many times before this. That shouldn't happen because it's just
1020 numbers and int32s. I'll file a bug to fix this.
1022 * microbenchmarks/mandelbrot.js: Added.
1025 * microbenchmarks/nonude.js: Added.
1026 (Array.prototype.remove):
1032 2017-01-25 Saam Barati <sbarati@apple.com>
1034 WebAssembly JS API: coerce return values from imports
1035 https://bugs.webkit.org/show_bug.cgi?id=165480
1036 <rdar://problem/29760318>
1038 Reviewed by Yusuke Suzuki.
1040 * wasm/function-tests/function-import-return-value.js: Added.
1041 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.x.assert.eq):
1042 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.Math.fround):
1043 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.let.type.of.Reflect.ownKeys):
1048 2017-01-25 Filip Pizlo <fpizlo@apple.com>
1050 jsc.cpp should have the $.agent stuff for testing SAB
1051 https://bugs.webkit.org/show_bug.cgi?id=167431
1053 Reviewed by Saam Barati.
1055 Add a very basic test of Atomics using $.agent. This is based on
1056 LayoutTests/workers/sab/simple.html.
1058 * stress/lars-sab-workers.js: Added.
1064 2017-01-24 Filip Pizlo <fpizlo@apple.com>
1066 Atomics.store should return the int-converted value according to toInteger
1067 https://bugs.webkit.org/show_bug.cgi?id=167399
1069 Reviewed by Saam Barati.
1071 * stress/atomics-add-uint32.js: Added.
1072 * stress/atomics-store-return.js: Fix the test to match what the spec wants.
1074 2017-01-24 Yusuke Suzuki <utatane.tea@gmail.com>
1076 [JSC] Optimize Number#toString with Int52
1077 https://bugs.webkit.org/show_bug.cgi?id=167303
1079 Reviewed by Sam Weinig.
1081 * stress/to-string-with-int52.js: Added.
1084 2017-01-24 Filip Pizlo <fpizlo@apple.com>
1086 Atomics.store should return the int-converted value, not the value that it stored
1087 https://bugs.webkit.org/show_bug.cgi?id=167395
1089 Reviewed by Saam Barati.
1091 * stress/atomics-store-return.js: Added.
1093 2017-01-24 Filip Pizlo <fpizlo@apple.com>
1095 -0 is a valid array index and AtomicsObject should know this
1096 https://bugs.webkit.org/show_bug.cgi?id=167386
1098 Reviewed by Mark Lam.
1100 * stress/atomics-neg-zero.js: Added.
1102 2017-01-23 Saam Barati <sbarati@apple.com>
1104 https://bugs.webkit.org/show_bug.cgi?id=167247
1105 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
1106 <rdar://problem/30121809>
1108 Reviewed by Filip Pizlo.
1110 * stress/spread-consults-correct-global-object.js: Added.
1113 * stress/spread-correct-global-object-on-exception.js: Added.
1116 (const.objectText.let.o.Symbol.iterator):
1119 2017-01-21 Yusuke Suzuki <utatane.tea@gmail.com>
1121 dynamic import is ambiguous with import declaration at module code
1122 https://bugs.webkit.org/show_bug.cgi?id=167098
1124 Reviewed by Darin Adler.
1126 * modules/import-call.js: Added.
1127 (from.string_appeared_here.import.string_appeared_here.then):
1128 * modules/import-call/main.js: Added.
1129 * stress/import-syntax.js:
1132 2017-01-19 Skachkov Oleksandr <gskachkov@gmail.com>
1134 "this" missing after await in async arrow function
1135 https://bugs.webkit.org/show_bug.cgi?id=166919
1137 Reviewed by Saam Barati.
1139 * stress/async-arrow-functions-lexical-binding-in-class.js:
1140 (ChildClass.prototype.asyncThisPropWithAwaitBody):
1141 (ChildClass.prototype.asyncThisPropInEvalWithAwaitBody):
1142 (ChildClass.prototype.asyncThisValueBodyWithAwait):
1143 (ChildClass.prototype.asyncThisValueInEvalWithAwaitBody):
1146 (ChildClass3.prototype.classValue):
1147 (ChildClass3.prototype.get classProperty):
1148 * stress/async-arrow-functions-lexical-new.target-binding.js:
1151 2017-01-16 Filip Pizlo <fpizlo@apple.com>
1153 Make opaque root scanning truly constraint-based
1154 https://bugs.webkit.org/show_bug.cgi?id=165760
1156 Reviewed by Geoffrey Garen.
1158 Added this test, which demonstrates the benefit of having a dedicated string subspace.
1160 * microbenchmarks/stringalloc.js: Added.
1162 2017-01-17 Michael Saboff <msaboff@apple.com>
1164 Nested parenthesized regular expressions with non-zero minimum counts appear to hang and use lots of memory
1165 https://bugs.webkit.org/show_bug.cgi?id=167125
1167 Reviewed by Filip Pizlo.
1169 * microbenchmarks/regexp-nested-nonzero-min-counted-parens.js: Added.
1170 New test with limits that run slow and take a reasonable amount of memory
1171 before the change and run fast, using little memory with the change.
1173 2017-01-14 Yusuke Suzuki <utatane.tea@gmail.com>
1175 Annotate large string tests with largeHeap
1176 https://bugs.webkit.org/show_bug.cgi?id=167054
1178 Reviewed by Filip Pizlo.
1180 * microbenchmarks/dense-set.js:
1181 * microbenchmarks/lots-of-fields.js:
1182 * stress/joined-strings-should-not-exceed-max-string-length.js:
1183 * stress/make-large-string-jit-strcat.js:
1184 * stress/make-large-string-jit.js:
1185 * stress/make-large-string-strcat.js:
1186 * stress/make-large-string.js:
1187 * stress/string-joining-long-strings-should-not-crash.js:
1188 * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
1190 2017-01-14 Yusuke Suzuki <utatane.tea@gmail.com>
1192 Reserve capacity for StringBuilder in unescape
1193 https://bugs.webkit.org/show_bug.cgi?id=167008
1195 Reviewed by Sam Weinig.
1197 * stress/unescape.js: Added.
1200 2017-01-12 Saam Barati <sbarati@apple.com>
1202 Add a slice intrinsic to the DFG/FTL
1203 https://bugs.webkit.org/show_bug.cgi?id=166707
1204 <rdar://problem/29913445>
1206 Reviewed by Filip Pizlo.
1208 * stress/array-slice-intrinsic.js: Added.
1213 * stress/array-slice-jettison-on-constructor-change.js: Added.
1217 (addRandomProperties):
1219 * stress/array-slice-osr-exit-2.js: Added.
1225 (addRandomProperties):
1227 * stress/array-slice-osr-exit.js: Added.
1233 (addRandomProperties):
1236 2017-01-11 Ryan Haddad <ryanhaddad@apple.com>
1238 Mark es6/typed_arrays_correct_prototype_chains.js as failing after r210570.
1239 https://bugs.webkit.org/show_bug.cgi?id=166931i
1241 Unreviewed test gardening.
1245 2017-01-10 Commit Queue <commit-queue@webkit.org>
1247 Unreviewed, rolling out r210052.
1248 https://bugs.webkit.org/show_bug.cgi?id=166915
1250 "breaks web compatability" (Requested by keith_miller on
1255 "Add support for global"
1256 https://bugs.webkit.org/show_bug.cgi?id=165171
1257 http://trac.webkit.org/changeset/210052
1259 2017-01-10 Mark Lam <mark.lam@apple.com>
1261 Property setters should not be called for bound arguments list entries.
1262 https://bugs.webkit.org/show_bug.cgi?id=165631
1264 Reviewed by Filip Pizlo.
1266 * stress/property-setters-should-not-be-called-for-bound-arguments-list-entries.js: Added.
1268 2017-01-10 Skachkov Oleksandr <gskachkov@gmail.com>
1270 Calling async arrow function which is in a class's member function will cause error
1271 https://bugs.webkit.org/show_bug.cgi?id=166879
1273 Reviewed by Saam Barati.
1275 * stress/async-arrow-functions-lexical-binding-in-class.js: Added.
1278 (BaseClass.prototype.baseClassValue):
1279 (BaseClass.prototype.get property):
1282 (ChildClass.prototype.classValue):
1283 (ChildClass.prototype.get classProperty):
1284 (ChildClass.prototype.asyncValueExp):
1285 (ChildClass.prototype.asyncValueBody):
1286 (ChildClass.prototype.asyncThisPropExp):
1287 (ChildClass.prototype.asyncThisPropBody):
1288 (ChildClass.prototype.asyncThisPropInEvalExp):
1289 (ChildClass.prototype.asyncThisPropInEvalBody):
1290 (ChildClass.prototype.asyncThisValueExp):
1291 (ChildClass.prototype.asyncThisValueBody):
1292 (ChildClass.prototype.asyncThisValueInEvalExp):
1293 (ChildClass.prototype.asyncThisValueInEvalBody):
1296 (ChildClass2.prototype.classValue):
1297 (ChildClass2.prototype.get classProperty):
1298 * stress/async-arrow-functions-lexical-super-binding.js:
1300 2017-01-09 Yusuke Suzuki <utatane.tea@gmail.com>
1302 [JSC] Prototype dynamic-import
1303 https://bugs.webkit.org/show_bug.cgi?id=165724
1305 Reviewed by Saam Barati.
1307 * stress/import-basic.js: Added.
1311 * stress/import-from-eval.js: Added.
1314 * stress/import-syntax.js: Added.
1316 * stress/import-tests/cocoa.js: Added.
1319 * stress/import-tests/multiple.js: Added.
1321 * stress/import-tests/multiple2.js: Added.
1323 * stress/import-tests/should.js: Added.
1325 (export.shouldThrow):
1326 * stress/modules-syntax-error.js:
1328 2017-01-09 Commit Queue <commit-queue@webkit.org>
1330 Unreviewed, rolling out r210476.
1331 https://bugs.webkit.org/show_bug.cgi?id=166859
1333 "4% JSBench regression" (Requested by keith_mi_ on #webkit).
1337 "Add a slice intrinsic to the DFG/FTL"
1338 https://bugs.webkit.org/show_bug.cgi?id=166707
1339 http://trac.webkit.org/changeset/210476
1341 2017-01-06 Saam Barati <sbarati@apple.com>
1343 Add a slice intrinsic to the DFG/FTL
1344 https://bugs.webkit.org/show_bug.cgi?id=166707
1346 Reviewed by Filip Pizlo.
1348 * stress/array-slice-intrinsic.js: Added.
1353 * stress/array-slice-jettison-on-constructor-change.js: Added.
1357 (addRandomProperties):
1359 * stress/array-slice-osr-exit-2.js: Added.
1365 (addRandomProperties):
1367 * stress/array-slice-osr-exit.js: Added.
1373 (addRandomProperties):
1376 2017-01-06 Michael Saboff <msaboff@apple.com>
1378 @putByValDirect in Array.of and Array.from overwrites non-writable/configurable properties
1379 https://bugs.webkit.org/show_bug.cgi?id=153486
1381 Reviewed by Saam Barati.
1383 New regression test.
1385 * stress/regress-153486.js: Added.
1387 (makeUnwriteableUnconfigurableObject):
1392 2016-12-30 Filip Pizlo <fpizlo@apple.com>
1394 DeferGC::~DeferGC should be super cheap
1395 https://bugs.webkit.org/show_bug.cgi?id=166626
1397 Reviewed by Saam Barati.
1399 * stress/slow-path-generator-updating-current-node-dfg.js:
1400 * stress/unshift-array-storage.js:
1402 2017-01-04 JF Bastien <jfbastien@apple.com>
1404 WebAssembly: sections with the same name are allowed
1405 https://bugs.webkit.org/show_bug.cgi?id=166708
1407 Reviewed by Saam Barati.
1409 * wasm/self-test/test_BuilderJSON.js:
1410 (SectionsWithSameCustomName):
1412 2017-01-04 Saam Barati <sbarati@apple.com>
1414 stress/spread-calling.js timing out on the bots
1415 https://bugs.webkit.org/show_bug.cgi?id=166689
1416 <rdar://problem/29779182>
1418 Reviewed by Mark Lam.
1420 * stress/spread-calling.js:
1422 2017-01-04 JF Bastien <jfbastien@apple.com>
1424 WebAssembly JS API: add Module.sections
1425 https://bugs.webkit.org/show_bug.cgi?id=165159
1426 <rdar://problem/29760326>
1428 Reviewed by Mark Lam.
1430 As described here: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymodulecustomsections
1432 * wasm/Builder.js: allow custom sections to be duplicated
1433 * wasm/js-api/Module.customSection.js: Added.
1434 (assert.throws.WebAssembly.Module.prototype.customSections):
1437 2017-01-04 Saam Barati <sbarati@apple.com>
1439 We don't properly handle exceptions inside the nativeCallTrampoline macro in the LLInt
1440 https://bugs.webkit.org/show_bug.cgi?id=163720
1442 Reviewed by Mark Lam.
1444 * stress/bound-function-tail-call-with-exception.js: Added.
1449 2017-01-03 JF Bastien <jfbastien@apple.com>
1451 WebAssembly JS API: check and test in-call / out-call values
1452 https://bugs.webkit.org/show_bug.cgi?id=164876
1453 <rdar://problem/29844107>
1455 Reviewed by Saam Barati.
1458 * wasm/assert.js: add an assert for NaN comparison
1459 * wasm/fuzz/export-function.js: Added. Generate random wasm export
1460 signatures, and call them with random parameters.
1461 (const.paramExporter):
1463 (const.types.generate):
1465 * wasm/js-api/export-arity.js: Added.
1466 (const.paramExporter): Test that mismatched arities when JS calls
1467 wasm follow the defined semantics: i32 is 0, f32 / f64 are NaN.
1468 https://github.com/WebAssembly/design/blob/master/JS.md#exported-function-exotic-objects
1469 * wasm/js-api/export-void-is-undef.js: Added. Test that "void"
1470 wasm functions return "undefined" in JS.
1472 2017-01-02 JF Bastien <jfbastien@apple.com>
1474 WebAssembly: handle and optimize wasm export → wasm import calls
1475 https://bugs.webkit.org/show_bug.cgi?id=165282
1477 Reviewed by Saam Barati.
1479 * wasm/Builder.js: Add a Proxy to Builder.js, which intercepts
1480 unknown property lookups. This creates way better error messages
1481 on typos than 'undefined is not a function', which happens
1482 semi-frequently as I typo opcode names (and which one is a typo is
1483 hard to find because we chain builders).
1484 (const._isValidValue):
1486 (const._importFunctionContinuation):
1487 (const._importMemoryContinuation):
1488 (const._importTableContinuation):
1489 (const._exportFunctionContinuation):
1490 (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
1491 (export.default.Builder.prototype._registerSectionBuilders.this.Unknown):
1492 * wasm/LowLevelBinary.js: Add limited support for var{u}int64 (only the 32-bit values)
1493 (export.default.LowLevelBinary.prototype.varint32):
1494 (export.default.LowLevelBinary.prototype.varuint64):
1495 (export.default.LowLevelBinary.prototype.varint64):
1496 * wasm/function-tests/exceptions.js: update error message
1497 * wasm/function-tests/trap-load.js: update error message
1498 * wasm/function-tests/trap-store.js: update error message
1499 * wasm/js-api/wasm-to-wasm-bad-signature.js: Added. Test a bunch of bad wasm->wasm import signatures
1500 (const.makeImportee.signature.switch):
1501 (BadSignatureDropStartParams):
1502 * wasm/js-api/wasm-to-wasm.js: Added. Test 64-bit wasm->wasm import calls
1503 (const.callerModule):
1504 (const.calleeModule):
1507 2017-01-02 Saam Barati <sbarati@apple.com>
1509 WebAssembly: Some loads don't take into account the offset
1510 https://bugs.webkit.org/show_bug.cgi?id=166616
1511 <rdar://problem/29841541>
1513 Reviewed by Keith Miller.
1515 * wasm/function-tests/load-offset.js: Added.
1517 2016-12-29 Saam Barati <sbarati@apple.com>
1519 WebAssembly: Rebase spec-tests now that wabt has been updated to produce certain kinds of invalid modules
1520 https://bugs.webkit.org/show_bug.cgi?id=166491
1521 <rdar://problem/29814999>
1523 Reviewed by Yusuke Suzuki.
1525 Based off these revisions:
1526 - spec: b055d01ea1dfdd7a5231ae779095435f836de97f
1527 - wabt: d0d44702c753f851b094615298a2f4d4e3c21035
1529 The reason for the rebase is that wabt was updated to stop
1530 silently rejecting invalid modules. This was needed because
1531 some of the spec tests check to make sure that the module
1532 is invalid, but wabt was silently ignoring the errors and
1533 generating valid modules:
1534 https://github.com/WebAssembly/wabt/issues/256
1537 * wasm/spec-tests/address.wast.js:
1538 * wasm/spec-tests/binary.wast.js:
1539 * wasm/spec-tests/block.wast.js:
1540 * wasm/spec-tests/br.wast.js:
1541 * wasm/spec-tests/br_if.wast.js:
1542 * wasm/spec-tests/br_table.wast.js:
1543 * wasm/spec-tests/break-drop.wast.js:
1544 * wasm/spec-tests/call.wast.js:
1545 * wasm/spec-tests/call_indirect.wast.js:
1546 * wasm/spec-tests/comments.wast.js:
1547 * wasm/spec-tests/conversions.wast.js:
1548 * wasm/spec-tests/custom_section.wast.js:
1549 * wasm/spec-tests/endianness.wast.js:
1550 * wasm/spec-tests/exports.wast.js:
1551 * wasm/spec-tests/f32.wast.js:
1552 * wasm/spec-tests/f32_cmp.wast.js:
1553 * wasm/spec-tests/f64.wast.js:
1554 * wasm/spec-tests/f64_cmp.wast.js:
1555 * wasm/spec-tests/fac.wast.js:
1556 * wasm/spec-tests/float_exprs.wast.js:
1557 * wasm/spec-tests/float_literals.wast.js:
1558 * wasm/spec-tests/float_memory.wast.js:
1559 * wasm/spec-tests/float_misc.wast.js:
1560 * wasm/spec-tests/forward.wast.js:
1561 * wasm/spec-tests/func.wast.js:
1562 * wasm/spec-tests/func_ptrs.wast.js:
1563 * wasm/spec-tests/get_local.wast.js:
1564 * wasm/spec-tests/globals.wast.js:
1565 * wasm/spec-tests/i32.wast.js:
1566 * wasm/spec-tests/i64.wast.js:
1567 * wasm/spec-tests/imports.wast.js:
1568 * wasm/spec-tests/int_exprs.wast.js:
1569 * wasm/spec-tests/int_literals.wast.js:
1570 * wasm/spec-tests/left-to-right.wast.js:
1571 * wasm/spec-tests/linking.wast.js:
1572 * wasm/spec-tests/loop.wast.js:
1573 * wasm/spec-tests/memory.wast.js:
1574 * wasm/spec-tests/memory_redundancy.wast.js:
1575 * wasm/spec-tests/memory_trap.wast.js:
1576 * wasm/spec-tests/names.wast.js:
1577 * wasm/spec-tests/nop.wast.js:
1578 * wasm/spec-tests/resizing.wast.js:
1579 * wasm/spec-tests/return.wast.js:
1580 * wasm/spec-tests/select.wast.js:
1581 * wasm/spec-tests/set_local.wast.js:
1582 * wasm/spec-tests/skip-stack-guard-page.wast.js:
1583 * wasm/spec-tests/stack.wast.js:
1584 * wasm/spec-tests/start.wast.js:
1585 * wasm/spec-tests/store_retval.wast.js:
1586 * wasm/spec-tests/switch.wast.js:
1587 * wasm/spec-tests/tee_local.wast.js:
1588 * wasm/spec-tests/traps.wast.js:
1589 * wasm/spec-tests/typecheck.wast.js:
1590 * wasm/spec-tests/unreachable.wast.js:
1591 * wasm/spec-tests/unwind.wast.js:
1593 2016-12-28 Saam Barati <sbarati@apple.com>
1595 WebAssembly: Don't allow duplicate export names
1596 https://bugs.webkit.org/show_bug.cgi?id=166490
1597 <rdar://problem/29815000>
1599 Reviewed by Keith Miller.
1602 * wasm/function-tests/invalid-duplicate-export.js: Added.
1604 2016-12-28 Saam Barati <sbarati@apple.com>
1606 WebAssembly: Implement grow_memory and current_memory
1607 https://bugs.webkit.org/show_bug.cgi?id=166448
1608 <rdar://problem/29803676>
1610 Reviewed by Keith Miller.
1612 I rewrote some of the testWasmModuleFunctions that used Memory to use
1613 the JS API since the jsc.cpp version can no longer use memory.
1616 * wasm/function-tests/add-12.js:
1617 (testWasmModuleFunctions):
1618 * wasm/function-tests/br-if-loop-less-than.js:
1619 (testWasmModuleFunctions):
1620 * wasm/function-tests/brTableAsIf.js:
1621 (testWasmModuleFunctions):
1622 * wasm/function-tests/brTableManyValues.js:
1623 (testWasmModuleFunctions):
1624 * wasm/function-tests/brTableWithLoop.js:
1625 (testWasmModuleFunctions):
1626 * wasm/function-tests/dumb-eq-if-then-else.js:
1627 * wasm/function-tests/eqz.js:
1628 * wasm/function-tests/grow-memory-2.js: Added.
1630 (assert.eq.instance.exports.foo):
1631 * wasm/function-tests/grow-memory-3.js: Added.
1632 * wasm/function-tests/grow-memory-4.js: Added.
1634 * wasm/function-tests/grow-memory.js: Added.
1635 (binaryShouldNotParse):
1639 * wasm/function-tests/i32-load.js:
1640 (testWasmModuleFunctions):
1641 * wasm/function-tests/i32-load8-s.js:
1642 * wasm/function-tests/max.js:
1643 * wasm/function-tests/min.js:
1644 * wasm/js-api/memory-grow.js: Added.
1647 * wasm/js-api/test_memory.js:
1650 2016-12-25 Yusuke Suzuki <utatane.tea@gmail.com>
1652 Propagate the source origin as much as possible
1653 https://bugs.webkit.org/show_bug.cgi?id=166348
1655 Reviewed by Darin Adler.
1657 * stress/source-origin.js: Added.
1660 2016-12-24 Caio Lima <ticaiolima@gmail.com>
1662 [test262] Fixing mapped arguments object property test case
1663 https://bugs.webkit.org/show_bug.cgi?id=159398
1665 Reviewed by Saam Barati.
1667 * stress/arguments-bizarre-behaviour-disable-enumerability.js:
1668 * stress/arguments-define-property.js: Added.
1671 * stress/arguments-non-configurable.js: Added.
1673 (tryChangeNonConfigurableDescriptor):
1674 (set tryChangeNonConfigurableDescriptor):
1675 (tryChangeWritableOfNonConfigurableDescriptor):
1678 016-12-20 Caio Lima <ticaiolima@gmail.com>
1680 [test262] Fixing mapped arguments object property test case
1681 https://bugs.webkit.org/show_bug.cgi?id=159398
1685 * stress/arguments-bizarre-behaviour-disable-enumerability.js:
1686 * stress/arguments-define-property.js: Added.
1689 * stress/arguments-non-configurable.js: Added.
1691 (tryChangeNonConfigurableDescriptor):
1692 (set tryChangeNonConfigurableDescriptor):
1693 (tryChangeWritableOfNonConfigurableDescriptor):
1696 2016-12-23 Keith Miller <keith_miller@apple.com>
1698 WebAssembly: trap on bad division.
1699 https://bugs.webkit.org/show_bug.cgi?id=164786
1701 Reviewed by Mark Lam.
1703 Also, mark conversions as passing.
1708 2016-12-22 Keith Miller <keith_miller@apple.com>
1710 WebAssembly: Make spec-tests/f32.wast.js and spec-tests/f64.wast.js pass
1711 https://bugs.webkit.org/show_bug.cgi?id=166447
1713 Reviewed by Saam Barati.
1718 2016-12-22 Saam Barati <sbarati@apple.com>
1720 WebAssembly: Make calling Wasm functions that returns or takes an i64 as a parameter an early exception
1721 https://bugs.webkit.org/show_bug.cgi?id=166437
1722 <rdar://problem/29793949>
1724 Reviewed by Keith Miller.
1727 * wasm/function-tests/i64-from-js-exceptions.js: Added.
1728 (const.imp.import.sideEffects):
1729 (assert.throws.instance.exports.foo.valueOf):
1731 2016-12-22 Mark Lam <mark.lam@apple.com>
1733 De-duplicate finally blocks.
1734 https://bugs.webkit.org/show_bug.cgi?id=160168
1736 Reviewed by Saam Barati.
1738 Re-landing r209952 with a few new tests added in test-finally.js.
1740 * stress/deeply-nested-finallys.js: Copied from JSTests/stress/deeply-nested-finallys.js.
1741 - Tests many levels of finally nesting. This causes the old code to hang (and
1742 crashes eventually) while trying to generate bytecode for the exponentially
1743 duplicated finally blocks. The new code completes this test almost instantly.
1745 * stress/test-finally.js: Copied from JSTests/stress/test-finally.js.
1746 - Tests control flow through various permutations of finally blocks.
1748 2016-12-22 Saam Barati <sbarati@apple.com>
1750 WebAssembly: Make the spec-tests/address.wast.js test pass
1751 https://bugs.webkit.org/show_bug.cgi?id=166429
1752 <rdar://problem/29793220>
1754 Reviewed by Keith Miller.
1758 2016-12-22 Keith Miller <keith_miller@apple.com>
1760 WebAssembly: The validator should not allow unused stack entries at the end of a block
1761 https://bugs.webkit.org/show_bug.cgi?id=166411
1763 Reviewed by Saam Barati.
1765 Test cleanup and enable new passing tests.
1768 * wasm/function-tests/br-if-as-return.js:
1770 2016-12-22 Saam Barati <sbarati@apple.com>
1772 WebAssembly: Make the spec-tests/start.wast.js test pass
1773 https://bugs.webkit.org/show_bug.cgi?id=166416
1774 <rdar://problem/29784532>
1776 Reviewed by Yusuke Suzuki.
1780 2016-12-21 Keith Miller <keith_miller@apple.com>
1782 WebAssembly: Fix decode floating point constants in unreachable code
1783 https://bugs.webkit.org/show_bug.cgi?id=166400
1785 Reviewed by Saam Barati.
1789 2016-12-21 Keith Miller <keith_miller@apple.com>
1791 WebAssembly: Allow br, br_if, and br_table to act as a return
1792 https://bugs.webkit.org/show_bug.cgi?id=166393
1794 Reviewed by Saam Barati.
1796 Add tests for breaks acting as returns and fix tests that
1797 validate error messages.
1799 * wasm/function-tests/br-as-return.js: Added.
1800 * wasm/function-tests/br-if-as-return.js: Added.
1801 * wasm/function-tests/br-table-as-return.js: Added.
1802 * wasm/function-tests/if-no-else-non-void.js:
1803 * wasm/function-tests/struct.js: Added.
1804 * wasm/js-api/global-error.js:
1806 * wasm/js-api/table.js:
1809 2016-12-21 Saam Barati <sbarati@apple.com>
1811 WebAssembly: Import spec tests
1812 https://bugs.webkit.org/show_bug.cgi?id=166395
1814 Rubber stamped by Keith Miller.
1816 This patch implements the Wasm spec's tests found here:
1817 https://github.com/WebAssembly/spec/tree/master/interpreter/test
1819 These tests are in .wast s-epxression format. To convert
1820 them to JS, I use a script from the wabt library, found here:
1821 https://github.com/WebAssembly/wabt/blob/master/test/run-gen-spec-js.py
1823 I also added a script that automatically imports the tests as
1824 JS files. The inputs to the script is the path to the Wasm spec
1825 git repo and the path to the wabt git repo. This will make importing
1826 new tests easy in the future.
1828 The wasm spec imported is at commit: b055d01ea1dfdd7a5231ae779095435f836de97f
1829 The wabt used to do the import is at commit: 622b42dced6d793e9d49e9b1fd1d1524defd1387
1832 * wasm/import-spec-tests.rb: Added.
1833 * wasm/spec-tests: Added.
1834 * wasm/spec-tests/address.wast.js: Added.
1840 (assert_soft_invalid):
1841 (assert_unlinkable):
1842 (assert_uninstantiable):
1845 (assert_return_nan):
1846 * wasm/spec-tests/binary.wast.js: Added.
1852 (assert_soft_invalid):
1853 (assert_unlinkable):
1854 (assert_uninstantiable):
1857 (assert_return_nan):
1858 * wasm/spec-tests/block.wast.js: Added.
1864 (assert_soft_invalid):
1865 (assert_unlinkable):
1866 (assert_uninstantiable):
1869 (assert_return_nan):
1870 * wasm/spec-tests/br.wast.js: Added.
1876 (assert_soft_invalid):
1877 (assert_unlinkable):
1878 (assert_uninstantiable):
1881 (assert_return_nan):
1882 * wasm/spec-tests/br_if.wast.js: Added.
1888 (assert_soft_invalid):
1889 (assert_unlinkable):
1890 (assert_uninstantiable):
1893 (assert_return_nan):
1894 * wasm/spec-tests/br_table.wast.js: Added.
1900 (assert_soft_invalid):
1901 (assert_unlinkable):
1902 (assert_uninstantiable):
1905 (assert_return_nan):
1906 * wasm/spec-tests/break-drop.wast.js: Added.
1912 (assert_soft_invalid):
1913 (assert_unlinkable):
1914 (assert_uninstantiable):
1917 (assert_return_nan):
1918 * wasm/spec-tests/call.wast.js: Added.
1924 (assert_soft_invalid):
1925 (assert_unlinkable):
1926 (assert_uninstantiable):
1929 (assert_return_nan):
1930 * wasm/spec-tests/call_indirect.wast.js: Added.
1936 (assert_soft_invalid):
1937 (assert_unlinkable):
1938 (assert_uninstantiable):
1941 (assert_return_nan):
1942 * wasm/spec-tests/comments.wast.js: Added.
1948 (assert_soft_invalid):
1949 (assert_unlinkable):
1950 (assert_uninstantiable):
1953 (assert_return_nan):
1954 * wasm/spec-tests/conversions.wast.js: Added.
1960 (assert_soft_invalid):
1961 (assert_unlinkable):
1962 (assert_uninstantiable):
1965 (assert_return_nan):
1966 * wasm/spec-tests/custom_section.wast.js: Added.
1972 (assert_soft_invalid):
1973 (assert_unlinkable):
1974 (assert_uninstantiable):
1977 (assert_return_nan):
1978 * wasm/spec-tests/endianness.wast.js: Added.
1984 (assert_soft_invalid):
1985 (assert_unlinkable):
1986 (assert_uninstantiable):
1989 (assert_return_nan):
1990 * wasm/spec-tests/exports.wast.js: Added.
1996 (assert_soft_invalid):
1997 (assert_unlinkable):
1998 (assert_uninstantiable):
2001 (assert_return_nan):
2002 * wasm/spec-tests/f32.wast.js: Added.
2008 (assert_soft_invalid):
2009 (assert_unlinkable):
2010 (assert_uninstantiable):
2013 (assert_return_nan):
2014 * wasm/spec-tests/f32_cmp.wast.js: Added.
2020 (assert_soft_invalid):
2021 (assert_unlinkable):
2022 (assert_uninstantiable):
2025 (assert_return_nan):
2026 * wasm/spec-tests/f64.wast.js: Added.
2032 (assert_soft_invalid):
2033 (assert_unlinkable):
2034 (assert_uninstantiable):
2037 (assert_return_nan):
2038 * wasm/spec-tests/f64_cmp.wast.js: Added.
2044 (assert_soft_invalid):
2045 (assert_unlinkable):
2046 (assert_uninstantiable):
2049 (assert_return_nan):
2050 * wasm/spec-tests/fac.wast.js: Added.
2056 (assert_soft_invalid):
2057 (assert_unlinkable):
2058 (assert_uninstantiable):
2061 (assert_return_nan):
2062 * wasm/spec-tests/float_exprs.wast.js: Added.
2068 (assert_soft_invalid):
2069 (assert_unlinkable):
2070 (assert_uninstantiable):
2073 (assert_return_nan):
2074 * wasm/spec-tests/float_literals.wast.js: Added.
2080 (assert_soft_invalid):
2081 (assert_unlinkable):
2082 (assert_uninstantiable):
2085 (assert_return_nan):
2086 * wasm/spec-tests/float_memory.wast.js: Added.
2092 (assert_soft_invalid):
2093 (assert_unlinkable):
2094 (assert_uninstantiable):
2097 (assert_return_nan):
2098 * wasm/spec-tests/float_misc.wast.js: Added.
2104 (assert_soft_invalid):
2105 (assert_unlinkable):
2106 (assert_uninstantiable):
2109 (assert_return_nan):
2110 * wasm/spec-tests/forward.wast.js: Added.
2116 (assert_soft_invalid):
2117 (assert_unlinkable):
2118 (assert_uninstantiable):
2121 (assert_return_nan):
2122 * wasm/spec-tests/func.wast.js: Added.
2128 (assert_soft_invalid):
2129 (assert_unlinkable):
2130 (assert_uninstantiable):
2133 (assert_return_nan):
2134 * wasm/spec-tests/func_ptrs.wast.js: Added.
2140 (assert_soft_invalid):
2141 (assert_unlinkable):
2142 (assert_uninstantiable):
2145 (assert_return_nan):
2146 * wasm/spec-tests/get_local.wast.js: Added.
2152 (assert_soft_invalid):
2153 (assert_unlinkable):
2154 (assert_uninstantiable):
2157 (assert_return_nan):
2158 * wasm/spec-tests/globals.wast.js: Added.
2164 (assert_soft_invalid):
2165 (assert_unlinkable):
2166 (assert_uninstantiable):
2169 (assert_return_nan):
2170 * wasm/spec-tests/i32.wast.js: Added.
2176 (assert_soft_invalid):
2177 (assert_unlinkable):
2178 (assert_uninstantiable):
2181 (assert_return_nan):
2182 * wasm/spec-tests/i64.wast.js: Added.
2188 (assert_soft_invalid):
2189 (assert_unlinkable):
2190 (assert_uninstantiable):
2193 (assert_return_nan):
2194 * wasm/spec-tests/imports.wast.js: Added.
2200 (assert_soft_invalid):
2201 (assert_unlinkable):
2202 (assert_uninstantiable):
2205 (assert_return_nan):
2206 * wasm/spec-tests/int_exprs.wast.js: Added.
2212 (assert_soft_invalid):
2213 (assert_unlinkable):
2214 (assert_uninstantiable):
2217 (assert_return_nan):
2218 * wasm/spec-tests/int_literals.wast.js: Added.
2224 (assert_soft_invalid):
2225 (assert_unlinkable):
2226 (assert_uninstantiable):
2229 (assert_return_nan):
2230 * wasm/spec-tests/left-to-right.wast.js: Added.
2236 (assert_soft_invalid):
2237 (assert_unlinkable):
2238 (assert_uninstantiable):
2241 (assert_return_nan):
2242 * wasm/spec-tests/linking.wast.js: Added.
2248 (assert_soft_invalid):
2249 (assert_unlinkable):
2250 (assert_uninstantiable):
2253 (assert_return_nan):
2254 * wasm/spec-tests/loop.wast.js: Added.
2260 (assert_soft_invalid):
2261 (assert_unlinkable):
2262 (assert_uninstantiable):
2265 (assert_return_nan):
2266 * wasm/spec-tests/memory.wast.js: Added.
2272 (assert_soft_invalid):
2273 (assert_unlinkable):
2274 (assert_uninstantiable):
2277 (assert_return_nan):
2278 * wasm/spec-tests/memory_redundancy.wast.js: Added.
2284 (assert_soft_invalid):
2285 (assert_unlinkable):
2286 (assert_uninstantiable):
2289 (assert_return_nan):
2290 * wasm/spec-tests/memory_trap.wast.js: Added.
2296 (assert_soft_invalid):
2297 (assert_unlinkable):
2298 (assert_uninstantiable):
2301 (assert_return_nan):
2302 * wasm/spec-tests/names.wast.js: Added.
2308 (assert_soft_invalid):
2309 (assert_unlinkable):
2310 (assert_uninstantiable):
2313 (assert_return_nan):
2314 * wasm/spec-tests/nop.wast.js: Added.
2320 (assert_soft_invalid):
2321 (assert_unlinkable):
2322 (assert_uninstantiable):
2325 (assert_return_nan):
2326 * wasm/spec-tests/resizing.wast.js: Added.
2332 (assert_soft_invalid):
2333 (assert_unlinkable):
2334 (assert_uninstantiable):
2337 (assert_return_nan):
2338 * wasm/spec-tests/return.wast.js: Added.
2344 (assert_soft_invalid):
2345 (assert_unlinkable):
2346 (assert_uninstantiable):
2349 (assert_return_nan):
2350 * wasm/spec-tests/select.wast.js: Added.
2356 (assert_soft_invalid):
2357 (assert_unlinkable):
2358 (assert_uninstantiable):
2361 (assert_return_nan):
2362 * wasm/spec-tests/set_local.wast.js: Added.
2368 (assert_soft_invalid):
2369 (assert_unlinkable):
2370 (assert_uninstantiable):
2373 (assert_return_nan):
2374 * wasm/spec-tests/skip-stack-guard-page.wast.js: Added.
2380 (assert_soft_invalid):
2381 (assert_unlinkable):
2382 (assert_uninstantiable):
2385 (assert_return_nan):
2386 * wasm/spec-tests/stack.wast.js: Added.
2392 (assert_soft_invalid):
2393 (assert_unlinkable):
2394 (assert_uninstantiable):
2397 (assert_return_nan):
2398 * wasm/spec-tests/start.wast.js: Added.
2404 (assert_soft_invalid):
2405 (assert_unlinkable):
2406 (assert_uninstantiable):
2409 (assert_return_nan):
2410 * wasm/spec-tests/store_retval.wast.js: Added.
2416 (assert_soft_invalid):
2417 (assert_unlinkable):
2418 (assert_uninstantiable):
2421 (assert_return_nan):
2422 * wasm/spec-tests/switch.wast.js: Added.
2428 (assert_soft_invalid):
2429 (assert_unlinkable):
2430 (assert_uninstantiable):
2433 (assert_return_nan):
2434 * wasm/spec-tests/tee_local.wast.js: Added.
2440 (assert_soft_invalid):
2441 (assert_unlinkable):
2442 (assert_uninstantiable):
2445 (assert_return_nan):
2446 * wasm/spec-tests/traps.wast.js: Added.
2452 (assert_soft_invalid):
2453 (assert_unlinkable):
2454 (assert_uninstantiable):
2457 (assert_return_nan):
2458 * wasm/spec-tests/typecheck.wast.js: Added.
2464 (assert_soft_invalid):
2465 (assert_unlinkable):
2466 (assert_uninstantiable):
2469 (assert_return_nan):
2470 * wasm/spec-tests/unreachable.wast.js: Added.
2476 (assert_soft_invalid):
2477 (assert_unlinkable):
2478 (assert_uninstantiable):
2481 (assert_return_nan):
2482 * wasm/spec-tests/unwind.wast.js: Added.
2488 (assert_soft_invalid):
2489 (assert_unlinkable):
2490 (assert_uninstantiable):
2493 (assert_return_nan):
2495 2016-12-20 Keith Miller <keith_miller@apple.com>
2497 Add support for global
2498 https://bugs.webkit.org/show_bug.cgi?id=165171
2500 Reviewed by Filip Pizlo.
2502 * stress/global.js: Added.
2504 2016-12-20 JF Bastien <jfbastien@apple.com>
2506 WebAssembly API: implement WebAssembly.LinkError
2507 https://bugs.webkit.org/show_bug.cgi?id=165805
2508 <rdar://problem/29747874>
2510 Reviewed by Mark lam.
2512 Update all exception sites which now throw WebAssembly.LinkError.
2514 * wasm/js-api/element-data.js:
2515 * wasm/js-api/element.js:
2517 * wasm/js-api/global-error.js:
2519 * wasm/js-api/table.js:
2521 (new.WebAssembly.Table):
2522 * wasm/js-api/test_Data.js:
2523 * wasm/js-api/test_basic_api.js:
2524 (const.c.in.constructorProperties.switch):
2525 * wasm/js-api/test_memory.js:
2527 (test.testMemImportError): Deleted.
2529 2016-12-20 JF Bastien <jfbastien@apple.com>
2531 WebAssembly: unique function signatures
2532 https://bugs.webkit.org/show_bug.cgi?id=165957
2533 <rdar://problem/29735737>
2535 Reviewed by Saam Barati.
2537 * wasm/function-tests/table-basic.js: FIXME is now addressed,
2538 though instance to instance calls still need work which bug
2539 #165282 will address
2541 * wasm/js-api/unique-signature.js: Added.
2542 (CallIndirectWithDuplicateSignatures):
2544 2016-12-19 Mark Lam <mark.lam@apple.com>
2546 Rolling out r209974 and r209952. They break some websites in mysterious ways. Step 2: Rollout r209952.
2547 https://bugs.webkit.org/show_bug.cgi?id=166049
2551 * stress/deeply-nested-finallys.js: Removed.
2552 * stress/test-finally.js: Removed.
2554 2016-12-19 Saam Barati <sbarati@apple.com>
2556 WebAssembly: Make running Wasm tests take less time by reducing some tests' iteration count and by splitting some tests into different files
2557 https://bugs.webkit.org/show_bug.cgi?id=166017
2559 Reviewed by Yusuke Suzuki.
2561 * wasm/function-tests/trap-load-2.js: Added.
2563 (wasmFrameCountFromError):
2566 * wasm/function-tests/trap-load.js:
2567 (assert.continuation): Deleted.
2568 * wasm/function-tests/trap-store-2.js: Added.
2569 (import.Builder.from.string_appeared_here.assert):
2572 * wasm/function-tests/trap-store.js:
2573 (assert.continuation): Deleted.
2575 * wasm/js-api/test_memory.js:
2578 2016-12-18 Saam Barati <sbarati@apple.com>
2580 WebAssembly: Implement the WebAssembly.compile and WebAssembly.validate
2581 https://bugs.webkit.org/show_bug.cgi?id=165936
2583 Reviewed by Mark Lam.
2585 * wasm/js-api/Module-compile.js: Added.
2586 (async.testPromiseAPI):
2587 * wasm/js-api/test_basic_api.js:
2588 (const.c.in.constructorProperties.switch):
2589 * wasm/js-api/validate.js: Added.
2590 (assert.truthy.WebAssembly.validate.builder.WebAssembly):
2592 2016-12-16 Mark Lam <mark.lam@apple.com>
2594 De-duplicate finally blocks.
2595 https://bugs.webkit.org/show_bug.cgi?id=160168
2597 Reviewed by Keith Miller.
2599 * stress/deeply-nested-finallys.js: Added.
2600 - Tests many levels of finally nesting. This causes the old code to hang (and
2601 crashes eventually) while trying to generate bytecode for the exponentially
2602 duplicated finally blocks. The new code completes this test almost instantly.
2604 * stress/test-finally.js: Added.
2605 - Tests control flow through various permutations of finally blocks.
2607 2016-12-16 Saam Barati <sbarati@apple.com>
2609 WebAssembly: WasmB3IRGenerator should throw exceptions instead of crash
2610 https://bugs.webkit.org/show_bug.cgi?id=165834
2612 Reviewed by Keith Miller.
2614 * wasm/function-tests/exceptions.js: Added.
2615 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
2616 * wasm/function-tests/table-basic.js:
2617 (i.i.42.throw.new.Error):
2619 2016-12-16 Keith Miller <keith_miller@apple.com>
2621 i64.eqz should use an Int64 zero
2622 https://bugs.webkit.org/show_bug.cgi?id=165942
2624 Reviewed by Mark Lam.
2628 2016-12-15 Keith Miller <keith_miller@apple.com>
2630 Fix validation of non-void if blocks with no else
2631 https://bugs.webkit.org/show_bug.cgi?id=165938
2633 Reviewed by Saam Barati.
2635 Add a new failing test and a fix an existing one.
2637 * wasm/function-tests/dead-call.js:
2638 * wasm/function-tests/if-no-else-non-void.js: Added.
2640 2016-12-15 Keith Miller <keith_miller@apple.com>
2642 Wasm should not create empty unlinked callsites
2643 https://bugs.webkit.org/show_bug.cgi?id=165933
2645 Reviewed by Mark Lam.
2647 * wasm/function-tests/dead-call.js: Added.
2649 2016-12-15 JF Bastien <jfbastien@apple.com>
2651 WebAssembly: improve compilation error messages
2652 https://bugs.webkit.org/show_bug.cgi?id=163919
2654 Reviewed by Saam Barati.
2656 Update error messages in these tests.
2657 Use the assert.throws facility in many of them which weren't already.
2659 * wasm/js-api/element.js:
2660 (assert.throws.new.WebAssembly.Module.builder.WebAssembly):
2662 * wasm/js-api/global-error.js:
2663 (assert.throws.new.WebAssembly.Module.bin):
2666 * wasm/js-api/table.js:
2667 (assert.throws.new.WebAssembly.Module.builder.WebAssembly):
2669 (assertBadTableImport):
2670 * wasm/js-api/test_Data.js:
2671 (DataSectionWithoutMemory):
2672 * wasm/js-api/test_Start.js:
2673 (InvalidStartFunctionIndex):
2674 * wasm/js-api/test_basic_api.js:
2675 (const.c.in.constructorProperties.switch):
2677 2016-12-15 JF Bastien <jfbastien@apple.com>
2679 WebAssembly API: improve data section errors
2680 https://bugs.webkit.org/show_bug.cgi?id=165733
2682 Reviewed by Keith Miller.
2684 * wasm/js-api/element-data.js: Added.
2685 (ElementBeforeData.set const):
2686 (ElementBeforeData): check the order of initialization, which is observable on failure
2687 * wasm/js-api/test_Data.js:
2688 (DataSectionWithoutMemory):
2689 (DataSectionOffTheEnd): Deleted.
2690 (DataSectionPartlyOffTheEnd): Deleted.
2691 (DataSectionEmptyOffTheEnd): Deleted.
2692 (DataSectionSeenByStart): Deleted.
2694 2016-12-15 Keith Miller <keith_miller@apple.com>
2696 Fix 64-bit shift family Wasm opcodes
2697 https://bugs.webkit.org/show_bug.cgi?id=165902
2699 Reviewed by Geoffrey Garen.
2701 Add tests for shift family of instructions. Since
2702 we can't generate i64 values to pass to wasm we only compile
2703 the code for those functions. Attempting to generate any i64
2704 code using these instructions would have been enough to cause
2705 the B3 Validation error anyway.
2708 * wasm/function-tests/rotl.js: Added.
2709 * wasm/function-tests/rotr.js: Added.
2710 * wasm/function-tests/shl.js: Added.
2711 * wasm/function-tests/shr-s.js: Added.
2712 * wasm/function-tests/shr-u.js: Added.
2715 2016-12-14 Keith Miller <keith_miller@apple.com>
2717 WebAssembly: test_BuilderJSON.js is broken
2718 https://bugs.webkit.org/show_bug.cgi?id=165893
2720 Reviewed by Michael Saboff.
2723 (const._isValidValue):
2724 * wasm/self-test/test_BuilderJSON.js:
2726 2016-12-14 Keith Miller <keith_miller@apple.com>
2728 Unreviewed, fix test.
2730 * wasm/function-tests/i32-const.js:
2732 2016-12-14 Keith Miller <keith_miller@apple.com>
2734 Wasm should decode constants correctly
2735 https://bugs.webkit.org/show_bug.cgi?id=165886
2737 Reviewed by Saam Barati.
2740 (const._isValidValue):
2741 * wasm/Builder_WebAssemblyBinary.js:
2743 * wasm/LowLevelBinary.js:
2744 (export.default.LowLevelBinary.prototype.float):
2745 (export.default.LowLevelBinary.prototype.double):
2746 * wasm/function-tests/f32-const.js: Added.
2747 * wasm/function-tests/f64-const.js: Added.
2748 * wasm/function-tests/i32-const.js: Added.
2751 2016-12-14 Saam Barati <sbarati@apple.com>
2753 WebAssembly: Add various low hanging fruit that will allow us to run the LLVM torture tests in Wasm
2754 https://bugs.webkit.org/show_bug.cgi?id=165883
2756 Reviewed by Keith Miller.
2759 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
2760 * wasm/Builder_WebAssemblyBinary.js:
2761 (const.emitters.Export):
2762 * wasm/js-api/table.js:
2766 * wasm/js-api/test_memory.js:
2767 (binaryShouldNotParse):
2769 (test.testMemImportError):
2773 2016-12-14 Filip Pizlo <fpizlo@apple.com>
2775 DirectTailCall implementation needs to tell the shuffler what to put into the ArgumentCount explicitly
2776 https://bugs.webkit.org/show_bug.cgi?id=165882
2778 Reviewed by Mark Lam.
2780 * stress/direct-tail-call-arity-mismatch-count-args.js: Added.
2784 2016-12-14 Keith Miller <keith_miller@apple.com>
2786 WebAssembly JS API: implement Global
2787 https://bugs.webkit.org/show_bug.cgi?id=164133
2789 Reviewed by Saam Barati.
2792 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
2793 * wasm/Builder_WebAssemblyBinary.js:
2794 (const.valueType.WASM.description.type.i32.type.const.putGlobalType):
2796 (const.putInitExpr):
2797 (const.emitters.Import):
2798 (const.emitters.Global):
2799 (const.emitters.Export):
2800 (const.emitters.Code):
2801 * wasm/LowLevelBinary.js:
2802 (export.default.LowLevelBinary.prototype.varuint32):
2803 (export.default.LowLevelBinary.prototype.varint32):
2804 * wasm/js-api/global-error.js: Added.
2807 * wasm/js-api/global-external-init-from-import.js: Added.
2808 * wasm/js-api/global-internal-init-from-import.js: Added.
2809 * wasm/js-api/global-mutate.js: Added.
2810 (createInternalGlobalModule):
2811 * wasm/js-api/globals-export.js: Added.
2812 * wasm/js-api/globals-import.js: Added.
2815 2016-12-13 Saam Barati <sbarati@apple.com>
2817 WebAssembly: implement the elements section
2818 https://bugs.webkit.org/show_bug.cgi?id=165715
2820 Reviewed by Keith Miller.
2823 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
2824 (export.default.Builder.prototype._registerSectionBuilders.switch):
2825 * wasm/Builder_WebAssemblyBinary.js:
2826 (const.emitters.Element):
2827 * wasm/function-tests/basic-element.js: Added.
2828 * wasm/js-api/element.js: Added.
2830 (assertBadBinary.badInstantiation):
2832 2016-12-13 Saam Barati <sbarati@apple.com>
2834 WebAssembly: implement the table section and table import
2835 https://bugs.webkit.org/show_bug.cgi?id=165716
2837 Reviewed by Keith Miller.
2840 (const._importMemoryContinuation):
2841 (const._importTableContinuation):
2842 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
2843 (const._importMemoryContinuation.section): Deleted.
2845 (const._importMemoryContinuation.assert): Deleted.
2846 * wasm/Builder_WebAssemblyBinary.js:
2847 (const.putResizableLimits):
2849 (const.emitters.Import):
2850 (const.emitters.Table):
2851 * wasm/function-tests/call-indirect-params.js:
2852 * wasm/function-tests/call-indirect.js:
2853 * wasm/function-tests/table-basic-2.js: Added.
2854 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
2856 * wasm/function-tests/table-basic.js: Added.
2857 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
2858 * wasm/js-api/call-indirect-results.js:
2859 (const.wasmModuleWhichImportJS): Deleted.
2860 (MonomorphicImport): Deleted.
2861 * wasm/js-api/call-indirect.js:
2862 (const.wasmModuleWhichImportJS):
2866 (MonomorphicImport): Deleted.
2867 * wasm/js-api/table.js: Added.
2871 (assertBadTableImport):
2872 (assertBadBinary.assertBadTableInstance):
2873 (assertBadTableInstance):
2874 (new.WebAssembly.Table):
2875 * wasm/js-api/test_basic_api.js:
2876 (const.c.in.constructorProperties.switch):
2878 2016-12-13 Commit Queue <commit-queue@webkit.org>
2880 Unreviewed, rolling out r209725.
2881 https://bugs.webkit.org/show_bug.cgi?id=165811
2883 "Broke ARMv7 builds" (Requested by msaboff on #webkit).
2887 "REGRESSION(r209653): speedometer crashes making virtual slow
2889 https://bugs.webkit.org/show_bug.cgi?id=165748
2890 http://trac.webkit.org/changeset/209725
2892 2016-12-12 Michael Saboff <msaboff@apple.com>
2894 REGRESSION(r209653): speedometer crashes making virtual slow path tailcalls
2895 https://bugs.webkit.org/show_bug.cgi?id=165748
2897 Reviewed by Filip Pizlo.
2899 New regression test.
2901 * stress/regress-165748.js: Added.
2911 2016-12-12 Mark Lam <mark.lam@apple.com>
2913 Debug JSC test timeout: stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js.ftl-no-cjit.
2914 https://bugs.webkit.org/show_bug.cgi?id=164630
2916 Reviewed by Keith Miller.
2918 Speculative fix for timeout issue. It looks like this test just runs a bit
2919 slower on debug builds. So, we'll give it a little more time to run.
2921 * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
2923 2016-12-11 Saam Barati <sbarati@apple.com>
2925 We should be able to throw exceptions from Wasm code and when Wasm frames are on the stack
2926 https://bugs.webkit.org/show_bug.cgi?id=165429
2928 Reviewed by Keith Miller.
2930 * wasm/function-tests/trap-load.js: Added.
2932 (wasmFrameCountFromError):
2934 (assert.continuation):
2935 * wasm/function-tests/trap-store.js: Added.
2936 (import.Builder.from.string_appeared_here.assert):
2938 (assert.continuation):
2940 * wasm/js-api/test_memory_constructor.js:
2943 2016-12-10 Commit Queue <commit-queue@webkit.org>
2945 Unreviewed, rolling out r209653, r209654, r209663, and
2947 https://bugs.webkit.org/show_bug.cgi?id=165739
2949 speedometer crashes (Requested by pizlo on #webkit).
2951 Reverted changesets:
2953 "JSVALUE64: Pass arguments in platform argument registers when
2954 making JavaScript calls"
2955 https://bugs.webkit.org/show_bug.cgi?id=160355
2956 http://trac.webkit.org/changeset/209653
2958 "Unreviewed build fix for 32 bit builds."
2959 http://trac.webkit.org/changeset/209654
2961 "Unreviewed build fix for the CLOOP after r209653"
2962 http://trac.webkit.org/changeset/209663
2964 "REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()"
2965 https://bugs.webkit.org/show_bug.cgi?id=165728
2966 http://trac.webkit.org/changeset/209673
2968 2016-12-10 Michael Saboff <msaboff@apple.com>
2970 REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()
2971 https://bugs.webkit.org/show_bug.cgi?id=165728
2973 Reviewed by Filip Pizlo.
2975 New regression test.
2977 * stress/regress-165728.js: Added.
2983 2016-12-10 Keith Miller <keith_miller@apple.com>
2985 Fix indirect_call if the result type is used.
2986 https://bugs.webkit.org/show_bug.cgi?id=165727
2988 Reviewed by Michael Saboff.
2990 * wasm/js-api/call-indirect-results.js: Added.
2991 (const.wasmModuleWhichImportJS):
2992 (MonomorphicImport):
2994 2016-12-10 Yusuke Suzuki <utatane.tea@gmail.com>
2996 [JSC] Module namespace object behaves like immutable prototype exotic object
2997 https://bugs.webkit.org/show_bug.cgi?id=165598
2999 Reviewed by Mark Lam.
3001 * modules/namespace-prototype-assignment.js: Added.
3008 (doInternalSetPrototypeOf):
3009 (ordinarySetPrototypeOf):
3010 (setImmutablePrototype):
3011 (windowProxySetPrototypeOf):
3012 (initSetterExpectation):
3013 (throwIfNoExceptionPending):
3014 (objectSetPrototypeOf):
3015 (setUnderscoreProto):
3016 (reflectSetPrototypeOf):
3018 (newObjectProto.toString):
3022 * modules/namespace-set-prototype-of.js: Added.
3024 (TypeError.Cannot.set prototype):
3026 2016-12-09 Michael Saboff <msaboff@apple.com>
3028 JSVALUE64: Pass arguments in platform argument registers when making JavaScript calls
3029 https://bugs.webkit.org/show_bug.cgi?id=160355
3031 Reviewed by Filip Pizlo.
3033 New microbenchmarks to measure call type performance.
3035 * microbenchmarks/calling-computed-args.js: Added.
3036 * microbenchmarks/calling-many-callees.js: Added.
3037 * microbenchmarks/calling-one-callee-fixed.js: Added.
3038 * microbenchmarks/calling-one-callee.js: Added.
3039 * microbenchmarks/calling-poly-callees.js: Added.
3040 * microbenchmarks/calling-poly-extra-arity-callees.js: Added.
3041 * microbenchmarks/calling-tailcall.js: Added.
3042 * microbenchmarks/calling-virtual-arity-fixup-callees.js: Added.
3043 * microbenchmarks/calling-virtual-arity-fixup-stackargs.js: Added.
3044 * microbenchmarks/calling-virtual-callees.js: Added.
3045 * microbenchmarks/calling-virtual-extra-arity-callees.js: Added.
3047 2016-12-09 Keith Miller <keith_miller@apple.com>
3049 Wasm should support call_indirect
3050 https://bugs.webkit.org/show_bug.cgi?id=165718
3052 Reviewed by Filip Pizlo.
3055 * wasm/function-tests/call-indirect-params.js: Added.
3056 * wasm/function-tests/call-indirect.js: Added.
3057 * wasm/js-api/call-indirect.js: Added.
3058 (const.wasmModuleWhichImportJS):
3059 (MonomorphicImport):
3064 2016-12-09 JF Bastien <jfbastien@apple.com>
3066 WebAssembly: implement data section
3067 https://bugs.webkit.org/show_bug.cgi?id=165696
3069 Reviewed by Keith Miller.
3071 As specified in https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#data-section
3072 Note that some of the interesting corner cases are ill-defined by the spec: https://github.com/WebAssembly/design/issues/897
3074 * wasm/Builder.js: create a data section from JavaScript
3075 * wasm/Builder_WebAssemblyBinary.js: assemble the data section into the proper binary encoding
3076 (const.emitters.Data):
3077 * wasm/js-api/test_Data.js: Added.
3079 (DataSectionOffTheEnd):
3080 (DataSectionPartlyOffTheEnd):
3081 (DataSectionEmptyOffTheEnd):
3082 (DataSectionSeenByStart):
3083 * wasm/self-test/test_BuilderJSON.js: make sure the JSON structure is fine (this sanity checks before going to binary)
3085 2016-12-09 JF Bastien <jfbastien@apple.com>
3087 WebAssembly JS API: implement start function
3088 https://bugs.webkit.org/show_bug.cgi?id=165150
3090 Reviewed by Saam Barati.
3092 * wasm/Builder.js: allow building a .Start()
3093 * wasm/Builder_WebAssemblyBinary.js:
3094 * wasm/js-api/test_Start.js: Added.
3095 (const.emitters.Start): serialize a start section
3096 * wasm/self-test/test_BuilderJSON.js: validate the start section's content
3098 2016-12-09 Saam Barati <sbarati@apple.com>
3100 WebAssembly JS API: implement importing and defining Memory
3101 https://bugs.webkit.org/show_bug.cgi?id=164134
3103 Reviewed by Keith Miller.
3106 (const._importMemoryContinuation.section):
3107 (const._importMemoryContinuation.assert):
3108 (const._importMemoryContinuation):
3109 (const._exportFunctionContinuation.const): Deleted.
3110 (const._exportFunctionContinuation): Deleted.
3111 * wasm/Builder_WebAssemblyBinary.js:
3112 (const.emitters.Import):
3113 * wasm/js-api/test_basic_api.js:
3114 (const.c.in.constructorProperties.switch):
3115 * wasm/js-api/test_memory.js: Added.
3117 (binaryShouldNotParse):
3119 (test.testMemImportError):
3120 * wasm/js-api/test_memory_constructor.js: Added.
3124 (assert.testInvalidInitial):
3125 (testInvalidInitial.testInvalidMaximum):
3126 (testInvalidInitial):
3127 (testInvalidMaximum):
3128 * wasm/self-test/test_BuilderJSON.js:
3130 2016-12-08 JF Bastien <jfbastien@apple.com>
3132 WebAssembly: JSC::link* shouldn't need a CodeBlock
3133 https://bugs.webkit.org/show_bug.cgi?id=165591
3135 Reviewed by Keith Miller.
3137 test that wasm -> JS works, including the IC
3139 * wasm/js-api/test_Instance.js:
3140 (const.wasmModuleWhichImportJS):
3141 (MonomorphicImport):
3146 2016-12-08 Filip Pizlo <fpizlo@apple.com>
3148 Green the cloop bot by raising this threshold.
3150 * mozilla/js1_5/Array/regress-101964.js:
3152 2016-12-08 JF Bastien <jfbastien@apple.com>
3154 WebAssembly JS API: wire up Instance imports
3155 https://bugs.webkit.org/show_bug.cgi?id=165118
3157 Reviewed by Saam Barati.
3159 * wasm/js-api/test_Instance.js: add the test, disabled for now
3161 2016-12-07 Keith Miller <keith_miller@apple.com>
3163 Add more missing trivial wasm ops.
3164 https://bugs.webkit.org/show_bug.cgi?id=165564
3166 Add tests for drop and tee_local.
3168 Reviewed by Geoffrey Garen.
3170 * wasm/function-tests/drop.js: Added.
3171 * wasm/function-tests/nop.js: Added.
3172 * wasm/function-tests/tee-local.js: Added.
3174 2016-12-06 Keith Miller <keith_miller@apple.com>
3176 Add support for truncation operators
3177 https://bugs.webkit.org/show_bug.cgi?id=165519
3179 Reviewed by Geoffrey Garen.
3181 * wasm/function-tests/i32-trunc-s-f32.js: Added.
3182 * wasm/function-tests/i32-trunc-s-f64.js: Added.
3183 * wasm/function-tests/i32-trunc-u-f32.js: Added.
3184 * wasm/function-tests/i32-trunc-u-f64.js: Added.
3185 * wasm/function-tests/i64-trunc-s-f32.js: Added.
3186 * wasm/function-tests/i64-trunc-s-f64.js: Added.
3187 * wasm/function-tests/i64-trunc-u-f32.js: Added.
3188 * wasm/function-tests/i64-trunc-u-f64.js: Added.
3190 2016-12-06 Mark Lam <mark.lam@apple.com>
3192 Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
3193 https://bugs.webkit.org/show_bug.cgi?id=165227
3194 <rdar://problem/29442665>
3196 Reviewed by Saam Barati.
3198 * stress/get-from-scope-dynamic-onto-proxy.js:
3199 - Updated error message.
3201 * stress/proxy-dont-infinite-loop.js: Removed.
3202 * stress/proxy-json-path.js: Removed.
3203 * stress/rest-parameter-allocation-elimination-watchpoints-6.js: Removed.
3204 - Removed these tests because the issue they are testing relies on being able to
3205 set Object.prototype.__proto__ to something else (which is now not possible).
3207 2016-12-05 Caitlin Potter <caitp@igalia.com>
3209 [JSC] report unexpected token when "async" is followed by identifier
3210 https://bugs.webkit.org/show_bug.cgi?id=165091
3212 Reviewed by Mark Lam.
3214 * stress/bug-165091.js:
3216 2016-12-05 Keith Miller <keith_miller@apple.com>
3218 Add Wasm i64 to i32 conversion.
3219 https://bugs.webkit.org/show_bug.cgi?id=165378
3221 Reviewed by Filip Pizlo.
3223 It turns out the wrap operation is just B3's Trunc.
3227 2016-12-04 Keith Miller <keith_miller@apple.com>
3229 Add support for Wasm ctz and popcnt
3230 https://bugs.webkit.org/show_bug.cgi?id=165369
3232 Reviewed by Saam Barati.
3234 * wasm/function-tests/ctz.js: Added.
3235 * wasm/function-tests/popcnt.js: Added.
3237 2016-12-03 JF Bastien <jfbastien@apple.com>
3239 WebAssembly: update binary format to 0xD version
3240 https://bugs.webkit.org/show_bug.cgi?id=165345
3242 Reviewed by Keith Miller.
3244 As described in the following PR: https://github.com/WebAssembly/design/pull/836
3245 Originally committed in r209175, reverted in r209242, and fixed in r209284.
3248 (const._normalizeFunctionSignature):
3249 * wasm/Builder_WebAssemblyBinary.js:
3250 (const.emitters.Type):
3251 (const.emitters.Code):
3252 * wasm/LowLevelBinary.js:
3253 (export.default.LowLevelBinary.prototype.block_type):
3254 (export.default.LowLevelBinary.prototype.inline_signature_type): Deleted.
3256 * wasm/js-api/test_basic_api.js:
3257 * wasm/self-test/test_BuilderWebAssembly.js:
3260 * wasm/self-test/test_WASM.js:
3263 2016-12-02 Keith Miller <keith_miller@apple.com>
3266 https://bugs.webkit.org/show_bug.cgi?id=165355
3268 Reviewed by Filip Pizlo.
3270 * wasm/function-tests/copysign.js: Added.
3272 2016-12-03 Commit Queue <commit-queue@webkit.org>
3274 Unreviewed, rolling out r209298.
3275 https://bugs.webkit.org/show_bug.cgi?id=165359
3277 broke the build (Requested by smfr on #webkit).
3282 https://bugs.webkit.org/show_bug.cgi?id=165355
3283 http://trac.webkit.org/changeset/209298
3285 2016-12-02 Keith Miller <keith_miller@apple.com>
3288 https://bugs.webkit.org/show_bug.cgi?id=165355
3290 Reviewed by Filip Pizlo.
3292 * wasm/function-tests/copysign.js: Added.
3294 2016-12-02 Keith Miller <keith_miller@apple.com>
3296 Unreviewed, fix git having a breakdown over trying to reland a rollout.
3298 2016-12-02 Keith Miller <keith_miller@apple.com>
3300 Add Wasm floating point nearest and trunc
3301 https://bugs.webkit.org/show_bug.cgi?id=165339
3303 Reviewed by Saam Barati.
3305 * wasm/function-tests/nearest.js: Added.
3306 * wasm/function-tests/trunc.js: Added.
3308 2016-12-02 Caitlin Potter <caitp@igalia.com>
3310 [JSC] add additional bit to JSTokenType bitfield
3311 https://bugs.webkit.org/show_bug.cgi?id=165091
3313 Reviewed by Geoffrey Garen.
3315 * stress/bug-165091.js: Added.
3316 (shouldThrowSyntaxError):
3318 2016-12-02 Commit Queue <commit-queue@webkit.org>
3320 Unreviewed, rolling out r209275 and r209276.
3321 https://bugs.webkit.org/show_bug.cgi?id=165348
3323 "broke the arm build" (Requested by keith_miller on #webkit).
3325 Reverted changesets:
3327 "Add Wasm floating point nearest and trunc"
3328 https://bugs.webkit.org/show_bug.cgi?id=165339
3329 http://trac.webkit.org/changeset/209275
3331 "Unreviewed, forgot to change instruction after renaming."
3332 http://trac.webkit.org/changeset/209276
3334 2016-12-02 Keith Miller <keith_miller@apple.com>
3336 Add Wasm floating point nearest and trunc
3337 https://bugs.webkit.org/show_bug.cgi?id=165339
3339 Reviewed by Filip Pizlo.
3341 * wasm/function-tests/nearest.js: Added.
3342 * wasm/function-tests/trunc.js: Added.
3344 2016-12-02 JF Bastien <jfbastien@apple.com>
3346 WebAssembly: revert patch causing odd breakage
3347 https://bugs.webkit.org/show_bug.cgi?id=165308
3351 Bug #164724 seems to cause build issues which I haven't tracked down yet. WasmOps.h can't be found:
3352 ./Source/JavaScriptCore/wasm/WasmFormat.h:34:10: fatal error: 'WasmOps.h' file not found
3354 It's weird since the file is auto-generated and has been for a while. #164724 merely includes it in WasmFormat.h.
3357 (const._normalizeFunctionSignature):
3358 * wasm/Builder_WebAssemblyBinary.js:
3359 (const.emitters.Type):
3360 (const.emitters.Code):
3361 * wasm/LowLevelBinary.js:
3362 (export.default.LowLevelBinary.prototype.inline_signature_type):
3363 (export.default.LowLevelBinary.prototype.block_type): Deleted.
3365 * wasm/js-api/test_basic_api.js:
3366 * wasm/self-test/test_BuilderWebAssembly.js:
3369 * wasm/self-test/test_WASM.js:
3372 2016-12-01 Ryan Haddad <ryanhaddad@apple.com>
3374 Skip flaky test ChakraCore/test/fieldopts/objtypespec-newobj-invalidation.1.js
3375 https://bugs.webkit.org/show_bug.cgi?id=162567
3377 Reviewed by Saam Barati.
3381 2016-12-01 Keith Miller <keith_miller@apple.com>
3383 Add wasm int to floating point opcodes
3384 https://bugs.webkit.org/show_bug.cgi?id=165252
3386 Reviewed by Geoffrey Garen.
3388 Add tests for Wasm integral to floating point conversion opcodes.
3390 * wasm/function-tests/int-to-floating-point.js: Added.
3393 2016-12-01 Geoffrey Garen <ggaren@apple.com>
3395 Land a test case for <rdar://problem/27889416>
3396 https://bugs.webkit.org/show_bug.cgi?id=165272
3398 Reviewed by Saam Barati.
3400 * stress/marked-argument-buffer.js: Added.
3405 2016-11-29 Per Arne Vollan <pvollan@apple.com>
3407 [Win] Skip failing JSC tests.
3408 https://bugs.webkit.org/show_bug.cgi?id=165140
3410 Reviewed by Mark Lam.
3413 * microbenchmarks/tan.js:
3415 2016-11-30 JF Bastien <jfbastien@apple.com>
3417 WebAssembly builder: don't throw when checker not implemented
3418 https://bugs.webkit.org/show_bug.cgi?id=165219
3420 Reviewed by Mark Lam.
3422 We should perform whichever checks we've implemented, and assume the rest are OK until bug #163421 is fixed.
3426 * wasm/function-tests/add-12.js:
3427 * wasm/function-tests/br-if-loop-less-than.js:
3428 * wasm/function-tests/brTableAsIf.js:
3429 * wasm/function-tests/brTableManyValues.js:
3430 * wasm/function-tests/brTableWithLoop.js:
3431 * wasm/function-tests/dumb-eq-if-then-else.js:
3432 * wasm/function-tests/dumb-less-than-fallthrough.js:
3433 * wasm/function-tests/dumb-less-than-ite.js:
3434 * wasm/function-tests/eqz.js:
3435 * wasm/function-tests/factorial.js:
3436 * wasm/function-tests/float-sub.js:
3437 * wasm/function-tests/i32-load.js:
3438 * wasm/function-tests/i32-load8-s.js:
3439 * wasm/function-tests/if-then-else-fallthrough.js:
3440 * wasm/function-tests/if-then-fallthrough.js:
3441 * wasm/function-tests/loop-mult.js:
3442 * wasm/function-tests/loop-sum.js:
3443 * wasm/function-tests/max.js:
3444 * wasm/function-tests/min.js:
3445 * wasm/function-tests/ret5.js:
3446 * wasm/function-tests/select.js:
3447 * wasm/self-test/test_BuilderJSON.js:
3449 2016-11-29 JF Bastien <jfbastien@apple.com>
3451 WebAssembly JS API: improve Instance
3452 https://bugs.webkit.org/show_bug.cgi?id=164757
3454 Reviewed by Keith Miller.
3456 An Instance's `exports` property wasn't populated with exports.
3458 A follow-up patch will do imports.
3460 A few things of note:
3462 - LowLevelBinary: support 3-byte integers.
3463 - LowLevelBinary: support proper UTF-8 2003 code points (instead of UTF-16).
3466 * wasm/Builder_WebAssemblyBinary.js: wire up exports, stub other things out some more
3467 (const.emitters.Export):
3468 * wasm/LowLevelBinary.js:
3469 (export.default.LowLevelBinary.prototype.uint24): add, used for UTF-8
3470 (export.default.LowLevelBinary.prototype.string): support UTF-8
3471 (export.default.LowLevelBinary.prototype.getUint24): add, used for UTF-8
3472 (export.default.LowLevelBinary.prototype.getVaruint1): was missing
3473 (export.default.LowLevelBinary.prototype.getString): support UTF-8
3474 (export.default.LowLevelBinary):
3475 * wasm/js-api/test_Instance.js: instance.exports.answer() // <-- this is where the magic of this entire patch is
3476 (ExportedAnswerI32):
3477 * wasm/js-api/test_basic_api.js: punt test to later
3478 (const.c.in.constructorProperties.switch):
3479 * wasm/self-test/test_BuilderWebAssembly.js: UTF-8
3481 * wasm/self-test/test_LowLevelBinary_string.js: UTF-8 now works
3482 * wasm/self-test/test_LowLevelBinary_uint16.js: was missing one value
3483 * wasm/self-test/test_LowLevelBinary_uint24.js: Copied from JSTests/wasm/self-test/test_LowLevelBinary_uint8.js.
3484 * wasm/self-test/test_LowLevelBinary_uint8.js: was missing one value
3485 * wasm/self-test/test_LowLevelBinary_varuint1.js: Added.
3486 * wasm/utilities.js: this `dump` thing was useful
3489 2016-11-29 Saam Barati <sbarati@apple.com>
3491 We should be able optimize the pattern where we spread a function's rest parameter to another call
3492 https://bugs.webkit.org/show_bug.cgi?id=163865
3494 Reviewed by Filip Pizlo.
3496 * microbenchmarks/default-derived-constructor.js: Added.
3497 (createClassHierarchy.let.currentClass):
3498 (createClassHierarchy):
3499 * stress/call-varargs-spread.js: Added.
3503 * stress/load-varargs-on-new-array-with-spread-convert-to-static-loads.js: Added.
3508 * stress/new-array-with-spread-with-normal-spread-and-phantom-spread.js: Added.
3513 * stress/phantom-new-array-with-spread-osr-exit.js: Added.
3519 * stress/phantom-spread-forward-varargs.js: Added.
3535 * stress/phantom-spread-osr-exit.js: Added.
3541 * stress/spread-call-convert-to-static-call.js: Added.
3546 * stress/spread-forward-call-varargs-stack-overflow.js: Added.
3551 * stress/spread-forward-varargs-rest-parameter-change-iterator-protocol-2.js: Added.
3553 (baz.Array.prototype.Symbol.iterator):
3558 * stress/spread-forward-varargs-rest-parameter-change-iterator-protocol.js: Added.
3560 (baz.Array.prototype.Symbol.iterator):
3564 * stress/spread-forward-varargs-stack-overflow.js: Added.
3569 2016-11-29 Caitlin Potter <caitp@igalia.com>
3571 [JSC] always wrap AwaitExpression operand in a new Promise
3572 https://bugs.webkit.org/show_bug.cgi?id=165181
3574 Reviewed by Yusuke Suzuki.
3576 * stress/async-await-basic.js:
3577 (async.awaitedPromisesAreWrapped):
3579 2016-11-29 Keith Miller <keith_miller@apple.com>
3581 Add simple way to implement Wasm ops that require more than one B3 opcode
3582 https://bugs.webkit.org/show_bug.cgi?id=165129
3584 Reviewed by Geoffrey Garen.
3586 * wasm/function-tests/eqz.js: Added.
3587 * wasm/function-tests/max.js: Added.
3588 * wasm/function-tests/min.js: Added.
3591 2016-11-21 Yusuke Suzuki <utatane.tea@gmail.com>
3593 Crash in com.apple.JavaScriptCore: WTF::ThreadSpecific<WTF::WTFThreadData, + 142
3594 https://bugs.webkit.org/show_bug.cgi?id=164898
3596 Reviewed by Darin Adler.
3598 * stress/tagged-template-registry-key-collect.js: Added.
3602 * stress/tagged-template-registry-key.js: Added.
3608 2016-11-20 Caitlin Potter <caitp@igalia.com>
3610 [JSC] speed up parsing of async functions
3611 https://bugs.webkit.org/show_bug.cgi?id=164808
3613 Reviewed by Yusuke Suzuki.
3615 Add tests for line terminator following "async" keyword in async
3618 * stress/async-await-syntax.js:
3621 2016-11-19 Mark Lam <mark.lam@apple.com>
3623 op_mod-* JSC tests needs a longer timeout too.
3624 https://bugs.webkit.org/show_bug.cgi?id=164994
3626 Reviewed by Yusuke Suzuki.
3628 * stress/op_mod-ConstVar.js:
3629 * stress/op_mod-VarConst.js:
3630 * stress/op_mod-VarVar.js:
3632 2016-11-19 Mark Lam <mark.lam@apple.com>
3634 Add --timeoutMultiplier option to allow some tests more time to run.
3635 https://bugs.webkit.org/show_bug.cgi?id=164951
3637 Reviewed by Yusuke Suzuki.
3639 Extended the timeout for these tests by 50% more because they run quite slow on
3642 * stress/op_div-ConstVar.js:
3643 * stress/op_div-VarConst.js:
3644 * stress/op_div-VarVar.js:
3646 2016-11-18 Yusuke Suzuki <utatane.tea@gmail.com>
3648 REGRESSION(r208867): JSC test failure: ChakraCore.yaml/ChakraCore/test/strict/05.arguments_sm.js.default
3649 https://bugs.webkit.org/show_bug.cgi?id=164929
3651 Reviewed by Mark Lam.
3653 ES2017 drops arguments.caller and JavaScriptCore is updated to meet the spec.
3654 This patch rebaselines the result of ChakraCore test for JSC.
3656 * ChakraCore/test/strict/05.arguments_sm.baseline-jsc:
3658 2016-11-18 Joseph Pecoraro <pecoraro@apple.com>
3660 Web Inspector: Generator functions should have a displayable name when shown in stack traces
3661 https://bugs.webkit.org/show_bug.cgi?id=164844
3662 <rdar://problem/29300697>
3664 Reviewed by Yusuke Suzuki.
3666 * stress/generator-function-name.js:
3667 Add another test now that we name the inner generator function
3668 that we do not break the lexical resolution of names.
3670 2016-11-17 Yusuke Suzuki <utatane.tea@gmail.com>
3672 [JSC] Drop arguments.caller
3673 https://bugs.webkit.org/show_bug.cgi?id=164859
3675 Reviewed by Saam Barati.
3677 * stress/strict-mode-arguments-caller.js: Added.
3681 2016-11-17 Keith Miller <keith_miller@apple.com>
3684 https://bugs.webkit.org/show_bug.cgi?id=164871
3686 Reviewed by Filip Pizlo.
3690 2016-11-17 Keith Miller <keith_miller@apple.com>
3693 https://bugs.webkit.org/show_bug.cgi?id=164877
3695 Reviewed by Mark Lam.
3697 B3 already has a Sqrt opcode we just need to map Wasm to it.
3701 2016-11-17 Saam Barati <sbarati@apple.com>
3703 Remove async/await compile time flag and enable tests
3704 https://bugs.webkit.org/show_bug.cgi?id=164828
3705 <rdar://problem/28639334>
3707 Reviewed by Yusuke Suzuki.
3709 * stress/async-arrow-functions-lexical-arguments-binding.js:
3710 * stress/async-arrow-functions-lexical-new.target-binding.js:
3711 * stress/async-arrow-functions-lexical-super-binding.js:
3712 * stress/async-arrow-functions-lexical-this-binding.js:
3713 * stress/async-await-basic.js:
3714 * stress/async-await-long-loop.js:
3715 * stress/async-await-module-reserved-word.js:
3716 * stress/async-await-mozilla.js:
3718 * stress/async-await-reserved-word.js:
3719 * stress/async-await-syntax.js:
3720 * stress/async-await-throw-loop.js:
3721 * stress/async-function-create-nobaseline.js:
3722 * stress/async-function-create-optimized.js:
3723 * stress/async-function-declaration-sinking-no-double-allocate.js:
3724 * stress/async-function-declaration-sinking-osrexit.js:
3725 * stress/async-function-declaration-sinking-put.js:
3726 * stress/async-function-expression-sinking-no-double-allocate.js:
3727 * stress/async-function-expression-sinking-osrexit.js:
3728 * stress/async-function-expression-sinking-put.js:
3731 2016-11-15 Mark Lam <mark.lam@apple.com>
3733 Make JSC test functions more robust.
3734 https://bugs.webkit.org/show_bug.cgi?id=164807
3736 Reviewed by Keith Miller.