1 2017-03-23 Mark Lam <mark.lam@apple.com>
3 Clients of JSArray::tryCreateForInitializationPrivate() should do their own null checks.
4 https://bugs.webkit.org/show_bug.cgi?id=169783
6 Reviewed by Saam Barati.
8 * stress/regress-169783.js: Added.
10 2017-03-22 Yusuke Suzuki <utatane.tea@gmail.com>
12 [JSC][DFG] Propagate AnyIntAsDouble information carefully to utilize it in fixup
13 https://bugs.webkit.org/show_bug.cgi?id=169914
15 Reviewed by Saam Barati.
17 * stress/any-int-as-double-add.js: Added.
20 * stress/to-this-numbers.js: Added.
22 (Number.prototype.toThis):
24 2017-03-22 Mark Lam <mark.lam@apple.com>
26 Add support for Error.stackTraceLimit.
27 https://bugs.webkit.org/show_bug.cgi?id=169904
29 Reviewed by Saam Barati.
31 * stress/error-stack-trace-limit.js: Added.
33 2017-03-22 Yusuke Suzuki <utatane.tea@gmail.com>
35 [JSC] Use jsNontrivialString for Number toString operations
36 https://bugs.webkit.org/show_bug.cgi?id=169965
40 * stress/to-string-int32.js: Added.
45 2017-03-22 JF Bastien <jfbastien@apple.com>
47 WebAssembly: test module namespace object for WebAssembly.Instance
48 https://bugs.webkit.org/show_bug.cgi?id=169951
50 Reviewed by Saam Barati.
52 * wasm/js-api/test_basic_api.js:
53 (const.c.in.constructorProperties.switch):
55 2017-03-22 JF Bastien <jfbastien@apple.com>
57 WebAssembly: constructors without new don't throw
58 https://bugs.webkit.org/show_bug.cgi?id=165995
60 Reviewed by Saam Barati.
62 * wasm/js-api/test_basic_api.js:
63 (const.c.in.constructorProperties.switch):
65 2017-03-21 Yusuke Suzuki <utatane.tea@gmail.com>
67 [JSC] Optimize Number.prototype.toString on Int32 / Int52 / Double
68 https://bugs.webkit.org/show_bug.cgi?id=167454
70 Reviewed by Saam Barati.
72 * stress/number-to-string-abstract-operation.js: Added.
75 (shouldBe.int32ToString.new.Number.int52ToString):
76 (shouldBe.int32ToString.new.Number):
77 (shouldBe.doubleToString):
78 * stress/number-to-string-radix.js: Added.
81 (shouldBe.int32ToString.new.Number.int52ToString):
82 (shouldBe.int32ToString.new.Number):
83 (shouldBe.doubleToString):
84 * stress/number-to-string.js: Added.
87 (shouldBe.int32ToString.new.Number.int52ToString):
88 (shouldBe.int32ToString.new.Number):
89 (shouldBe.doubleToString):
91 2017-03-19 Chris Dumez <cdumez@apple.com>
93 `const location = "foo"` throws in a worker
94 https://bugs.webkit.org/show_bug.cgi?id=169839
98 * ChakraCore/test/es6/letconst_global_shadow_builtins_nonconfigurable.baseline-jsc:
99 Update expected jsc result now that we throw a SyntaxError when trying to shadow undefined
100 with a let variable. We used not to throw because the value is undefined but this was not
101 as per EcmaScript. Both Firefox and Chrome throw in this case.
103 * stress/global-lexical-redeclare-variable.js:
105 Update test that defines a non-configurable 'zoo' property on the global object and then
106 expected shadowing it with a 'let zoo' variable to work because its value was undefined.
107 This was not as per EcmaScript spec and both Firefox and Chrome throw in this case.
109 2017-03-19 Yusuke Suzuki <utatane.tea@gmail.com>
111 import(arg) crashes when ToString(arg) throws
112 https://bugs.webkit.org/show_bug.cgi?id=169778
114 Reviewed by Saam Barati.
116 * stress/import-reject-with-exception.js: Added.
118 (let.x.get toString):
120 2017-03-16 Filip Pizlo <fpizlo@apple.com>
122 FTL should support global and eval code
123 https://bugs.webkit.org/show_bug.cgi?id=169656
125 Reviewed by Geoffrey Garen and Saam Barati.
127 Added basic performance tests of global and eval code. These tests will run a lot faster in with
128 the FTL because of the object allocation.
130 * microbenchmarks/eval-code-ftl-reentry.js: Added.
131 * microbenchmarks/eval-code-ftl.js: Added.
132 * microbenchmarks/global-code-ftl.js: Added.
133 * stress/arith-log-on-various-types.js: This was a flaky fail with concurrent JIT, so I stopped running it with concurrent JIT. The failure was its assertion about how many times something gets compiled.
135 2017-03-16 Caio Lima <ticaiolima@gmail.com>
137 [ESnext] Implement Object Spread
138 https://bugs.webkit.org/show_bug.cgi?id=167963
140 Reviewed by Yusuke Suzuki.
142 * stress/object-spread.js: Added.
151 (try.let.obj.get foo):
154 2017-03-15 Yusuke Suzuki <utatane.tea@gmail.com>
156 [JSC] Default parameter part should be retrieved by op_get_argument opcode instead of changing arity
157 https://bugs.webkit.org/show_bug.cgi?id=164582
159 Reviewed by Saam Barati.
161 * stress/function-with-defaults-inlining.js: Added.
165 * stress/function-with-defaults-non-inlining.js: Added.
170 2017-03-15 Yusuke Suzuki <utatane.tea@gmail.com>
172 [DFG] ToString operation should have fixup for primitives to say this node does not have side effects
173 https://bugs.webkit.org/show_bug.cgi?id=169544
175 Reviewed by Saam Barati.
177 * microbenchmarks/template-string-array.js: Added.
179 * stress/to-string-non-cell-use.js: Added.
183 2017-03-13 Commit Queue <commit-queue@webkit.org>
185 Unreviewed, rolling out r213856.
186 https://bugs.webkit.org/show_bug.cgi?id=169562
188 Breaks JSC stress test stress/super-property-access.js.ftl-
189 eager failing (Requested by mlam|g on #webkit).
193 "FTL should not flush strict arguments unless it really needs
195 https://bugs.webkit.org/show_bug.cgi?id=169519
196 http://trac.webkit.org/changeset/213856
198 2017-03-11 Filip Pizlo <fpizlo@apple.com>
200 FTL should not flush strict arguments unless it really needs to
201 https://bugs.webkit.org/show_bug.cgi?id=169519
203 Reviewed by Mark Lam.
205 This benchmark runs 3.5x faster thanks to this patch.
207 * microbenchmarks/strict-arguments-no-escape.js: Added.
212 2017-03-13 Caio Lima <ticaiolima@gmail.com>
214 [JSC] It should be possible create a label named let when parsing Statement in non strict mode
215 https://bugs.webkit.org/show_bug.cgi?id=168684
217 Reviewed by Saam Barati.
219 * ChakraCore/test/LetConst/DeclOutofBlock.baseline-jsc:
221 2017-03-10 Saam Barati <sbarati@apple.com>
223 WebAssembly: Make more demos run
224 https://bugs.webkit.org/show_bug.cgi?id=165510
225 <rdar://problem/29760310>
227 Reviewed by Keith Miller.
230 (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
231 * wasm/js-api/wrapper-function.js: Added.
233 (return.new.WebAssembly.Module):
234 (assert.throws.makeInstance):
238 2017-03-10 Mark Lam <mark.lam@apple.com>
240 JSC: BindingNode::bindValue doesn't increase the scope's reference count.
241 https://bugs.webkit.org/show_bug.cgi?id=168546
242 <rdar://problem/30589551>
244 Reviewed by Saam Barati.
246 * stress/regress-168546.js: Added.
248 2017-03-09 Caio Lima <ticaiolima@gmail.com>
250 [ESnext] Implement Object Rest - Implementing Object Rest Destructuring
251 https://bugs.webkit.org/show_bug.cgi?id=167962
253 Reviewed by Keith Miller.
255 * stress/object-rest-deconstruct.js: Added.
257 (let.assertPropDescriptor):
265 2017-03-09 Saam Barati <sbarati@apple.com>
267 WebAssembly: Make the Unity AngryBots demo run
268 https://bugs.webkit.org/show_bug.cgi?id=169268
270 Reviewed by Keith Miller.
272 * wasm/function-tests/many-arguments-to-function.js: Added.
273 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.I32Const.0.I32Const.1.I32Const.2.I32Const.3.I32Const.4.I32Const.5.I32Const.6.I32Const.7.I32Const.8.I32Const.9.I32Const.10.I32Const.11.I32Const.12.I32Const.13.I32Const.14.I32Const.15.I32Const.16.I32Const.17.Call.0.Return.End.End.foo):
274 (i.instance.exports.f0.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.Call.Return.End.End.foo):
275 (i.instance.exports.f0):
276 (instance.exports.f0.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.Call.Return.End.End.foo):
277 (instance.exports.f0):
279 2017-03-08 Yusuke Suzuki <utatane.tea@gmail.com>
281 [GTK] JSC test stress/arity-check-ftl-throw.js.ftl-no-cjit-validate-sampling-profiler crashing on GTK bot
282 https://bugs.webkit.org/show_bug.cgi?id=160124
284 Reviewed by Mark Lam.
286 * stress/spread-forward-call-varargs-stack-overflow.js:
288 2017-03-06 Saam Barati <sbarati@apple.com>
290 WebAssembly: Implement the WebAssembly.instantiate API
291 https://bugs.webkit.org/show_bug.cgi?id=165982
292 <rdar://problem/29760110>
294 Reviewed by Keith Miller.
296 * wasm/js-api/web-assembly-instantiate.js: Added.
297 (assert.eq.async.test):
299 (assert.truthy.async.test):
302 2017-03-06 Saam Barati <sbarati@apple.com>
304 Unreviewed. Fix test expected error message.
306 * wasm/js-api/element.js:
309 2017-03-06 Caio Lima <ticaiolima@gmail.com>
311 op_get_by_id_with_this should use inline caching
312 https://bugs.webkit.org/show_bug.cgi?id=162124
314 Reviewed by Saam Barati.
316 * microbenchmarks/super-getter.js: Added.
321 * stress/super-force-ic-fail.js: Added.
327 * stress/super-get-by-id.js: Added.
330 (Base.prototype.get name):
331 (Base.prototype.set name):
332 (Subclass.prototype.get name):
336 (PolymorphicSubclass.prototype.get value):
337 (PolymorphicSubclass):
340 (MegamorphicSubclass.prototype.get value):
341 (MegamorphicSubclass):
342 (let.subObj.get value):
346 (BaseException.prototype.get name):
347 (SubclassException.prototype.get name):
350 (prototype.get name):
351 (SubclassExceptionComplex.prototype.get name):
352 (SubclassExceptionComplex):
353 * stress/super-getter-reset-ic.js: Added.
357 2017-03-06 Saam Barati <sbarati@apple.com>
359 WebAssembly: implement init_expr for Element
360 https://bugs.webkit.org/show_bug.cgi?id=165888
361 <rdar://problem/29760199>
363 Reviewed by Keith Miller.
365 * wasm/Builder_WebAssemblyBinary.js:
366 (const.emitters.Element):
368 * wasm/js-api/element.js:
370 (badInstantiation.makeModule):
371 (badInstantiation.test):
373 * wasm/js-api/global-error.js:
375 2017-03-06 Carlos Alberto Lopez Perez <clopez@igalia.com>
377 [JSC] [Linux] Test stress/spread-forward-call-varargs-stack-overflow.js fails
378 https://bugs.webkit.org/show_bug.cgi?id=169206
380 Unreviewed test gardening.
382 * stress/spread-forward-call-varargs-stack-overflow.js: Skip on Linux platforms.
384 2017-03-06 Yusuke Suzuki <utatane.tea@gmail.com>
386 [JSC] Allow indexed module namespace object fields
387 https://bugs.webkit.org/show_bug.cgi?id=168870
389 Reviewed by Saam Barati.
391 * wasm/spec-tests/names.wast.js:
393 2017-03-06 Yusuke Suzuki <utatane.tea@gmail.com>
395 Null pointer crash when loading module with unresolved import also as a script file
396 https://bugs.webkit.org/show_bug.cgi?id=168971
398 Reviewed by Saam Barati.
400 * stress/re-execute-error-module.js: Added.
403 * stress/resources/error-module.js: Added.
405 2017-03-02 Keith Miller <keith_miller@apple.com>
407 WebAssemblyFunction should have Function.prototype as its prototype
408 https://bugs.webkit.org/show_bug.cgi?id=169101
410 Reviewed by Filip Pizlo.
412 * wasm/js-api/web-assembly-function.js: Added.
414 2017-02-28 Oleksandr Skachkov <gskachkov@gmail.com>
416 Use of arguments in arrow function is slow
417 https://bugs.webkit.org/show_bug.cgi?id=168829
419 Reviewed by Saam Barati.
421 * microbenchmarks/arrowfunciton-direct-arguments.js: Added.
423 * microbenchmarks/arrowfunciton-reference-arguments.js: Added.
426 2017-02-27 Commit Queue <commit-queue@webkit.org>
428 Unreviewed, rolling out r213019.
429 https://bugs.webkit.org/show_bug.cgi?id=168925
431 "It broke 32-bit jsc tests in debug builds" (Requested by
432 saamyjoon on #webkit).
436 "op_get_by_id_with_this should use inline caching"
437 https://bugs.webkit.org/show_bug.cgi?id=162124
438 http://trac.webkit.org/changeset/213019
440 2017-02-27 JF Bastien <jfbastien@apple.com>
442 WebAssembly: miscellaneous spec fixes part deux
443 https://bugs.webkit.org/show_bug.cgi?id=168861
445 Reviewed by Keith Miller.
447 * wasm.yaml: more passing tests
448 * wasm/Builder.js: use a Map instead of an Object for the function
449 index space, because Number entries such as 0 were colliding with
450 string entries such as "0". This in turn requires some hashing of
451 objects which are inserted, because Map uses Object's insertion
452 order when comparing.
453 (export.default.Builder):
454 (export.default.Builder.prototype._functionIndexSpaceKeyHash):
455 (export.default.Builder.prototype._registerFunctionToIndexSpace):
456 (export.default.Builder.prototype._getFunctionFromIndexSpace):
457 * wasm/js-api/test_Instance.js: add a FIXME test
458 * wasm/spec-tests/memory.wast.js:
460 * wasm/spec-tests/names.wast.js:
462 2017-02-26 Caio Lima <ticaiolima@gmail.com>
464 op_get_by_id_with_this should use inline caching
465 https://bugs.webkit.org/show_bug.cgi?id=162124
467 Reviewed by Saam Barati.
469 * microbenchmarks/super-getter.js: Added.
474 * stress/super-force-ic-fail.js: Added.
480 * stress/super-get-by-id.js: Added.
483 (Base.prototype.get name):
484 (Base.prototype.set name):
485 (Subclass.prototype.get name):
489 (PolymorphicSubclass.prototype.get value):
490 (PolymorphicSubclass):
493 (MegamorphicSubclass.prototype.get value):
494 (MegamorphicSubclass):
495 (let.subObj.get value):
499 (BaseException.prototype.get name):
500 (SubclassException.prototype.get name):
503 (prototype.get name):
504 (SubclassExceptionComplex.prototype.get name):
505 (SubclassExceptionComplex):
506 * stress/super-getter-reset-ic.js: Added.
510 2017-02-24 JF Bastien <jfbastien@apple.com>
512 WebAssembly: miscellaneous spec fixes
513 https://bugs.webkit.org/show_bug.cgi?id=168822
515 Reviewed by Saam Barati.
517 * wasm.yaml: mark some skip tests as normal, now that they pass
518 * wasm/Builder.js: error message was wrong, causing extra error if hit
519 * wasm/js-api/global-error.js: new tests
521 * wasm/spec-tests/call.wast.js: comment out stack check tests
522 * wasm/spec-tests/call_indirect.wast.js: comment out stack check tests
523 * wasm/spec-tests/fac.wast.js: comment out stack check tests
524 * wasm/spec-tests/float_exprs.wast.js: wabt is wrong, bug reported, we should update
525 * wasm/spec-tests/imports.wast.js: bug in old wabt, fixed in recent wabt
528 2017-02-23 Saam Barati <sbarati@apple.com>
530 Intrinsicify parseInt
531 https://bugs.webkit.org/show_bug.cgi?id=168627
533 Reviewed by Filip Pizlo.
535 * stress/parse-int-intrinsic.js: Added.
537 (testIntrinsic.let.s):
539 (testIntrinsic2.baz):
541 (testIntrinsic3.foo):
543 (testIntrinsic4.foo):
545 (testIntrinsic5.foo):
547 (testIntrinsic6.foo):
549 (testIntrinsic7.foo):
552 2017-02-23 JF Bastien <jfbastien@apple.com>
554 WebAssembly: support 0x1 version
555 https://bugs.webkit.org/show_bug.cgi?id=168672
557 Reviewed by Keith Miller.
559 Update the version number for all the tests. Note that the spec
560 tests are only updated with a new version number because spec+wabt
561 aren't ready for 0x1 yet. This is tracked by bug #168784.
563 * wasm/import-spec-tests.rb: use the new spec repository layout
564 * wasm/js-api/test_basic_api.js:
565 * wasm/self-test/test_BuilderWebAssembly.js:
568 * wasm/spec-tests/address.wast.js:
569 * wasm/spec-tests/binary.wast.js:
570 * wasm/spec-tests/block.wast.js:
571 * wasm/spec-tests/br.wast.js:
572 * wasm/spec-tests/br_if.wast.js:
573 * wasm/spec-tests/br_table.wast.js:
574 * wasm/spec-tests/break-drop.wast.js:
575 * wasm/spec-tests/call.wast.js:
576 * wasm/spec-tests/call_indirect.wast.js:
577 * wasm/spec-tests/comments.wast.js:
578 * wasm/spec-tests/conversions.wast.js:
579 * wasm/spec-tests/custom_section.wast.js:
580 * wasm/spec-tests/endianness.wast.js:
581 * wasm/spec-tests/exports.wast.js:
582 * wasm/spec-tests/f32.wast.js:
583 * wasm/spec-tests/f32_cmp.wast.js:
584 * wasm/spec-tests/f64.wast.js:
585 * wasm/spec-tests/f64_cmp.wast.js:
586 * wasm/spec-tests/fac.wast.js:
587 * wasm/spec-tests/float_exprs.wast.js:
588 * wasm/spec-tests/float_literals.wast.js:
589 * wasm/spec-tests/float_memory.wast.js:
590 * wasm/spec-tests/float_misc.wast.js:
591 * wasm/spec-tests/forward.wast.js:
592 * wasm/spec-tests/func.wast.js:
593 * wasm/spec-tests/func_ptrs.wast.js:
594 * wasm/spec-tests/get_local.wast.js:
595 * wasm/spec-tests/globals.wast.js:
596 * wasm/spec-tests/i32.wast.js:
597 * wasm/spec-tests/i64.wast.js:
598 * wasm/spec-tests/imports.wast.js:
599 * wasm/spec-tests/int_exprs.wast.js:
600 * wasm/spec-tests/int_literals.wast.js:
601 * wasm/spec-tests/left-to-right.wast.js:
602 * wasm/spec-tests/linking.wast.js:
603 * wasm/spec-tests/loop.wast.js:
604 * wasm/spec-tests/memory.wast.js:
605 * wasm/spec-tests/memory_redundancy.wast.js:
606 * wasm/spec-tests/memory_trap.wast.js:
607 * wasm/spec-tests/names.wast.js:
608 * wasm/spec-tests/nop.wast.js:
609 * wasm/spec-tests/resizing.wast.js:
610 * wasm/spec-tests/return.wast.js:
611 * wasm/spec-tests/select.wast.js:
612 * wasm/spec-tests/set_local.wast.js:
613 * wasm/spec-tests/skip-stack-guard-page.wast.js:
614 * wasm/spec-tests/stack.wast.js:
615 * wasm/spec-tests/start.wast.js:
616 * wasm/spec-tests/store_retval.wast.js:
617 * wasm/spec-tests/switch.wast.js:
618 * wasm/spec-tests/tee_local.wast.js:
619 * wasm/spec-tests/traps.wast.js:
620 * wasm/spec-tests/typecheck.wast.js:
621 * wasm/spec-tests/unreachable.wast.js:
622 * wasm/spec-tests/unwind.wast.js:
625 2017-02-22 Yusuke Suzuki <utatane.tea@gmail.com>
627 JSModuleNamespace object should have IC
628 https://bugs.webkit.org/show_bug.cgi?id=160590
630 Reviewed by Saam Barati.
632 * modules/module-assert-access-binding.js: Added.
633 * modules/module-assert-access-namespace.js: Added.
634 * modules/namespace-empty.js: Added.
635 (from.string_appeared_here.access):
637 * stress/module-namespace-access-change.js: Added.
640 (import.string_appeared_here.then):
641 * stress/module-namespace-access-non-constant.js: Added.
643 (import.string_appeared_here.then):
644 * stress/module-namespace-access-poly.js: Added.
647 (import.string_appeared_here.then):
648 * stress/module-namespace-access-transitive-exports.js: Added.
650 (import.string_appeared_here.then):
651 * stress/module-namespace-access.js: Added.
653 (import.string_appeared_here.then):
654 * stress/resources/module-namespace-access-transitive-exports-2.js: Added.
657 * stress/resources/module-namespace-access-transitive-exports.js: Added.
658 * stress/resources/module-namespace-access.js: Added.
662 2017-02-20 Filip Pizlo <fpizlo@apple.com>
664 The collector thread should only start when the mutator doesn't have heap access
665 https://bugs.webkit.org/show_bug.cgi?id=167737
667 Reviewed by Keith Miller.
669 Add versions of splay that flash heap access, to simulate what might happen if a third-party app
670 was running concurrent GC. In this case, we might actually start the collector thread.
672 * stress/splay-flash-access-1ms.js: Added.
674 (this.Setup.setup.setup):
675 (this.TearDown.tearDown.tearDown):
678 (BenchmarkResult.prototype.valueOf):
682 (BenchmarkSuite.ResetRNG):
684 (BenchmarkSuite.RunSuites):
685 (BenchmarkSuite.CountBenchmarks):
686 (BenchmarkSuite.GeometricMean):
687 (BenchmarkSuite.GeometricMeanTime):
688 (BenchmarkSuite.AverageAbovePercentile):
689 (BenchmarkSuite.GeometricMeanLatency):
690 (BenchmarkSuite.FormatScore):
691 (BenchmarkSuite.prototype.NotifyStep):
692 (BenchmarkSuite.prototype.NotifyResult):
693 (BenchmarkSuite.prototype.NotifyError):
694 (BenchmarkSuite.prototype.RunSingleBenchmark):
698 (BenchmarkSuite.prototype.RunStep):
699 (GeneratePayloadTree):
707 (SplayTree.prototype.isEmpty):
708 (SplayTree.prototype.insert):
709 (SplayTree.prototype.remove):
710 (SplayTree.prototype.find):
711 (SplayTree.prototype.findMax):
712 (SplayTree.prototype.findGreatestLessThan):
713 (SplayTree.prototype.exportKeys):
714 (SplayTree.prototype.splay_):
716 (SplayTree.Node.prototype.traverse_):
720 (averageAbovePercentile):
722 * stress/splay-flash-access.js: Added.
724 (this.Setup.setup.setup):
725 (this.TearDown.tearDown.tearDown):
728 (BenchmarkResult.prototype.valueOf):
732 (BenchmarkSuite.ResetRNG):
734 (BenchmarkSuite.RunSuites):
735 (BenchmarkSuite.CountBenchmarks):
736 (BenchmarkSuite.GeometricMean):
737 (BenchmarkSuite.GeometricMeanTime):
738 (BenchmarkSuite.AverageAbovePercentile):
739 (BenchmarkSuite.GeometricMeanLatency):
740 (BenchmarkSuite.FormatScore):
741 (BenchmarkSuite.prototype.NotifyStep):
742 (BenchmarkSuite.prototype.NotifyResult):
743 (BenchmarkSuite.prototype.NotifyError):
744 (BenchmarkSuite.prototype.RunSingleBenchmark):
748 (BenchmarkSuite.prototype.RunStep):
749 (GeneratePayloadTree):
757 (SplayTree.prototype.isEmpty):
758 (SplayTree.prototype.insert):
759 (SplayTree.prototype.remove):
760 (SplayTree.prototype.find):
761 (SplayTree.prototype.findMax):
762 (SplayTree.prototype.findGreatestLessThan):
763 (SplayTree.prototype.exportKeys):
764 (SplayTree.prototype.splay_):
766 (SplayTree.Node.prototype.traverse_):
770 (averageAbovePercentile):
773 2017-02-21 Ryan Haddad <ryanhaddad@apple.com>
775 Unreviewed, rolling out r212712.
777 This change broke the CLoop build.
781 "JSModuleNamespace object should have IC"
782 https://bugs.webkit.org/show_bug.cgi?id=160590
783 http://trac.webkit.org/changeset/212712
785 2017-02-21 Yusuke Suzuki <utatane.tea@gmail.com>
787 JSModuleNamespace object should have IC
788 https://bugs.webkit.org/show_bug.cgi?id=160590
790 Reviewed by Saam Barati.
792 * modules/module-assert-access-binding.js: Added.
793 * modules/module-assert-access-namespace.js: Added.
794 * modules/namespace-empty.js: Added.
795 (from.string_appeared_here.access):
797 * stress/module-namespace-access-change.js: Added.
800 (import.string_appeared_here.then):
801 * stress/module-namespace-access-non-constant.js: Added.
803 (import.string_appeared_here.then):
804 * stress/module-namespace-access-poly.js: Added.
807 (import.string_appeared_here.then):
808 * stress/module-namespace-access-transitive-exports.js: Added.
810 (import.string_appeared_here.then):
811 * stress/module-namespace-access.js: Added.
813 (import.string_appeared_here.then):
814 * stress/resources/module-namespace-access-transitive-exports-2.js: Added.
817 * stress/resources/module-namespace-access-transitive-exports.js: Added.
818 * stress/resources/module-namespace-access.js: Added.
822 2017-02-21 Yusuke Suzuki <utatane.tea@gmail.com>
824 ASSERTION FAILED: "!scope.exception()" with Object.isSealed/isFrozen and uninitialized module bindings
825 https://bugs.webkit.org/show_bug.cgi?id=168605
827 Reviewed by Saam Barati.
829 * modules/module-namespace-is-frozen.js: Added.
830 (from.string_appeared_here.shouldThrow):
832 * modules/module-namespace-is-sealed.js: Added.
833 (from.string_appeared_here.shouldThrow):
836 2017-02-19 Commit Queue <commit-queue@webkit.org>
838 Unreviewed, rolling out r212466.
839 https://bugs.webkit.org/show_bug.cgi?id=168577
841 causes crashes on AArch64 on linux, maybe it's causing crashes
842 on iOS too (Requested by pizlo on #webkit).
846 "The collector thread should only start when the mutator
847 doesn't have heap access"
848 https://bugs.webkit.org/show_bug.cgi?id=167737
849 http://trac.webkit.org/changeset/212466
851 2017-02-10 Filip Pizlo <fpizlo@apple.com>
853 The collector thread should only start when the mutator doesn't have heap access
854 https://bugs.webkit.org/show_bug.cgi?id=167737
856 Reviewed by Keith Miller.
858 Add versions of splay that flash heap access, to simulate what might happen if a third-party app
859 was running concurrent GC. In this case, we might actually start the collector thread.
861 * stress/splay-flash-access-1ms.js: Added.
863 (this.Setup.setup.setup):
864 (this.TearDown.tearDown.tearDown):
867 (BenchmarkResult.prototype.valueOf):
871 (BenchmarkSuite.ResetRNG):
873 (BenchmarkSuite.RunSuites):
874 (BenchmarkSuite.CountBenchmarks):
875 (BenchmarkSuite.GeometricMean):
876 (BenchmarkSuite.GeometricMeanTime):
877 (BenchmarkSuite.AverageAbovePercentile):
878 (BenchmarkSuite.GeometricMeanLatency):
879 (BenchmarkSuite.FormatScore):
880 (BenchmarkSuite.prototype.NotifyStep):
881 (BenchmarkSuite.prototype.NotifyResult):
882 (BenchmarkSuite.prototype.NotifyError):
883 (BenchmarkSuite.prototype.RunSingleBenchmark):
887 (BenchmarkSuite.prototype.RunStep):
888 (GeneratePayloadTree):
896 (SplayTree.prototype.isEmpty):
897 (SplayTree.prototype.insert):
898 (SplayTree.prototype.remove):
899 (SplayTree.prototype.find):
900 (SplayTree.prototype.findMax):
901 (SplayTree.prototype.findGreatestLessThan):
902 (SplayTree.prototype.exportKeys):
903 (SplayTree.prototype.splay_):
905 (SplayTree.Node.prototype.traverse_):
909 (averageAbovePercentile):
911 * stress/splay-flash-access.js: Added.
913 (this.Setup.setup.setup):
914 (this.TearDown.tearDown.tearDown):
917 (BenchmarkResult.prototype.valueOf):
921 (BenchmarkSuite.ResetRNG):
923 (BenchmarkSuite.RunSuites):
924 (BenchmarkSuite.CountBenchmarks):
925 (BenchmarkSuite.GeometricMean):
926 (BenchmarkSuite.GeometricMeanTime):
927 (BenchmarkSuite.AverageAbovePercentile):
928 (BenchmarkSuite.GeometricMeanLatency):
929 (BenchmarkSuite.FormatScore):
930 (BenchmarkSuite.prototype.NotifyStep):
931 (BenchmarkSuite.prototype.NotifyResult):
932 (BenchmarkSuite.prototype.NotifyError):
933 (BenchmarkSuite.prototype.RunSingleBenchmark):
937 (BenchmarkSuite.prototype.RunStep):
938 (GeneratePayloadTree):
946 (SplayTree.prototype.isEmpty):
947 (SplayTree.prototype.insert):
948 (SplayTree.prototype.remove):
949 (SplayTree.prototype.find):
950 (SplayTree.prototype.findMax):
951 (SplayTree.prototype.findGreatestLessThan):
952 (SplayTree.prototype.exportKeys):
953 (SplayTree.prototype.splay_):
955 (SplayTree.Node.prototype.traverse_):
959 (averageAbovePercentile):
962 2017-02-16 Yusuke Suzuki <utatane.tea@gmail.com>
964 [JSC] Update module namespace object according to the latest ECMA262
965 https://bugs.webkit.org/show_bug.cgi?id=168280
967 Reviewed by Saam Barati.
969 * modules/namespace-object-symbol-iterator-name.js:
970 * modules/namespace-object-typed-array-fast-path.js:
971 * modules/namespace.js:
972 (shouldBe.JSON.stringify.Reflect.getOwnPropertyDescriptor):
975 2017-02-11 Yusuke Suzuki <utatane.tea@gmail.com>
977 [JSC] Implement (Shared)ArrayBuffer.prototype.byteLength
978 https://bugs.webkit.org/show_bug.cgi?id=166476
980 Reviewed by Saam Barati.
982 * ChakraCore/test/typedarray/arraybufferType.baseline-jsc:
983 * stress/array-buffer-byte-length.js: Added.
987 * stress/reflect-set.js:
989 2017-02-10 Saam Barati <sbarati@apple.com>
991 Object allocation sinking phase doesn't properly handle control flow when emitting a PutHint of a materialized object into a PromotedHeapLocation of a still sunken object
992 https://bugs.webkit.org/show_bug.cgi?id=168140
993 <rdar://problem/30205880>
995 Reviewed by Filip Pizlo.
997 * stress/allocation-sinking-puthint-control-flow.js: Added.
1006 2017-02-09 Mark Lam <mark.lam@apple.com>
1008 B3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
1009 https://bugs.webkit.org/show_bug.cgi?id=167437
1010 <rdar://problem/30198083>
1012 Reviewed by Filip Pizlo.
1014 * stress/b3-delete-orphans-should-neutralize-upsilons-with-dead-phis.js: Added.
1016 2017-02-09 Saam Barati <sbarati@apple.com>
1018 Sloppy mode: We don't properly hoist functions names "arguments" when we have a non-simple parameter list
1019 https://bugs.webkit.org/show_bug.cgi?id=167319
1020 <rdar://problem/30149432>
1022 Reviewed by Mark Lam.
1024 * stress/sloppy-mode-hoist-arguments-function-non-simple-parameter-list.js: Added.
1032 2017-02-09 Mark Lam <mark.lam@apple.com>
1034 Fix max length check in ArrayPrototype.js' concatSlowPath().
1035 https://bugs.webkit.org/show_bug.cgi?id=167270
1036 <rdar://problem/30128133>
1038 Reviewed by Filip Pizlo.
1040 * stress/array-prototype-concat-of-long-spliced-arrays.js: Added.
1041 * stress/array-prototype-concat-of-long-spliced-arrays2.js: Added.
1043 2017-02-09 Keith Miller <keith_miller@apple.com>
1045 We should not allow Function.caller to be used on native functions
1046 https://bugs.webkit.org/show_bug.cgi?id=165628
1048 Reviewed by Mark Lam.
1050 * stress/caller-native-code.js: Added.
1053 2017-02-04 Yusuke Suzuki <utatane.tea@gmail.com>
1055 [JSC] Add operationToInt32SensibleSlow to optimize kraken pbkdf2 and sha256
1056 https://bugs.webkit.org/show_bug.cgi?id=167736
1058 Reviewed by Saam Barati.
1060 * stress/to-int32-sensible.js: Added.
1065 2017-02-01 Yusuke Suzuki <utatane.tea@gmail.com>
1067 Unreviewed, remove loop
1068 https://bugs.webkit.org/show_bug.cgi?id=167694
1071 Original bug can be tested even without this loop.
1073 * stress/arity-fixup-should-not-touch-stack-area-below-sp.js:
1075 2017-02-01 Yusuke Suzuki <utatane.tea@gmail.com>
1077 ArityFixup should adjust SP first
1078 https://bugs.webkit.org/show_bug.cgi?id=167239
1080 Reviewed by Michael Saboff.
1082 Significantly large arity fixup reliably causes this crash.
1084 * stress/arity-fixup-should-not-touch-stack-area-below-sp.js: Added.
1086 2017-01-31 Filip Pizlo <fpizlo@apple.com>
1088 Move slow-running microbenchmarks out of JSTests/microbenchmarks
1089 https://bugs.webkit.org/show_bug.cgi?id=167676
1091 Reviewed by Saam Barati.
1093 The microbenchmarks directory is profitable when it's cheap to run. This change moves very slow
1094 tests (>=200ms running time on my machine) and puts them in JSTests/slowMicrobenchmarks instead.
1095 That directory is run only through `slow!; defaultQuickRun` and is not run by run-jsc-benchmarks.
1096 This is a big progression in test running time. But because it frontloads more slow tests, the
1097 tests will seem to run more slowly when you first start the test runner.
1099 * microbenchmarks/default-derived-constructor.js: Removed.
1100 * microbenchmarks/dense-set.js: Removed.
1101 * microbenchmarks/ftl-polymorphic-div.js: Removed.
1102 * microbenchmarks/ftl-polymorphic-mul.js: Removed.
1103 * microbenchmarks/function-bind-inlining.js: Removed.
1104 * microbenchmarks/function-bind-no-inlining.js: Removed.
1105 * microbenchmarks/large-map-iteration-with-additions.js: Removed.
1106 * microbenchmarks/large-map-iteration-with-mutation.js: Removed.
1107 * microbenchmarks/map-get-get-cse.js: Removed.
1108 * microbenchmarks/misc-bugs-847389-jpeg2000.js: Removed.
1109 * microbenchmarks/spread-small-array.js: Removed.
1110 * microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Removed.
1111 * slowMicrobenchmarks: Added.
1112 * slowMicrobenchmarks.yaml: Added.
1113 * slowMicrobenchmarks/README: Added.
1114 * slowMicrobenchmarks/default-derived-constructor.js: Copied from JSTests/microbenchmarks/default-derived-constructor.js.
1115 * slowMicrobenchmarks/dense-set.js: Copied from JSTests/microbenchmarks/dense-set.js.
1116 * slowMicrobenchmarks/ftl-polymorphic-div.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-div.js.
1117 * slowMicrobenchmarks/ftl-polymorphic-mul.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-mul.js.
1118 * slowMicrobenchmarks/function-bind-inlining.js: Copied from JSTests/microbenchmarks/function-bind-inlining.js.
1119 * slowMicrobenchmarks/function-bind-no-inlining.js: Copied from JSTests/microbenchmarks/function-bind-no-inlining.js.
1120 * slowMicrobenchmarks/large-map-iteration-with-additions.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-additions.js.
1121 * slowMicrobenchmarks/large-map-iteration-with-mutation.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-mutation.js.
1122 * slowMicrobenchmarks/map-get-get-cse.js: Copied from JSTests/microbenchmarks/map-get-get-cse.js.
1123 * slowMicrobenchmarks/misc-bugs-847389-jpeg2000.js: Copied from JSTests/microbenchmarks/misc-bugs-847389-jpeg2000.js.
1124 * slowMicrobenchmarks/spread-small-array.js: Copied from JSTests/microbenchmarks/spread-small-array.js.
1125 * slowMicrobenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Copied from JSTests/microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js.
1127 2017-01-30 Yusuke Suzuki <utatane.tea@gmail.com>
1129 [JSC] Do not reject WebAssembly.compile() with Exception
1130 https://bugs.webkit.org/show_bug.cgi?id=167585
1132 Reviewed by Mark Lam.
1134 * wasm/js-api/Module-compile.js:
1135 (async.testPromiseAPI):
1137 2017-01-27 Yusuke Suzuki <utatane.tea@gmail.com>
1139 Lift template escape sequence restrictions in tagged templates
1140 https://bugs.webkit.org/show_bug.cgi?id=166871
1142 Reviewed by Saam Barati.
1144 Update the error messages and add new tests.
1146 * ChakraCore/test/es6/unicode_6_identifier_Blue524737.baseline-jsc:
1147 * stress/lift-template-literal.js: Added.
1149 (testTag.return.tag):
1151 * stress/template-literal-syntax.js:
1153 2017-01-26 Mark Lam <mark.lam@apple.com>
1155 Fix missing exception check in genericTypedArrayViewProtoFuncSet().
1156 https://bugs.webkit.org/show_bug.cgi?id=166812
1157 <rdar://problem/29916672>
1159 Reviewed by Saam Barati.
1161 * stress/regress-166812.js: Added.
1163 2017-01-26 Commit Queue <commit-queue@webkit.org>
1165 Unreviewed, rolling out r211224.
1166 https://bugs.webkit.org/show_bug.cgi?id=167479
1168 "It was a Kraken performance regression" (Requested by
1169 saamyjoon on #webkit).
1173 "OSR entry: delay outer-loop compilation when at inner-loop"
1174 https://bugs.webkit.org/show_bug.cgi?id=167149
1175 http://trac.webkit.org/changeset/211224
1177 2017-01-26 JF Bastien <jfbastien@apple.com>
1179 OSR entry: delay outer-loop compilation when at inner-loop
1180 https://bugs.webkit.org/show_bug.cgi?id=167149
1182 Reviewed by Filip Pizlo.
1184 Try to be mean to OSR entry by using nested loops, and having
1185 non-int32 types or truly varying types.
1187 Mandelbrot currently never tiers up to FTL because it exits too
1188 many times before this. That shouldn't happen because it's just
1189 numbers and int32s. I'll file a bug to fix this.
1191 * microbenchmarks/mandelbrot.js: Added.
1194 * microbenchmarks/nonude.js: Added.
1195 (Array.prototype.remove):
1201 2017-01-25 Saam Barati <sbarati@apple.com>
1203 WebAssembly JS API: coerce return values from imports
1204 https://bugs.webkit.org/show_bug.cgi?id=165480
1205 <rdar://problem/29760318>
1207 Reviewed by Yusuke Suzuki.
1209 * wasm/function-tests/function-import-return-value.js: Added.
1210 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.x.assert.eq):
1211 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.Math.fround):
1212 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.let.type.of.Reflect.ownKeys):
1217 2017-01-25 Filip Pizlo <fpizlo@apple.com>
1219 jsc.cpp should have the $.agent stuff for testing SAB
1220 https://bugs.webkit.org/show_bug.cgi?id=167431
1222 Reviewed by Saam Barati.
1224 Add a very basic test of Atomics using $.agent. This is based on
1225 LayoutTests/workers/sab/simple.html.
1227 * stress/lars-sab-workers.js: Added.
1233 2017-01-24 Filip Pizlo <fpizlo@apple.com>
1235 Atomics.store should return the int-converted value according to toInteger
1236 https://bugs.webkit.org/show_bug.cgi?id=167399
1238 Reviewed by Saam Barati.
1240 * stress/atomics-add-uint32.js: Added.
1241 * stress/atomics-store-return.js: Fix the test to match what the spec wants.
1243 2017-01-24 Yusuke Suzuki <utatane.tea@gmail.com>
1245 [JSC] Optimize Number#toString with Int52
1246 https://bugs.webkit.org/show_bug.cgi?id=167303
1248 Reviewed by Sam Weinig.
1250 * stress/to-string-with-int52.js: Added.
1253 2017-01-24 Filip Pizlo <fpizlo@apple.com>
1255 Atomics.store should return the int-converted value, not the value that it stored
1256 https://bugs.webkit.org/show_bug.cgi?id=167395
1258 Reviewed by Saam Barati.
1260 * stress/atomics-store-return.js: Added.
1262 2017-01-24 Filip Pizlo <fpizlo@apple.com>
1264 -0 is a valid array index and AtomicsObject should know this
1265 https://bugs.webkit.org/show_bug.cgi?id=167386
1267 Reviewed by Mark Lam.
1269 * stress/atomics-neg-zero.js: Added.
1271 2017-01-23 Saam Barati <sbarati@apple.com>
1273 https://bugs.webkit.org/show_bug.cgi?id=167247
1274 JSC: operationSpreadGeneric uses the wrong global object for the builtin function and slow_path_spread consults the wrong global object to prove if the iterator protocol is unobservable
1275 <rdar://problem/30121809>
1277 Reviewed by Filip Pizlo.
1279 * stress/spread-consults-correct-global-object.js: Added.
1282 * stress/spread-correct-global-object-on-exception.js: Added.
1285 (const.objectText.let.o.Symbol.iterator):
1288 2017-01-21 Yusuke Suzuki <utatane.tea@gmail.com>
1290 dynamic import is ambiguous with import declaration at module code
1291 https://bugs.webkit.org/show_bug.cgi?id=167098
1293 Reviewed by Darin Adler.
1295 * modules/import-call.js: Added.
1296 (from.string_appeared_here.import.string_appeared_here.then):
1297 * modules/import-call/main.js: Added.
1298 * stress/import-syntax.js:
1301 2017-01-19 Skachkov Oleksandr <gskachkov@gmail.com>
1303 "this" missing after await in async arrow function
1304 https://bugs.webkit.org/show_bug.cgi?id=166919
1306 Reviewed by Saam Barati.
1308 * stress/async-arrow-functions-lexical-binding-in-class.js:
1309 (ChildClass.prototype.asyncThisPropWithAwaitBody):
1310 (ChildClass.prototype.asyncThisPropInEvalWithAwaitBody):
1311 (ChildClass.prototype.asyncThisValueBodyWithAwait):
1312 (ChildClass.prototype.asyncThisValueInEvalWithAwaitBody):
1315 (ChildClass3.prototype.classValue):
1316 (ChildClass3.prototype.get classProperty):
1317 * stress/async-arrow-functions-lexical-new.target-binding.js:
1320 2017-01-16 Filip Pizlo <fpizlo@apple.com>
1322 Make opaque root scanning truly constraint-based
1323 https://bugs.webkit.org/show_bug.cgi?id=165760
1325 Reviewed by Geoffrey Garen.
1327 Added this test, which demonstrates the benefit of having a dedicated string subspace.
1329 * microbenchmarks/stringalloc.js: Added.
1331 2017-01-17 Michael Saboff <msaboff@apple.com>
1333 Nested parenthesized regular expressions with non-zero minimum counts appear to hang and use lots of memory
1334 https://bugs.webkit.org/show_bug.cgi?id=167125
1336 Reviewed by Filip Pizlo.
1338 * microbenchmarks/regexp-nested-nonzero-min-counted-parens.js: Added.
1339 New test with limits that run slow and take a reasonable amount of memory
1340 before the change and run fast, using little memory with the change.
1342 2017-01-14 Yusuke Suzuki <utatane.tea@gmail.com>
1344 Annotate large string tests with largeHeap
1345 https://bugs.webkit.org/show_bug.cgi?id=167054
1347 Reviewed by Filip Pizlo.
1349 * microbenchmarks/dense-set.js:
1350 * microbenchmarks/lots-of-fields.js:
1351 * stress/joined-strings-should-not-exceed-max-string-length.js:
1352 * stress/make-large-string-jit-strcat.js:
1353 * stress/make-large-string-jit.js:
1354 * stress/make-large-string-strcat.js:
1355 * stress/make-large-string.js:
1356 * stress/string-joining-long-strings-should-not-crash.js:
1357 * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
1359 2017-01-14 Yusuke Suzuki <utatane.tea@gmail.com>
1361 Reserve capacity for StringBuilder in unescape
1362 https://bugs.webkit.org/show_bug.cgi?id=167008
1364 Reviewed by Sam Weinig.
1366 * stress/unescape.js: Added.
1369 2017-01-12 Saam Barati <sbarati@apple.com>
1371 Add a slice intrinsic to the DFG/FTL
1372 https://bugs.webkit.org/show_bug.cgi?id=166707
1373 <rdar://problem/29913445>
1375 Reviewed by Filip Pizlo.
1377 * stress/array-slice-intrinsic.js: Added.
1382 * stress/array-slice-jettison-on-constructor-change.js: Added.
1386 (addRandomProperties):
1388 * stress/array-slice-osr-exit-2.js: Added.
1394 (addRandomProperties):
1396 * stress/array-slice-osr-exit.js: Added.
1402 (addRandomProperties):
1405 2017-01-11 Ryan Haddad <ryanhaddad@apple.com>
1407 Mark es6/typed_arrays_correct_prototype_chains.js as failing after r210570.
1408 https://bugs.webkit.org/show_bug.cgi?id=166931i
1410 Unreviewed test gardening.
1414 2017-01-10 Commit Queue <commit-queue@webkit.org>
1416 Unreviewed, rolling out r210052.
1417 https://bugs.webkit.org/show_bug.cgi?id=166915
1419 "breaks web compatability" (Requested by keith_miller on
1424 "Add support for global"
1425 https://bugs.webkit.org/show_bug.cgi?id=165171
1426 http://trac.webkit.org/changeset/210052
1428 2017-01-10 Mark Lam <mark.lam@apple.com>
1430 Property setters should not be called for bound arguments list entries.
1431 https://bugs.webkit.org/show_bug.cgi?id=165631
1433 Reviewed by Filip Pizlo.
1435 * stress/property-setters-should-not-be-called-for-bound-arguments-list-entries.js: Added.
1437 2017-01-10 Skachkov Oleksandr <gskachkov@gmail.com>
1439 Calling async arrow function which is in a class's member function will cause error
1440 https://bugs.webkit.org/show_bug.cgi?id=166879
1442 Reviewed by Saam Barati.
1444 * stress/async-arrow-functions-lexical-binding-in-class.js: Added.
1447 (BaseClass.prototype.baseClassValue):
1448 (BaseClass.prototype.get property):
1451 (ChildClass.prototype.classValue):
1452 (ChildClass.prototype.get classProperty):
1453 (ChildClass.prototype.asyncValueExp):
1454 (ChildClass.prototype.asyncValueBody):
1455 (ChildClass.prototype.asyncThisPropExp):
1456 (ChildClass.prototype.asyncThisPropBody):
1457 (ChildClass.prototype.asyncThisPropInEvalExp):
1458 (ChildClass.prototype.asyncThisPropInEvalBody):
1459 (ChildClass.prototype.asyncThisValueExp):
1460 (ChildClass.prototype.asyncThisValueBody):
1461 (ChildClass.prototype.asyncThisValueInEvalExp):
1462 (ChildClass.prototype.asyncThisValueInEvalBody):
1465 (ChildClass2.prototype.classValue):
1466 (ChildClass2.prototype.get classProperty):
1467 * stress/async-arrow-functions-lexical-super-binding.js:
1469 2017-01-09 Yusuke Suzuki <utatane.tea@gmail.com>
1471 [JSC] Prototype dynamic-import
1472 https://bugs.webkit.org/show_bug.cgi?id=165724
1474 Reviewed by Saam Barati.
1476 * stress/import-basic.js: Added.
1480 * stress/import-from-eval.js: Added.
1483 * stress/import-syntax.js: Added.
1485 * stress/import-tests/cocoa.js: Added.
1488 * stress/import-tests/multiple.js: Added.
1490 * stress/import-tests/multiple2.js: Added.
1492 * stress/import-tests/should.js: Added.
1494 (export.shouldThrow):
1495 * stress/modules-syntax-error.js:
1497 2017-01-09 Commit Queue <commit-queue@webkit.org>
1499 Unreviewed, rolling out r210476.
1500 https://bugs.webkit.org/show_bug.cgi?id=166859
1502 "4% JSBench regression" (Requested by keith_mi_ on #webkit).
1506 "Add a slice intrinsic to the DFG/FTL"
1507 https://bugs.webkit.org/show_bug.cgi?id=166707
1508 http://trac.webkit.org/changeset/210476
1510 2017-01-06 Saam Barati <sbarati@apple.com>
1512 Add a slice intrinsic to the DFG/FTL
1513 https://bugs.webkit.org/show_bug.cgi?id=166707
1515 Reviewed by Filip Pizlo.
1517 * stress/array-slice-intrinsic.js: Added.
1522 * stress/array-slice-jettison-on-constructor-change.js: Added.
1526 (addRandomProperties):
1528 * stress/array-slice-osr-exit-2.js: Added.
1534 (addRandomProperties):
1536 * stress/array-slice-osr-exit.js: Added.
1542 (addRandomProperties):
1545 2017-01-06 Michael Saboff <msaboff@apple.com>
1547 @putByValDirect in Array.of and Array.from overwrites non-writable/configurable properties
1548 https://bugs.webkit.org/show_bug.cgi?id=153486
1550 Reviewed by Saam Barati.
1552 New regression test.
1554 * stress/regress-153486.js: Added.
1556 (makeUnwriteableUnconfigurableObject):
1561 2016-12-30 Filip Pizlo <fpizlo@apple.com>
1563 DeferGC::~DeferGC should be super cheap
1564 https://bugs.webkit.org/show_bug.cgi?id=166626
1566 Reviewed by Saam Barati.
1568 * stress/slow-path-generator-updating-current-node-dfg.js:
1569 * stress/unshift-array-storage.js:
1571 2017-01-04 JF Bastien <jfbastien@apple.com>
1573 WebAssembly: sections with the same name are allowed
1574 https://bugs.webkit.org/show_bug.cgi?id=166708
1576 Reviewed by Saam Barati.
1578 * wasm/self-test/test_BuilderJSON.js:
1579 (SectionsWithSameCustomName):
1581 2017-01-04 Saam Barati <sbarati@apple.com>
1583 stress/spread-calling.js timing out on the bots
1584 https://bugs.webkit.org/show_bug.cgi?id=166689
1585 <rdar://problem/29779182>
1587 Reviewed by Mark Lam.
1589 * stress/spread-calling.js:
1591 2017-01-04 JF Bastien <jfbastien@apple.com>
1593 WebAssembly JS API: add Module.sections
1594 https://bugs.webkit.org/show_bug.cgi?id=165159
1595 <rdar://problem/29760326>
1597 Reviewed by Mark Lam.
1599 As described here: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymodulecustomsections
1601 * wasm/Builder.js: allow custom sections to be duplicated
1602 * wasm/js-api/Module.customSection.js: Added.
1603 (assert.throws.WebAssembly.Module.prototype.customSections):
1606 2017-01-04 Saam Barati <sbarati@apple.com>
1608 We don't properly handle exceptions inside the nativeCallTrampoline macro in the LLInt
1609 https://bugs.webkit.org/show_bug.cgi?id=163720
1611 Reviewed by Mark Lam.
1613 * stress/bound-function-tail-call-with-exception.js: Added.
1618 2017-01-03 JF Bastien <jfbastien@apple.com>
1620 WebAssembly JS API: check and test in-call / out-call values
1621 https://bugs.webkit.org/show_bug.cgi?id=164876
1622 <rdar://problem/29844107>
1624 Reviewed by Saam Barati.
1627 * wasm/assert.js: add an assert for NaN comparison
1628 * wasm/fuzz/export-function.js: Added. Generate random wasm export
1629 signatures, and call them with random parameters.
1630 (const.paramExporter):
1632 (const.types.generate):
1634 * wasm/js-api/export-arity.js: Added.
1635 (const.paramExporter): Test that mismatched arities when JS calls
1636 wasm follow the defined semantics: i32 is 0, f32 / f64 are NaN.
1637 https://github.com/WebAssembly/design/blob/master/JS.md#exported-function-exotic-objects
1638 * wasm/js-api/export-void-is-undef.js: Added. Test that "void"
1639 wasm functions return "undefined" in JS.
1641 2017-01-02 JF Bastien <jfbastien@apple.com>
1643 WebAssembly: handle and optimize wasm export → wasm import calls
1644 https://bugs.webkit.org/show_bug.cgi?id=165282
1646 Reviewed by Saam Barati.
1648 * wasm/Builder.js: Add a Proxy to Builder.js, which intercepts
1649 unknown property lookups. This creates way better error messages
1650 on typos than 'undefined is not a function', which happens
1651 semi-frequently as I typo opcode names (and which one is a typo is
1652 hard to find because we chain builders).
1653 (const._isValidValue):
1655 (const._importFunctionContinuation):
1656 (const._importMemoryContinuation):
1657 (const._importTableContinuation):
1658 (const._exportFunctionContinuation):
1659 (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
1660 (export.default.Builder.prototype._registerSectionBuilders.this.Unknown):
1661 * wasm/LowLevelBinary.js: Add limited support for var{u}int64 (only the 32-bit values)
1662 (export.default.LowLevelBinary.prototype.varint32):
1663 (export.default.LowLevelBinary.prototype.varuint64):
1664 (export.default.LowLevelBinary.prototype.varint64):
1665 * wasm/function-tests/exceptions.js: update error message
1666 * wasm/function-tests/trap-load.js: update error message
1667 * wasm/function-tests/trap-store.js: update error message
1668 * wasm/js-api/wasm-to-wasm-bad-signature.js: Added. Test a bunch of bad wasm->wasm import signatures
1669 (const.makeImportee.signature.switch):
1670 (BadSignatureDropStartParams):
1671 * wasm/js-api/wasm-to-wasm.js: Added. Test 64-bit wasm->wasm import calls
1672 (const.callerModule):
1673 (const.calleeModule):
1676 2017-01-02 Saam Barati <sbarati@apple.com>
1678 WebAssembly: Some loads don't take into account the offset
1679 https://bugs.webkit.org/show_bug.cgi?id=166616
1680 <rdar://problem/29841541>
1682 Reviewed by Keith Miller.
1684 * wasm/function-tests/load-offset.js: Added.
1686 2016-12-29 Saam Barati <sbarati@apple.com>
1688 WebAssembly: Rebase spec-tests now that wabt has been updated to produce certain kinds of invalid modules
1689 https://bugs.webkit.org/show_bug.cgi?id=166491
1690 <rdar://problem/29814999>
1692 Reviewed by Yusuke Suzuki.
1694 Based off these revisions:
1695 - spec: b055d01ea1dfdd7a5231ae779095435f836de97f
1696 - wabt: d0d44702c753f851b094615298a2f4d4e3c21035
1698 The reason for the rebase is that wabt was updated to stop
1699 silently rejecting invalid modules. This was needed because
1700 some of the spec tests check to make sure that the module
1701 is invalid, but wabt was silently ignoring the errors and
1702 generating valid modules:
1703 https://github.com/WebAssembly/wabt/issues/256
1706 * wasm/spec-tests/address.wast.js:
1707 * wasm/spec-tests/binary.wast.js:
1708 * wasm/spec-tests/block.wast.js:
1709 * wasm/spec-tests/br.wast.js:
1710 * wasm/spec-tests/br_if.wast.js:
1711 * wasm/spec-tests/br_table.wast.js:
1712 * wasm/spec-tests/break-drop.wast.js:
1713 * wasm/spec-tests/call.wast.js:
1714 * wasm/spec-tests/call_indirect.wast.js:
1715 * wasm/spec-tests/comments.wast.js:
1716 * wasm/spec-tests/conversions.wast.js:
1717 * wasm/spec-tests/custom_section.wast.js:
1718 * wasm/spec-tests/endianness.wast.js:
1719 * wasm/spec-tests/exports.wast.js:
1720 * wasm/spec-tests/f32.wast.js:
1721 * wasm/spec-tests/f32_cmp.wast.js:
1722 * wasm/spec-tests/f64.wast.js:
1723 * wasm/spec-tests/f64_cmp.wast.js:
1724 * wasm/spec-tests/fac.wast.js:
1725 * wasm/spec-tests/float_exprs.wast.js:
1726 * wasm/spec-tests/float_literals.wast.js:
1727 * wasm/spec-tests/float_memory.wast.js:
1728 * wasm/spec-tests/float_misc.wast.js:
1729 * wasm/spec-tests/forward.wast.js:
1730 * wasm/spec-tests/func.wast.js:
1731 * wasm/spec-tests/func_ptrs.wast.js:
1732 * wasm/spec-tests/get_local.wast.js:
1733 * wasm/spec-tests/globals.wast.js:
1734 * wasm/spec-tests/i32.wast.js:
1735 * wasm/spec-tests/i64.wast.js:
1736 * wasm/spec-tests/imports.wast.js:
1737 * wasm/spec-tests/int_exprs.wast.js:
1738 * wasm/spec-tests/int_literals.wast.js:
1739 * wasm/spec-tests/left-to-right.wast.js:
1740 * wasm/spec-tests/linking.wast.js:
1741 * wasm/spec-tests/loop.wast.js:
1742 * wasm/spec-tests/memory.wast.js:
1743 * wasm/spec-tests/memory_redundancy.wast.js:
1744 * wasm/spec-tests/memory_trap.wast.js:
1745 * wasm/spec-tests/names.wast.js:
1746 * wasm/spec-tests/nop.wast.js:
1747 * wasm/spec-tests/resizing.wast.js:
1748 * wasm/spec-tests/return.wast.js:
1749 * wasm/spec-tests/select.wast.js:
1750 * wasm/spec-tests/set_local.wast.js:
1751 * wasm/spec-tests/skip-stack-guard-page.wast.js:
1752 * wasm/spec-tests/stack.wast.js:
1753 * wasm/spec-tests/start.wast.js:
1754 * wasm/spec-tests/store_retval.wast.js:
1755 * wasm/spec-tests/switch.wast.js:
1756 * wasm/spec-tests/tee_local.wast.js:
1757 * wasm/spec-tests/traps.wast.js:
1758 * wasm/spec-tests/typecheck.wast.js:
1759 * wasm/spec-tests/unreachable.wast.js:
1760 * wasm/spec-tests/unwind.wast.js:
1762 2016-12-28 Saam Barati <sbarati@apple.com>
1764 WebAssembly: Don't allow duplicate export names
1765 https://bugs.webkit.org/show_bug.cgi?id=166490
1766 <rdar://problem/29815000>
1768 Reviewed by Keith Miller.
1771 * wasm/function-tests/invalid-duplicate-export.js: Added.
1773 2016-12-28 Saam Barati <sbarati@apple.com>
1775 WebAssembly: Implement grow_memory and current_memory
1776 https://bugs.webkit.org/show_bug.cgi?id=166448
1777 <rdar://problem/29803676>
1779 Reviewed by Keith Miller.
1781 I rewrote some of the testWasmModuleFunctions that used Memory to use
1782 the JS API since the jsc.cpp version can no longer use memory.
1785 * wasm/function-tests/add-12.js:
1786 (testWasmModuleFunctions):
1787 * wasm/function-tests/br-if-loop-less-than.js:
1788 (testWasmModuleFunctions):
1789 * wasm/function-tests/brTableAsIf.js:
1790 (testWasmModuleFunctions):
1791 * wasm/function-tests/brTableManyValues.js:
1792 (testWasmModuleFunctions):
1793 * wasm/function-tests/brTableWithLoop.js:
1794 (testWasmModuleFunctions):
1795 * wasm/function-tests/dumb-eq-if-then-else.js:
1796 * wasm/function-tests/eqz.js:
1797 * wasm/function-tests/grow-memory-2.js: Added.
1799 (assert.eq.instance.exports.foo):
1800 * wasm/function-tests/grow-memory-3.js: Added.
1801 * wasm/function-tests/grow-memory-4.js: Added.
1803 * wasm/function-tests/grow-memory.js: Added.
1804 (binaryShouldNotParse):
1808 * wasm/function-tests/i32-load.js:
1809 (testWasmModuleFunctions):
1810 * wasm/function-tests/i32-load8-s.js:
1811 * wasm/function-tests/max.js:
1812 * wasm/function-tests/min.js:
1813 * wasm/js-api/memory-grow.js: Added.
1816 * wasm/js-api/test_memory.js:
1819 2016-12-25 Yusuke Suzuki <utatane.tea@gmail.com>
1821 Propagate the source origin as much as possible
1822 https://bugs.webkit.org/show_bug.cgi?id=166348
1824 Reviewed by Darin Adler.
1826 * stress/source-origin.js: Added.
1829 2016-12-24 Caio Lima <ticaiolima@gmail.com>
1831 [test262] Fixing mapped arguments object property test case
1832 https://bugs.webkit.org/show_bug.cgi?id=159398
1834 Reviewed by Saam Barati.
1836 * stress/arguments-bizarre-behaviour-disable-enumerability.js:
1837 * stress/arguments-define-property.js: Added.
1840 * stress/arguments-non-configurable.js: Added.
1842 (tryChangeNonConfigurableDescriptor):
1843 (set tryChangeNonConfigurableDescriptor):
1844 (tryChangeWritableOfNonConfigurableDescriptor):
1847 016-12-20 Caio Lima <ticaiolima@gmail.com>
1849 [test262] Fixing mapped arguments object property test case
1850 https://bugs.webkit.org/show_bug.cgi?id=159398
1854 * stress/arguments-bizarre-behaviour-disable-enumerability.js:
1855 * stress/arguments-define-property.js: Added.
1858 * stress/arguments-non-configurable.js: Added.
1860 (tryChangeNonConfigurableDescriptor):
1861 (set tryChangeNonConfigurableDescriptor):
1862 (tryChangeWritableOfNonConfigurableDescriptor):
1865 2016-12-23 Keith Miller <keith_miller@apple.com>
1867 WebAssembly: trap on bad division.
1868 https://bugs.webkit.org/show_bug.cgi?id=164786
1870 Reviewed by Mark Lam.
1872 Also, mark conversions as passing.
1877 2016-12-22 Keith Miller <keith_miller@apple.com>
1879 WebAssembly: Make spec-tests/f32.wast.js and spec-tests/f64.wast.js pass
1880 https://bugs.webkit.org/show_bug.cgi?id=166447
1882 Reviewed by Saam Barati.
1887 2016-12-22 Saam Barati <sbarati@apple.com>
1889 WebAssembly: Make calling Wasm functions that returns or takes an i64 as a parameter an early exception
1890 https://bugs.webkit.org/show_bug.cgi?id=166437
1891 <rdar://problem/29793949>
1893 Reviewed by Keith Miller.
1896 * wasm/function-tests/i64-from-js-exceptions.js: Added.
1897 (const.imp.import.sideEffects):
1898 (assert.throws.instance.exports.foo.valueOf):
1900 2016-12-22 Mark Lam <mark.lam@apple.com>
1902 De-duplicate finally blocks.
1903 https://bugs.webkit.org/show_bug.cgi?id=160168
1905 Reviewed by Saam Barati.
1907 Re-landing r209952 with a few new tests added in test-finally.js.
1909 * stress/deeply-nested-finallys.js: Copied from JSTests/stress/deeply-nested-finallys.js.
1910 - Tests many levels of finally nesting. This causes the old code to hang (and
1911 crashes eventually) while trying to generate bytecode for the exponentially
1912 duplicated finally blocks. The new code completes this test almost instantly.
1914 * stress/test-finally.js: Copied from JSTests/stress/test-finally.js.
1915 - Tests control flow through various permutations of finally blocks.
1917 2016-12-22 Saam Barati <sbarati@apple.com>
1919 WebAssembly: Make the spec-tests/address.wast.js test pass
1920 https://bugs.webkit.org/show_bug.cgi?id=166429
1921 <rdar://problem/29793220>
1923 Reviewed by Keith Miller.
1927 2016-12-22 Keith Miller <keith_miller@apple.com>
1929 WebAssembly: The validator should not allow unused stack entries at the end of a block
1930 https://bugs.webkit.org/show_bug.cgi?id=166411
1932 Reviewed by Saam Barati.
1934 Test cleanup and enable new passing tests.
1937 * wasm/function-tests/br-if-as-return.js:
1939 2016-12-22 Saam Barati <sbarati@apple.com>
1941 WebAssembly: Make the spec-tests/start.wast.js test pass
1942 https://bugs.webkit.org/show_bug.cgi?id=166416
1943 <rdar://problem/29784532>
1945 Reviewed by Yusuke Suzuki.
1949 2016-12-21 Keith Miller <keith_miller@apple.com>
1951 WebAssembly: Fix decode floating point constants in unreachable code
1952 https://bugs.webkit.org/show_bug.cgi?id=166400
1954 Reviewed by Saam Barati.
1958 2016-12-21 Keith Miller <keith_miller@apple.com>
1960 WebAssembly: Allow br, br_if, and br_table to act as a return
1961 https://bugs.webkit.org/show_bug.cgi?id=166393
1963 Reviewed by Saam Barati.
1965 Add tests for breaks acting as returns and fix tests that
1966 validate error messages.
1968 * wasm/function-tests/br-as-return.js: Added.
1969 * wasm/function-tests/br-if-as-return.js: Added.
1970 * wasm/function-tests/br-table-as-return.js: Added.
1971 * wasm/function-tests/if-no-else-non-void.js:
1972 * wasm/function-tests/struct.js: Added.
1973 * wasm/js-api/global-error.js:
1975 * wasm/js-api/table.js:
1978 2016-12-21 Saam Barati <sbarati@apple.com>
1980 WebAssembly: Import spec tests
1981 https://bugs.webkit.org/show_bug.cgi?id=166395
1983 Rubber stamped by Keith Miller.
1985 This patch implements the Wasm spec's tests found here:
1986 https://github.com/WebAssembly/spec/tree/master/interpreter/test
1988 These tests are in .wast s-epxression format. To convert
1989 them to JS, I use a script from the wabt library, found here:
1990 https://github.com/WebAssembly/wabt/blob/master/test/run-gen-spec-js.py
1992 I also added a script that automatically imports the tests as
1993 JS files. The inputs to the script is the path to the Wasm spec
1994 git repo and the path to the wabt git repo. This will make importing
1995 new tests easy in the future.
1997 The wasm spec imported is at commit: b055d01ea1dfdd7a5231ae779095435f836de97f
1998 The wabt used to do the import is at commit: 622b42dced6d793e9d49e9b1fd1d1524defd1387
2001 * wasm/import-spec-tests.rb: Added.
2002 * wasm/spec-tests: Added.
2003 * wasm/spec-tests/address.wast.js: Added.
2009 (assert_soft_invalid):
2010 (assert_unlinkable):
2011 (assert_uninstantiable):
2014 (assert_return_nan):
2015 * wasm/spec-tests/binary.wast.js: Added.
2021 (assert_soft_invalid):
2022 (assert_unlinkable):
2023 (assert_uninstantiable):
2026 (assert_return_nan):
2027 * wasm/spec-tests/block.wast.js: Added.
2033 (assert_soft_invalid):
2034 (assert_unlinkable):
2035 (assert_uninstantiable):
2038 (assert_return_nan):
2039 * wasm/spec-tests/br.wast.js: Added.
2045 (assert_soft_invalid):
2046 (assert_unlinkable):
2047 (assert_uninstantiable):
2050 (assert_return_nan):
2051 * wasm/spec-tests/br_if.wast.js: Added.
2057 (assert_soft_invalid):
2058 (assert_unlinkable):
2059 (assert_uninstantiable):
2062 (assert_return_nan):
2063 * wasm/spec-tests/br_table.wast.js: Added.
2069 (assert_soft_invalid):
2070 (assert_unlinkable):
2071 (assert_uninstantiable):
2074 (assert_return_nan):
2075 * wasm/spec-tests/break-drop.wast.js: Added.
2081 (assert_soft_invalid):
2082 (assert_unlinkable):
2083 (assert_uninstantiable):
2086 (assert_return_nan):
2087 * wasm/spec-tests/call.wast.js: Added.
2093 (assert_soft_invalid):
2094 (assert_unlinkable):
2095 (assert_uninstantiable):
2098 (assert_return_nan):
2099 * wasm/spec-tests/call_indirect.wast.js: Added.
2105 (assert_soft_invalid):
2106 (assert_unlinkable):
2107 (assert_uninstantiable):
2110 (assert_return_nan):
2111 * wasm/spec-tests/comments.wast.js: Added.
2117 (assert_soft_invalid):
2118 (assert_unlinkable):
2119 (assert_uninstantiable):
2122 (assert_return_nan):
2123 * wasm/spec-tests/conversions.wast.js: Added.
2129 (assert_soft_invalid):
2130 (assert_unlinkable):
2131 (assert_uninstantiable):
2134 (assert_return_nan):
2135 * wasm/spec-tests/custom_section.wast.js: Added.
2141 (assert_soft_invalid):
2142 (assert_unlinkable):
2143 (assert_uninstantiable):
2146 (assert_return_nan):
2147 * wasm/spec-tests/endianness.wast.js: Added.
2153 (assert_soft_invalid):
2154 (assert_unlinkable):
2155 (assert_uninstantiable):
2158 (assert_return_nan):
2159 * wasm/spec-tests/exports.wast.js: Added.
2165 (assert_soft_invalid):
2166 (assert_unlinkable):
2167 (assert_uninstantiable):
2170 (assert_return_nan):
2171 * wasm/spec-tests/f32.wast.js: Added.
2177 (assert_soft_invalid):
2178 (assert_unlinkable):
2179 (assert_uninstantiable):
2182 (assert_return_nan):
2183 * wasm/spec-tests/f32_cmp.wast.js: Added.
2189 (assert_soft_invalid):
2190 (assert_unlinkable):
2191 (assert_uninstantiable):
2194 (assert_return_nan):
2195 * wasm/spec-tests/f64.wast.js: Added.
2201 (assert_soft_invalid):
2202 (assert_unlinkable):
2203 (assert_uninstantiable):
2206 (assert_return_nan):
2207 * wasm/spec-tests/f64_cmp.wast.js: Added.
2213 (assert_soft_invalid):
2214 (assert_unlinkable):
2215 (assert_uninstantiable):
2218 (assert_return_nan):
2219 * wasm/spec-tests/fac.wast.js: Added.
2225 (assert_soft_invalid):
2226 (assert_unlinkable):
2227 (assert_uninstantiable):
2230 (assert_return_nan):
2231 * wasm/spec-tests/float_exprs.wast.js: Added.
2237 (assert_soft_invalid):
2238 (assert_unlinkable):
2239 (assert_uninstantiable):
2242 (assert_return_nan):
2243 * wasm/spec-tests/float_literals.wast.js: Added.
2249 (assert_soft_invalid):
2250 (assert_unlinkable):
2251 (assert_uninstantiable):
2254 (assert_return_nan):
2255 * wasm/spec-tests/float_memory.wast.js: Added.
2261 (assert_soft_invalid):
2262 (assert_unlinkable):
2263 (assert_uninstantiable):
2266 (assert_return_nan):
2267 * wasm/spec-tests/float_misc.wast.js: Added.
2273 (assert_soft_invalid):
2274 (assert_unlinkable):
2275 (assert_uninstantiable):
2278 (assert_return_nan):
2279 * wasm/spec-tests/forward.wast.js: Added.
2285 (assert_soft_invalid):
2286 (assert_unlinkable):
2287 (assert_uninstantiable):
2290 (assert_return_nan):
2291 * wasm/spec-tests/func.wast.js: Added.
2297 (assert_soft_invalid):
2298 (assert_unlinkable):
2299 (assert_uninstantiable):
2302 (assert_return_nan):
2303 * wasm/spec-tests/func_ptrs.wast.js: Added.
2309 (assert_soft_invalid):
2310 (assert_unlinkable):
2311 (assert_uninstantiable):
2314 (assert_return_nan):
2315 * wasm/spec-tests/get_local.wast.js: Added.
2321 (assert_soft_invalid):
2322 (assert_unlinkable):
2323 (assert_uninstantiable):
2326 (assert_return_nan):
2327 * wasm/spec-tests/globals.wast.js: Added.
2333 (assert_soft_invalid):
2334 (assert_unlinkable):
2335 (assert_uninstantiable):
2338 (assert_return_nan):
2339 * wasm/spec-tests/i32.wast.js: Added.
2345 (assert_soft_invalid):
2346 (assert_unlinkable):
2347 (assert_uninstantiable):
2350 (assert_return_nan):
2351 * wasm/spec-tests/i64.wast.js: Added.
2357 (assert_soft_invalid):
2358 (assert_unlinkable):
2359 (assert_uninstantiable):
2362 (assert_return_nan):
2363 * wasm/spec-tests/imports.wast.js: Added.
2369 (assert_soft_invalid):
2370 (assert_unlinkable):
2371 (assert_uninstantiable):
2374 (assert_return_nan):
2375 * wasm/spec-tests/int_exprs.wast.js: Added.
2381 (assert_soft_invalid):
2382 (assert_unlinkable):
2383 (assert_uninstantiable):
2386 (assert_return_nan):
2387 * wasm/spec-tests/int_literals.wast.js: Added.
2393 (assert_soft_invalid):
2394 (assert_unlinkable):
2395 (assert_uninstantiable):
2398 (assert_return_nan):
2399 * wasm/spec-tests/left-to-right.wast.js: Added.
2405 (assert_soft_invalid):
2406 (assert_unlinkable):
2407 (assert_uninstantiable):
2410 (assert_return_nan):
2411 * wasm/spec-tests/linking.wast.js: Added.
2417 (assert_soft_invalid):
2418 (assert_unlinkable):
2419 (assert_uninstantiable):
2422 (assert_return_nan):
2423 * wasm/spec-tests/loop.wast.js: Added.
2429 (assert_soft_invalid):
2430 (assert_unlinkable):
2431 (assert_uninstantiable):
2434 (assert_return_nan):
2435 * wasm/spec-tests/memory.wast.js: Added.
2441 (assert_soft_invalid):
2442 (assert_unlinkable):
2443 (assert_uninstantiable):
2446 (assert_return_nan):
2447 * wasm/spec-tests/memory_redundancy.wast.js: Added.
2453 (assert_soft_invalid):
2454 (assert_unlinkable):
2455 (assert_uninstantiable):
2458 (assert_return_nan):
2459 * wasm/spec-tests/memory_trap.wast.js: Added.
2465 (assert_soft_invalid):
2466 (assert_unlinkable):
2467 (assert_uninstantiable):
2470 (assert_return_nan):
2471 * wasm/spec-tests/names.wast.js: Added.
2477 (assert_soft_invalid):
2478 (assert_unlinkable):
2479 (assert_uninstantiable):
2482 (assert_return_nan):
2483 * wasm/spec-tests/nop.wast.js: Added.
2489 (assert_soft_invalid):
2490 (assert_unlinkable):
2491 (assert_uninstantiable):
2494 (assert_return_nan):
2495 * wasm/spec-tests/resizing.wast.js: Added.
2501 (assert_soft_invalid):
2502 (assert_unlinkable):
2503 (assert_uninstantiable):
2506 (assert_return_nan):
2507 * wasm/spec-tests/return.wast.js: Added.
2513 (assert_soft_invalid):
2514 (assert_unlinkable):
2515 (assert_uninstantiable):
2518 (assert_return_nan):
2519 * wasm/spec-tests/select.wast.js: Added.
2525 (assert_soft_invalid):
2526 (assert_unlinkable):
2527 (assert_uninstantiable):
2530 (assert_return_nan):
2531 * wasm/spec-tests/set_local.wast.js: Added.
2537 (assert_soft_invalid):
2538 (assert_unlinkable):
2539 (assert_uninstantiable):
2542 (assert_return_nan):
2543 * wasm/spec-tests/skip-stack-guard-page.wast.js: Added.
2549 (assert_soft_invalid):
2550 (assert_unlinkable):
2551 (assert_uninstantiable):
2554 (assert_return_nan):
2555 * wasm/spec-tests/stack.wast.js: Added.
2561 (assert_soft_invalid):
2562 (assert_unlinkable):
2563 (assert_uninstantiable):
2566 (assert_return_nan):
2567 * wasm/spec-tests/start.wast.js: Added.
2573 (assert_soft_invalid):
2574 (assert_unlinkable):
2575 (assert_uninstantiable):
2578 (assert_return_nan):
2579 * wasm/spec-tests/store_retval.wast.js: Added.
2585 (assert_soft_invalid):
2586 (assert_unlinkable):
2587 (assert_uninstantiable):
2590 (assert_return_nan):
2591 * wasm/spec-tests/switch.wast.js: Added.
2597 (assert_soft_invalid):
2598 (assert_unlinkable):
2599 (assert_uninstantiable):
2602 (assert_return_nan):
2603 * wasm/spec-tests/tee_local.wast.js: Added.
2609 (assert_soft_invalid):
2610 (assert_unlinkable):
2611 (assert_uninstantiable):
2614 (assert_return_nan):
2615 * wasm/spec-tests/traps.wast.js: Added.
2621 (assert_soft_invalid):
2622 (assert_unlinkable):
2623 (assert_uninstantiable):
2626 (assert_return_nan):
2627 * wasm/spec-tests/typecheck.wast.js: Added.
2633 (assert_soft_invalid):
2634 (assert_unlinkable):
2635 (assert_uninstantiable):
2638 (assert_return_nan):
2639 * wasm/spec-tests/unreachable.wast.js: Added.
2645 (assert_soft_invalid):
2646 (assert_unlinkable):
2647 (assert_uninstantiable):
2650 (assert_return_nan):
2651 * wasm/spec-tests/unwind.wast.js: Added.
2657 (assert_soft_invalid):
2658 (assert_unlinkable):
2659 (assert_uninstantiable):
2662 (assert_return_nan):
2664 2016-12-20 Keith Miller <keith_miller@apple.com>
2666 Add support for global
2667 https://bugs.webkit.org/show_bug.cgi?id=165171
2669 Reviewed by Filip Pizlo.
2671 * stress/global.js: Added.
2673 2016-12-20 JF Bastien <jfbastien@apple.com>
2675 WebAssembly API: implement WebAssembly.LinkError
2676 https://bugs.webkit.org/show_bug.cgi?id=165805
2677 <rdar://problem/29747874>
2679 Reviewed by Mark lam.
2681 Update all exception sites which now throw WebAssembly.LinkError.
2683 * wasm/js-api/element-data.js:
2684 * wasm/js-api/element.js:
2686 * wasm/js-api/global-error.js:
2688 * wasm/js-api/table.js:
2690 (new.WebAssembly.Table):
2691 * wasm/js-api/test_Data.js:
2692 * wasm/js-api/test_basic_api.js:
2693 (const.c.in.constructorProperties.switch):
2694 * wasm/js-api/test_memory.js:
2696 (test.testMemImportError): Deleted.
2698 2016-12-20 JF Bastien <jfbastien@apple.com>
2700 WebAssembly: unique function signatures
2701 https://bugs.webkit.org/show_bug.cgi?id=165957
2702 <rdar://problem/29735737>
2704 Reviewed by Saam Barati.
2706 * wasm/function-tests/table-basic.js: FIXME is now addressed,
2707 though instance to instance calls still need work which bug
2708 #165282 will address
2710 * wasm/js-api/unique-signature.js: Added.
2711 (CallIndirectWithDuplicateSignatures):
2713 2016-12-19 Mark Lam <mark.lam@apple.com>
2715 Rolling out r209974 and r209952. They break some websites in mysterious ways. Step 2: Rollout r209952.
2716 https://bugs.webkit.org/show_bug.cgi?id=166049
2720 * stress/deeply-nested-finallys.js: Removed.
2721 * stress/test-finally.js: Removed.
2723 2016-12-19 Saam Barati <sbarati@apple.com>
2725 WebAssembly: Make running Wasm tests take less time by reducing some tests' iteration count and by splitting some tests into different files
2726 https://bugs.webkit.org/show_bug.cgi?id=166017
2728 Reviewed by Yusuke Suzuki.
2730 * wasm/function-tests/trap-load-2.js: Added.
2732 (wasmFrameCountFromError):
2735 * wasm/function-tests/trap-load.js:
2736 (assert.continuation): Deleted.
2737 * wasm/function-tests/trap-store-2.js: Added.
2738 (import.Builder.from.string_appeared_here.assert):
2741 * wasm/function-tests/trap-store.js:
2742 (assert.continuation): Deleted.
2744 * wasm/js-api/test_memory.js:
2747 2016-12-18 Saam Barati <sbarati@apple.com>
2749 WebAssembly: Implement the WebAssembly.compile and WebAssembly.validate
2750 https://bugs.webkit.org/show_bug.cgi?id=165936
2752 Reviewed by Mark Lam.
2754 * wasm/js-api/Module-compile.js: Added.
2755 (async.testPromiseAPI):
2756 * wasm/js-api/test_basic_api.js:
2757 (const.c.in.constructorProperties.switch):
2758 * wasm/js-api/validate.js: Added.
2759 (assert.truthy.WebAssembly.validate.builder.WebAssembly):
2761 2016-12-16 Mark Lam <mark.lam@apple.com>
2763 De-duplicate finally blocks.
2764 https://bugs.webkit.org/show_bug.cgi?id=160168
2766 Reviewed by Keith Miller.
2768 * stress/deeply-nested-finallys.js: Added.
2769 - Tests many levels of finally nesting. This causes the old code to hang (and
2770 crashes eventually) while trying to generate bytecode for the exponentially
2771 duplicated finally blocks. The new code completes this test almost instantly.
2773 * stress/test-finally.js: Added.
2774 - Tests control flow through various permutations of finally blocks.
2776 2016-12-16 Saam Barati <sbarati@apple.com>
2778 WebAssembly: WasmB3IRGenerator should throw exceptions instead of crash
2779 https://bugs.webkit.org/show_bug.cgi?id=165834
2781 Reviewed by Keith Miller.
2783 * wasm/function-tests/exceptions.js: Added.
2784 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
2785 * wasm/function-tests/table-basic.js:
2786 (i.i.42.throw.new.Error):
2788 2016-12-16 Keith Miller <keith_miller@apple.com>
2790 i64.eqz should use an Int64 zero
2791 https://bugs.webkit.org/show_bug.cgi?id=165942
2793 Reviewed by Mark Lam.
2797 2016-12-15 Keith Miller <keith_miller@apple.com>
2799 Fix validation of non-void if blocks with no else
2800 https://bugs.webkit.org/show_bug.cgi?id=165938
2802 Reviewed by Saam Barati.
2804 Add a new failing test and a fix an existing one.
2806 * wasm/function-tests/dead-call.js:
2807 * wasm/function-tests/if-no-else-non-void.js: Added.
2809 2016-12-15 Keith Miller <keith_miller@apple.com>
2811 Wasm should not create empty unlinked callsites
2812 https://bugs.webkit.org/show_bug.cgi?id=165933
2814 Reviewed by Mark Lam.
2816 * wasm/function-tests/dead-call.js: Added.
2818 2016-12-15 JF Bastien <jfbastien@apple.com>
2820 WebAssembly: improve compilation error messages
2821 https://bugs.webkit.org/show_bug.cgi?id=163919
2823 Reviewed by Saam Barati.
2825 Update error messages in these tests.
2826 Use the assert.throws facility in many of them which weren't already.
2828 * wasm/js-api/element.js:
2829 (assert.throws.new.WebAssembly.Module.builder.WebAssembly):
2831 * wasm/js-api/global-error.js:
2832 (assert.throws.new.WebAssembly.Module.bin):
2835 * wasm/js-api/table.js:
2836 (assert.throws.new.WebAssembly.Module.builder.WebAssembly):
2838 (assertBadTableImport):
2839 * wasm/js-api/test_Data.js:
2840 (DataSectionWithoutMemory):
2841 * wasm/js-api/test_Start.js:
2842 (InvalidStartFunctionIndex):
2843 * wasm/js-api/test_basic_api.js:
2844 (const.c.in.constructorProperties.switch):
2846 2016-12-15 JF Bastien <jfbastien@apple.com>
2848 WebAssembly API: improve data section errors
2849 https://bugs.webkit.org/show_bug.cgi?id=165733
2851 Reviewed by Keith Miller.
2853 * wasm/js-api/element-data.js: Added.
2854 (ElementBeforeData.set const):
2855 (ElementBeforeData): check the order of initialization, which is observable on failure
2856 * wasm/js-api/test_Data.js:
2857 (DataSectionWithoutMemory):
2858 (DataSectionOffTheEnd): Deleted.
2859 (DataSectionPartlyOffTheEnd): Deleted.
2860 (DataSectionEmptyOffTheEnd): Deleted.
2861 (DataSectionSeenByStart): Deleted.
2863 2016-12-15 Keith Miller <keith_miller@apple.com>
2865 Fix 64-bit shift family Wasm opcodes
2866 https://bugs.webkit.org/show_bug.cgi?id=165902
2868 Reviewed by Geoffrey Garen.
2870 Add tests for shift family of instructions. Since
2871 we can't generate i64 values to pass to wasm we only compile
2872 the code for those functions. Attempting to generate any i64
2873 code using these instructions would have been enough to cause
2874 the B3 Validation error anyway.
2877 * wasm/function-tests/rotl.js: Added.
2878 * wasm/function-tests/rotr.js: Added.
2879 * wasm/function-tests/shl.js: Added.
2880 * wasm/function-tests/shr-s.js: Added.
2881 * wasm/function-tests/shr-u.js: Added.
2884 2016-12-14 Keith Miller <keith_miller@apple.com>
2886 WebAssembly: test_BuilderJSON.js is broken
2887 https://bugs.webkit.org/show_bug.cgi?id=165893
2889 Reviewed by Michael Saboff.
2892 (const._isValidValue):
2893 * wasm/self-test/test_BuilderJSON.js:
2895 2016-12-14 Keith Miller <keith_miller@apple.com>
2897 Unreviewed, fix test.
2899 * wasm/function-tests/i32-const.js:
2901 2016-12-14 Keith Miller <keith_miller@apple.com>
2903 Wasm should decode constants correctly
2904 https://bugs.webkit.org/show_bug.cgi?id=165886
2906 Reviewed by Saam Barati.
2909 (const._isValidValue):
2910 * wasm/Builder_WebAssemblyBinary.js:
2912 * wasm/LowLevelBinary.js:
2913 (export.default.LowLevelBinary.prototype.float):
2914 (export.default.LowLevelBinary.prototype.double):
2915 * wasm/function-tests/f32-const.js: Added.
2916 * wasm/function-tests/f64-const.js: Added.
2917 * wasm/function-tests/i32-const.js: Added.
2920 2016-12-14 Saam Barati <sbarati@apple.com>
2922 WebAssembly: Add various low hanging fruit that will allow us to run the LLVM torture tests in Wasm
2923 https://bugs.webkit.org/show_bug.cgi?id=165883
2925 Reviewed by Keith Miller.
2928 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
2929 * wasm/Builder_WebAssemblyBinary.js:
2930 (const.emitters.Export):
2931 * wasm/js-api/table.js:
2935 * wasm/js-api/test_memory.js:
2936 (binaryShouldNotParse):
2938 (test.testMemImportError):
2942 2016-12-14 Filip Pizlo <fpizlo@apple.com>
2944 DirectTailCall implementation needs to tell the shuffler what to put into the ArgumentCount explicitly
2945 https://bugs.webkit.org/show_bug.cgi?id=165882
2947 Reviewed by Mark Lam.
2949 * stress/direct-tail-call-arity-mismatch-count-args.js: Added.
2953 2016-12-14 Keith Miller <keith_miller@apple.com>
2955 WebAssembly JS API: implement Global
2956 https://bugs.webkit.org/show_bug.cgi?id=164133
2958 Reviewed by Saam Barati.
2961 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
2962 * wasm/Builder_WebAssemblyBinary.js:
2963 (const.valueType.WASM.description.type.i32.type.const.putGlobalType):
2965 (const.putInitExpr):
2966 (const.emitters.Import):
2967 (const.emitters.Global):
2968 (const.emitters.Export):
2969 (const.emitters.Code):
2970 * wasm/LowLevelBinary.js:
2971 (export.default.LowLevelBinary.prototype.varuint32):
2972 (export.default.LowLevelBinary.prototype.varint32):
2973 * wasm/js-api/global-error.js: Added.
2976 * wasm/js-api/global-external-init-from-import.js: Added.
2977 * wasm/js-api/global-internal-init-from-import.js: Added.
2978 * wasm/js-api/global-mutate.js: Added.
2979 (createInternalGlobalModule):
2980 * wasm/js-api/globals-export.js: Added.
2981 * wasm/js-api/globals-import.js: Added.
2984 2016-12-13 Saam Barati <sbarati@apple.com>
2986 WebAssembly: implement the elements section
2987 https://bugs.webkit.org/show_bug.cgi?id=165715
2989 Reviewed by Keith Miller.
2992 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
2993 (export.default.Builder.prototype._registerSectionBuilders.switch):
2994 * wasm/Builder_WebAssemblyBinary.js:
2995 (const.emitters.Element):
2996 * wasm/function-tests/basic-element.js: Added.
2997 * wasm/js-api/element.js: Added.
2999 (assertBadBinary.badInstantiation):
3001 2016-12-13 Saam Barati <sbarati@apple.com>
3003 WebAssembly: implement the table section and table import
3004 https://bugs.webkit.org/show_bug.cgi?id=165716
3006 Reviewed by Keith Miller.
3009 (const._importMemoryContinuation):
3010 (const._importTableContinuation):
3011 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
3012 (const._importMemoryContinuation.section): Deleted.
3014 (const._importMemoryContinuation.assert): Deleted.
3015 * wasm/Builder_WebAssemblyBinary.js:
3016 (const.putResizableLimits):
3018 (const.emitters.Import):
3019 (const.emitters.Table):
3020 * wasm/function-tests/call-indirect-params.js:
3021 * wasm/function-tests/call-indirect.js:
3022 * wasm/function-tests/table-basic-2.js: Added.
3023 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
3025 * wasm/function-tests/table-basic.js: Added.
3026 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
3027 * wasm/js-api/call-indirect-results.js:
3028 (const.wasmModuleWhichImportJS): Deleted.
3029 (MonomorphicImport): Deleted.
3030 * wasm/js-api/call-indirect.js:
3031 (const.wasmModuleWhichImportJS):
3035 (MonomorphicImport): Deleted.
3036 * wasm/js-api/table.js: Added.
3040 (assertBadTableImport):
3041 (assertBadBinary.assertBadTableInstance):
3042 (assertBadTableInstance):
3043 (new.WebAssembly.Table):
3044 * wasm/js-api/test_basic_api.js:
3045 (const.c.in.constructorProperties.switch):
3047 2016-12-13 Commit Queue <commit-queue@webkit.org>
3049 Unreviewed, rolling out r209725.
3050 https://bugs.webkit.org/show_bug.cgi?id=165811
3052 "Broke ARMv7 builds" (Requested by msaboff on #webkit).
3056 "REGRESSION(r209653): speedometer crashes making virtual slow
3058 https://bugs.webkit.org/show_bug.cgi?id=165748
3059 http://trac.webkit.org/changeset/209725
3061 2016-12-12 Michael Saboff <msaboff@apple.com>
3063 REGRESSION(r209653): speedometer crashes making virtual slow path tailcalls
3064 https://bugs.webkit.org/show_bug.cgi?id=165748
3066 Reviewed by Filip Pizlo.
3068 New regression test.
3070 * stress/regress-165748.js: Added.
3080 2016-12-12 Mark Lam <mark.lam@apple.com>
3082 Debug JSC test timeout: stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js.ftl-no-cjit.
3083 https://bugs.webkit.org/show_bug.cgi?id=164630
3085 Reviewed by Keith Miller.
3087 Speculative fix for timeout issue. It looks like this test just runs a bit
3088 slower on debug builds. So, we'll give it a little more time to run.
3090 * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
3092 2016-12-11 Saam Barati <sbarati@apple.com>
3094 We should be able to throw exceptions from Wasm code and when Wasm frames are on the stack
3095 https://bugs.webkit.org/show_bug.cgi?id=165429
3097 Reviewed by Keith Miller.
3099 * wasm/function-tests/trap-load.js: Added.
3101 (wasmFrameCountFromError):
3103 (assert.continuation):
3104 * wasm/function-tests/trap-store.js: Added.
3105 (import.Builder.from.string_appeared_here.assert):
3107 (assert.continuation):
3109 * wasm/js-api/test_memory_constructor.js:
3112 2016-12-10 Commit Queue <commit-queue@webkit.org>
3114 Unreviewed, rolling out r209653, r209654, r209663, and
3116 https://bugs.webkit.org/show_bug.cgi?id=165739
3118 speedometer crashes (Requested by pizlo on #webkit).
3120 Reverted changesets:
3122 "JSVALUE64: Pass arguments in platform argument registers when
3123 making JavaScript calls"
3124 https://bugs.webkit.org/show_bug.cgi?id=160355
3125 http://trac.webkit.org/changeset/209653
3127 "Unreviewed build fix for 32 bit builds."
3128 http://trac.webkit.org/changeset/209654
3130 "Unreviewed build fix for the CLOOP after r209653"
3131 http://trac.webkit.org/changeset/209663
3133 "REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()"
3134 https://bugs.webkit.org/show_bug.cgi?id=165728
3135 http://trac.webkit.org/changeset/209673
3137 2016-12-10 Michael Saboff <msaboff@apple.com>
3139 REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()
3140 https://bugs.webkit.org/show_bug.cgi?id=165728
3142 Reviewed by Filip Pizlo.
3144 New regression test.
3146 * stress/regress-165728.js: Added.
3152 2016-12-10 Keith Miller <keith_miller@apple.com>
3154 Fix indirect_call if the result type is used.
3155 https://bugs.webkit.org/show_bug.cgi?id=165727
3157 Reviewed by Michael Saboff.
3159 * wasm/js-api/call-indirect-results.js: Added.
3160 (const.wasmModuleWhichImportJS):
3161 (MonomorphicImport):
3163 2016-12-10 Yusuke Suzuki <utatane.tea@gmail.com>
3165 [JSC] Module namespace object behaves like immutable prototype exotic object
3166 https://bugs.webkit.org/show_bug.cgi?id=165598
3168 Reviewed by Mark Lam.
3170 * modules/namespace-prototype-assignment.js: Added.
3177 (doInternalSetPrototypeOf):
3178 (ordinarySetPrototypeOf):
3179 (setImmutablePrototype):
3180 (windowProxySetPrototypeOf):
3181 (initSetterExpectation):
3182 (throwIfNoExceptionPending):
3183 (objectSetPrototypeOf):
3184 (setUnderscoreProto):
3185 (reflectSetPrototypeOf):
3187 (newObjectProto.toString):
3191 * modules/namespace-set-prototype-of.js: Added.
3193 (TypeError.Cannot.set prototype):
3195 2016-12-09 Michael Saboff <msaboff@apple.com>
3197 JSVALUE64: Pass arguments in platform argument registers when making JavaScript calls
3198 https://bugs.webkit.org/show_bug.cgi?id=160355
3200 Reviewed by Filip Pizlo.
3202 New microbenchmarks to measure call type performance.
3204 * microbenchmarks/calling-computed-args.js: Added.
3205 * microbenchmarks/calling-many-callees.js: Added.
3206 * microbenchmarks/calling-one-callee-fixed.js: Added.
3207 * microbenchmarks/calling-one-callee.js: Added.
3208 * microbenchmarks/calling-poly-callees.js: Added.
3209 * microbenchmarks/calling-poly-extra-arity-callees.js: Added.
3210 * microbenchmarks/calling-tailcall.js: Added.
3211 * microbenchmarks/calling-virtual-arity-fixup-callees.js: Added.
3212 * microbenchmarks/calling-virtual-arity-fixup-stackargs.js: Added.
3213 * microbenchmarks/calling-virtual-callees.js: Added.
3214 * microbenchmarks/calling-virtual-extra-arity-callees.js: Added.
3216 2016-12-09 Keith Miller <keith_miller@apple.com>
3218 Wasm should support call_indirect
3219 https://bugs.webkit.org/show_bug.cgi?id=165718
3221 Reviewed by Filip Pizlo.
3224 * wasm/function-tests/call-indirect-params.js: Added.
3225 * wasm/function-tests/call-indirect.js: Added.
3226 * wasm/js-api/call-indirect.js: Added.
3227 (const.wasmModuleWhichImportJS):
3228 (MonomorphicImport):
3233 2016-12-09 JF Bastien <jfbastien@apple.com>
3235 WebAssembly: implement data section
3236 https://bugs.webkit.org/show_bug.cgi?id=165696
3238 Reviewed by Keith Miller.
3240 As specified in https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#data-section
3241 Note that some of the interesting corner cases are ill-defined by the spec: https://github.com/WebAssembly/design/issues/897
3243 * wasm/Builder.js: create a data section from JavaScript
3244 * wasm/Builder_WebAssemblyBinary.js: assemble the data section into the proper binary encoding
3245 (const.emitters.Data):
3246 * wasm/js-api/test_Data.js: Added.
3248 (DataSectionOffTheEnd):
3249 (DataSectionPartlyOffTheEnd):
3250 (DataSectionEmptyOffTheEnd):
3251 (DataSectionSeenByStart):
3252 * wasm/self-test/test_BuilderJSON.js: make sure the JSON structure is fine (this sanity checks before going to binary)
3254 2016-12-09 JF Bastien <jfbastien@apple.com>
3256 WebAssembly JS API: implement start function
3257 https://bugs.webkit.org/show_bug.cgi?id=165150
3259 Reviewed by Saam Barati.
3261 * wasm/Builder.js: allow building a .Start()
3262 * wasm/Builder_WebAssemblyBinary.js:
3263 * wasm/js-api/test_Start.js: Added.
3264 (const.emitters.Start): serialize a start section
3265 * wasm/self-test/test_BuilderJSON.js: validate the start section's content
3267 2016-12-09 Saam Barati <sbarati@apple.com>
3269 WebAssembly JS API: implement importing and defining Memory
3270 https://bugs.webkit.org/show_bug.cgi?id=164134
3272 Reviewed by Keith Miller.
3275 (const._importMemoryContinuation.section):
3276 (const._importMemoryContinuation.assert):
3277 (const._importMemoryContinuation):
3278 (const._exportFunctionContinuation.const): Deleted.
3279 (const._exportFunctionContinuation): Deleted.
3280 * wasm/Builder_WebAssemblyBinary.js:
3281 (const.emitters.Import):
3282 * wasm/js-api/test_basic_api.js:
3283 (const.c.in.constructorProperties.switch):
3284 * wasm/js-api/test_memory.js: Added.
3286 (binaryShouldNotParse):
3288 (test.testMemImportError):
3289 * wasm/js-api/test_memory_constructor.js: Added.
3293 (assert.testInvalidInitial):
3294 (testInvalidInitial.testInvalidMaximum):
3295 (testInvalidInitial):
3296 (testInvalidMaximum):
3297 * wasm/self-test/test_BuilderJSON.js:
3299 2016-12-08 JF Bastien <jfbastien@apple.com>
3301 WebAssembly: JSC::link* shouldn't need a CodeBlock
3302 https://bugs.webkit.org/show_bug.cgi?id=165591
3304 Reviewed by Keith Miller.
3306 test that wasm -> JS works, including the IC
3308 * wasm/js-api/test_Instance.js:
3309 (const.wasmModuleWhichImportJS):
3310 (MonomorphicImport):
3315 2016-12-08 Filip Pizlo <fpizlo@apple.com>
3317 Green the cloop bot by raising this threshold.
3319 * mozilla/js1_5/Array/regress-101964.js:
3321 2016-12-08 JF Bastien <jfbastien@apple.com>
3323 WebAssembly JS API: wire up Instance imports
3324 https://bugs.webkit.org/show_bug.cgi?id=165118
3326 Reviewed by Saam Barati.
3328 * wasm/js-api/test_Instance.js: add the test, disabled for now
3330 2016-12-07 Keith Miller <keith_miller@apple.com>
3332 Add more missing trivial wasm ops.
3333 https://bugs.webkit.org/show_bug.cgi?id=165564
3335 Add tests for drop and tee_local.
3337 Reviewed by Geoffrey Garen.
3339 * wasm/function-tests/drop.js: Added.
3340 * wasm/function-tests/nop.js: Added.
3341 * wasm/function-tests/tee-local.js: Added.
3343 2016-12-06 Keith Miller <keith_miller@apple.com>
3345 Add support for truncation operators
3346 https://bugs.webkit.org/show_bug.cgi?id=165519
3348 Reviewed by Geoffrey Garen.
3350 * wasm/function-tests/i32-trunc-s-f32.js: Added.
3351 * wasm/function-tests/i32-trunc-s-f64.js: Added.
3352 * wasm/function-tests/i32-trunc-u-f32.js: Added.
3353 * wasm/function-tests/i32-trunc-u-f64.js: Added.
3354 * wasm/function-tests/i64-trunc-s-f32.js: Added.
3355 * wasm/function-tests/i64-trunc-s-f64.js: Added.
3356 * wasm/function-tests/i64-trunc-u-f32.js: Added.
3357 * wasm/function-tests/i64-trunc-u-f64.js: Added.
3359 2016-12-06 Mark Lam <mark.lam@apple.com>
3361 Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
3362 https://bugs.webkit.org/show_bug.cgi?id=165227
3363 <rdar://problem/29442665>
3365 Reviewed by Saam Barati.
3367 * stress/get-from-scope-dynamic-onto-proxy.js:
3368 - Updated error message.
3370 * stress/proxy-dont-infinite-loop.js: Removed.
3371 * stress/proxy-json-path.js: Removed.
3372 * stress/rest-parameter-allocation-elimination-watchpoints-6.js: Removed.
3373 - Removed these tests because the issue they are testing relies on being able to
3374 set Object.prototype.__proto__ to something else (which is now not possible).
3376 2016-12-05 Caitlin Potter <caitp@igalia.com>
3378 [JSC] report unexpected token when "async" is followed by identifier
3379 https://bugs.webkit.org/show_bug.cgi?id=165091
3381 Reviewed by Mark Lam.
3383 * stress/bug-165091.js:
3385 2016-12-05 Keith Miller <keith_miller@apple.com>
3387 Add Wasm i64 to i32 conversion.
3388 https://bugs.webkit.org/show_bug.cgi?id=165378
3390 Reviewed by Filip Pizlo.
3392 It turns out the wrap operation is just B3's Trunc.
3396 2016-12-04 Keith Miller <keith_miller@apple.com>
3398 Add support for Wasm ctz and popcnt
3399 https://bugs.webkit.org/show_bug.cgi?id=165369
3401 Reviewed by Saam Barati.
3403 * wasm/function-tests/ctz.js: Added.
3404 * wasm/function-tests/popcnt.js: Added.
3406 2016-12-03 JF Bastien <jfbastien@apple.com>
3408 WebAssembly: update binary format to 0xD version
3409 https://bugs.webkit.org/show_bug.cgi?id=165345
3411 Reviewed by Keith Miller.
3413 As described in the following PR: https://github.com/WebAssembly/design/pull/836
3414 Originally committed in r209175, reverted in r209242, and fixed in r209284.
3417 (const._normalizeFunctionSignature):
3418 * wasm/Builder_WebAssemblyBinary.js:
3419 (const.emitters.Type):
3420 (const.emitters.Code):
3421 * wasm/LowLevelBinary.js:
3422 (export.default.LowLevelBinary.prototype.block_type):
3423 (export.default.LowLevelBinary.prototype.inline_signature_type): Deleted.
3425 * wasm/js-api/test_basic_api.js:
3426 * wasm/self-test/test_BuilderWebAssembly.js:
3429 * wasm/self-test/test_WASM.js:
3432 2016-12-02 Keith Miller <keith_miller@apple.com>
3435 https://bugs.webkit.org/show_bug.cgi?id=165355
3437 Reviewed by Filip Pizlo.
3439 * wasm/function-tests/copysign.js: Added.
3441 2016-12-03 Commit Queue <commit-queue@webkit.org>
3443 Unreviewed, rolling out r209298.
3444 https://bugs.webkit.org/show_bug.cgi?id=165359
3446 broke the build (Requested by smfr on #webkit).
3451 https://bugs.webkit.org/show_bug.cgi?id=165355
3452 http://trac.webkit.org/changeset/209298
3454 2016-12-02 Keith Miller <keith_miller@apple.com>
3457 https://bugs.webkit.org/show_bug.cgi?id=165355
3459 Reviewed by Filip Pizlo.
3461 * wasm/function-tests/copysign.js: Added.
3463 2016-12-02 Keith Miller <keith_miller@apple.com>
3465 Unreviewed, fix git having a breakdown over trying to reland a rollout.
3467 2016-12-02 Keith Miller <keith_miller@apple.com>
3469 Add Wasm floating point nearest and trunc
3470 https://bugs.webkit.org/show_bug.cgi?id=165339
3472 Reviewed by Saam Barati.
3474 * wasm/function-tests/nearest.js: Added.
3475 * wasm/function-tests/trunc.js: Added.
3477 2016-12-02 Caitlin Potter <caitp@igalia.com>
3479 [JSC] add additional bit to JSTokenType bitfield
3480 https://bugs.webkit.org/show_bug.cgi?id=165091
3482 Reviewed by Geoffrey Garen.
3484 * stress/bug-165091.js: Added.
3485 (shouldThrowSyntaxError):
3487 2016-12-02 Commit Queue <commit-queue@webkit.org>
3489 Unreviewed, rolling out r209275 and r209276.
3490 https://bugs.webkit.org/show_bug.cgi?id=165348
3492 "broke the arm build" (Requested by keith_miller on #webkit).
3494 Reverted changesets:
3496 "Add Wasm floating point nearest and trunc"
3497 https://bugs.webkit.org/show_bug.cgi?id=165339
3498 http://trac.webkit.org/changeset/209275
3500 "Unreviewed, forgot to change instruction after renaming."
3501 http://trac.webkit.org/changeset/209276
3503 2016-12-02 Keith Miller <keith_miller@apple.com>
3505 Add Wasm floating point nearest and trunc
3506 https://bugs.webkit.org/show_bug.cgi?id=165339
3508 Reviewed by Filip Pizlo.
3510 * wasm/function-tests/nearest.js: Added.
3511 * wasm/function-tests/trunc.js: Added.
3513 2016-12-02 JF Bastien <jfbastien@apple.com>
3515 WebAssembly: revert patch causing odd breakage
3516 https://bugs.webkit.org/show_bug.cgi?id=165308
3520 Bug #164724 seems to cause build issues which I haven't tracked down yet. WasmOps.h can't be found:
3521 ./Source/JavaScriptCore/wasm/WasmFormat.h:34:10: fatal error: 'WasmOps.h' file not found
3523 It's weird since the file is auto-generated and has been for a while. #164724 merely includes it in WasmFormat.h.
3526 (const._normalizeFunctionSignature):
3527 * wasm/Builder_WebAssemblyBinary.js:
3528 (const.emitters.Type):
3529 (const.emitters.Code):
3530 * wasm/LowLevelBinary.js:
3531 (export.default.LowLevelBinary.prototype.inline_signature_type):
3532 (export.default.LowLevelBinary.prototype.block_type): Deleted.
3534 * wasm/js-api/test_basic_api.js:
3535 * wasm/self-test/test_BuilderWebAssembly.js:
3538 * wasm/self-test/test_WASM.js:
3541 2016-12-01 Ryan Haddad <ryanhaddad@apple.com>
3543 Skip flaky test ChakraCore/test/fieldopts/objtypespec-newobj-invalidation.1.js
3544 https://bugs.webkit.org/show_bug.cgi?id=162567
3546 Reviewed by Saam Barati.
3550 2016-12-01 Keith Miller <keith_miller@apple.com>
3552 Add wasm int to floating point opcodes
3553 https://bugs.webkit.org/show_bug.cgi?id=165252
3555 Reviewed by Geoffrey Garen.
3557 Add tests for Wasm integral to floating point conversion opcodes.
3559 * wasm/function-tests/int-to-floating-point.js: Added.
3562 2016-12-01 Geoffrey Garen <ggaren@apple.com>
3564 Land a test case for <rdar://problem/27889416>
3565 https://bugs.webkit.org/show_bug.cgi?id=165272
3567 Reviewed by Saam Barati.
3569 * stress/marked-argument-buffer.js: Added.
3574 2016-11-29 Per Arne Vollan <pvollan@apple.com>
3576 [Win] Skip failing JSC tests.
3577 https://bugs.webkit.org/show_bug.cgi?id=165140
3579 Reviewed by Mark Lam.
3582 * microbenchmarks/tan.js:
3584 2016-11-30 JF Bastien <jfbastien@apple.com>
3586 WebAssembly builder: don't throw when checker not implemented
3587 https://bugs.webkit.org/show_bug.cgi?id=165219
3589 Reviewed by Mark Lam.
3591 We should perform whichever checks we've implemented, and assume the rest are OK until bug #163421 is fixed.
3595 * wasm/function-tests/add-12.js:
3596 * wasm/function-tests/br-if-loop-less-than.js:
3597 * wasm/function-tests/brTableAsIf.js:
3598 * wasm/function-tests/brTableManyValues.js:
3599 * wasm/function-tests/brTableWithLoop.js:
3600 * wasm/function-tests/dumb-eq-if-then-else.js:
3601 * wasm/function-tests/dumb-less-than-fallthrough.js:
3602 * wasm/function-tests/dumb-less-than-ite.js:
3603 * wasm/function-tests/eqz.js:
3604 * wasm/function-tests/factorial.js:
3605 * wasm/function-tests/float-sub.js:
3606 * wasm/function-tests/i32-load.js:
3607 * wasm/function-tests/i32-load8-s.js:
3608 * wasm/function-tests/if-then-else-fallthrough.js:
3609 * wasm/function-tests/if-then-fallthrough.js:
3610 * wasm/function-tests/loop-mult.js:
3611 * wasm/function-tests/loop-sum.js:
3612 * wasm/function-tests/max.js:
3613 * wasm/function-tests/min.js:
3614 * wasm/function-tests/ret5.js:
3615 * wasm/function-tests/select.js:
3616 * wasm/self-test/test_BuilderJSON.js:
3618 2016-11-29 JF Bastien <jfbastien@apple.com>
3620 WebAssembly JS API: improve Instance
3621 https://bugs.webkit.org/show_bug.cgi?id=164757
3623 Reviewed by Keith Miller.
3625 An Instance's `exports` property wasn't populated with exports.
3627 A follow-up patch will do imports.
3629 A few things of note:
3631 - LowLevelBinary: support 3-byte integers.
3632 - LowLevelBinary: support proper UTF-8 2003 code points (instead of UTF-16).
3635 * wasm/Builder_WebAssemblyBinary.js: wire up exports, stub other things out some more
3636 (const.emitters.Export):
3637 * wasm/LowLevelBinary.js:
3638 (export.default.LowLevelBinary.prototype.uint24): add, used for UTF-8
3639 (export.default.LowLevelBinary.prototype.string): support UTF-8
3640 (export.default.LowLevelBinary.prototype.getUint24): add, used for UTF-8
3641 (export.default.LowLevelBinary.prototype.getVaruint1): was missing
3642 (export.default.LowLevelBinary.prototype.getString): support UTF-8
3643 (export.default.LowLevelBinary):
3644 * wasm/js-api/test_Instance.js: instance.exports.answer() // <-- this is where the magic of this entire patch is
3645 (ExportedAnswerI32):
3646 * wasm/js-api/test_basic_api.js: punt test to later
3647 (const.c.in.constructorProperties.switch):
3648 * wasm/self-test/test_BuilderWebAssembly.js: UTF-8
3650 * wasm/self-test/test_LowLevelBinary_string.js: UTF-8 now works
3651 * wasm/self-test/test_LowLevelBinary_uint16.js: was missing one value
3652 * wasm/self-test/test_LowLevelBinary_uint24.js: Copied from JSTests/wasm/self-test/test_LowLevelBinary_uint8.js.
3653 * wasm/self-test/test_LowLevelBinary_uint8.js: was missing one value
3654 * wasm/self-test/test_LowLevelBinary_varuint1.js: Added.
3655 * wasm/utilities.js: this `dump` thing was useful
3658 2016-11-29 Saam Barati <sbarati@apple.com>
3660 We should be able optimize the pattern where we spread a function's rest parameter to another call
3661 https://bugs.webkit.org/show_bug.cgi?id=163865
3663 Reviewed by Filip Pizlo.
3665 * microbenchmarks/default-derived-constructor.js: Added.
3666 (createClassHierarchy.let.currentClass):
3667 (createClassHierarchy):
3668 * stress/call-varargs-spread.js: Added.
3672 * stress/load-varargs-on-new-array-with-spread-convert-to-static-loads.js: Added.
3677 * stress/new-array-with-spread-with-normal-spread-and-phantom-spread.js: Added.
3682 * stress/phantom-new-array-with-spread-osr-exit.js: Added.
3688 * stress/phantom-spread-forward-varargs.js: Added.
3704 * stress/phantom-spread-osr-exit.js: Added.
3710 * stress/spread-call-convert-to-static-call.js: Added.
3715 * stress/spread-forward-call-varargs-stack-overflow.js: Added.
3720 * stress/spread-forward-varargs-rest-parameter-change-iterator-protocol-2.js: Added.
3722 (baz.Array.prototype.Symbol.iterator):
3727 * stress/spread-forward-varargs-rest-parameter-change-iterator-protocol.js: Added.
3729 (baz.Array.prototype.Symbol.iterator):
3733 * stress/spread-forward-varargs-stack-overflow.js: Added.
3738 2016-11-29 Caitlin Potter <caitp@igalia.com>
3740 [JSC] always wrap AwaitExpression operand in a new Promise
3741 https://bugs.webkit.org/show_bug.cgi?id=165181
3743 Reviewed by Yusuke Suzuki.
3745 * stress/async-await-basic.js:
3746 (async.awaitedPromisesAreWrapped):
3748 2016-11-29 Keith Miller <keith_miller@apple.com>
3750 Add simple way to implement Wasm ops that require more than one B3 opcode
3751 https://bugs.webkit.org/show_bug.cgi?id=165129
3753 Reviewed by Geoffrey Garen.
3755 * wasm/function-tests/eqz.js: Added.
3756 * wasm/function-tests/max.js: Added.
3757 * wasm/function-tests/min.js: Added.
3760 2016-11-21 Yusuke Suzuki <utatane.tea@gmail.com>
3762 Crash in com.apple.JavaScriptCore: WTF::ThreadSpecific<WTF::WTFThreadData, + 142
3763 https://bugs.webkit.org/show_bug.cgi?id=164898
3765 Reviewed by Darin Adler.
3767 * stress/tagged-template-registry-key-collect.js: Added.
3771 * stress/tagged-template-registry-key.js: Added.
3777 2016-11-20 Caitlin Potter <caitp@igalia.com>
3779 [JSC] speed up parsing of async functions
3780 https://bugs.webkit.org/show_bug.cgi?id=164808
3782 Reviewed by Yusuke Suzuki.
3784 Add tests for line terminator following "async" keyword in async
3787 * stress/async-await-syntax.js:
3790 2016-11-19 Mark Lam <mark.lam@apple.com>
3792 op_mod-* JSC tests needs a longer timeout too.
3793 https://bugs.webkit.org/show_bug.cgi?id=164994
3795 Reviewed by Yusuke Suzuki.
3797 * stress/op_mod-ConstVar.js:
3798 * stress/op_mod-VarConst.js:
3799 * stress/op_mod-VarVar.js:
3801 2016-11-19 Mark Lam <mark.lam@apple.com>
3803 Add --timeoutMultiplier option to allow some tests more time to run.
3804 https://bugs.webkit.org/show_bug.cgi?id=164951
3806 Reviewed by Yusuke Suzuki.
3808 Extended the timeout for these tests by 50% more because they run quite slow on
3811 * stress/op_div-ConstVar.js:
3812 * stress/op_div-VarConst.js:
3813 * stress/op_div-VarVar.js:
3815 2016-11-18 Yusuke Suzuki <utatane.tea@gmail.com>
3817 REGRESSION(r208867): JSC test failure: ChakraCore.yaml/ChakraCore/test/strict/05.arguments_sm.js.default
3818 https://bugs.webkit.org/show_bug.cgi?id=164929
3820 Reviewed by Mark Lam.
3822 ES2017 drops arguments.caller and JavaScriptCore is updated to meet the spec.
3823 This patch rebaselines the result of ChakraCore test for JSC.
3825 * ChakraCore/test/strict/05.arguments_sm.baseline-jsc:
3827 2016-11-18 Joseph Pecoraro <pecoraro@apple.com>
3829 Web Inspector: Generator functions should have a displayable name when shown in stack traces
3830 https://bugs.webkit.org/show_bug.cgi?id=164844
3831 <rdar://problem/29300697>
3833 Reviewed by Yusuke Suzuki.
3835 * stress/generator-function-name.js:
3836 Add another test now that we name the inner generator function
3837 that we do not break the lexical resolution of names.
3839 2016-11-17 Yusuke Suzuki <utatane.tea@gmail.com>
3841 [JSC] Drop arguments.caller
3842 https://bugs.webkit.org/show_bug.cgi?id=164859
3844 Reviewed by Saam Barati.
3846 * stress/strict-mode-arguments-caller.js: Added.
3850 2016-11-17 Keith Miller <keith_miller@apple.com>
3853 https://bugs.webkit.org/show_bug.cgi?id=164871
3855 Reviewed by Filip Pizlo.
3859 2016-11-17 Keith Miller <keith_miller@apple.com>
3862 https://bugs.webkit.org/show_bug.cgi?id=164877
3864 Reviewed by Mark Lam.
3866 B3 already has a Sqrt opcode we just need to map Wasm to it.
3870 2016-11-17 Saam Barati <sbarati@apple.com>
3872 Remove async/await compile time flag and enable tests
3873 https://bugs.webkit.org/show_bug.cgi?id=164828
3874 <rdar://problem/28639334>
3876 Reviewed by Yusuke Suzuki.
3878 * stress/async-arrow-functions-lexical-arguments-binding.js:
3879 * stress/async-arrow-functions-lexical-new.target-binding.js:
3880 * stress/async-arrow-functions-lexical-super-binding.js:
3881 * stress/async-arrow-functions-lexical-this-binding.js:
3882 * stress/async-await-basic.js:
3883 * stress/async-await-long-loop.js:
3884 * stress/async-await-module-reserved-word.js:
3885 * stress/async-await-mozilla.js:
3887 * stress/async-await-reserved-word.js:
3888 * stress/async-await-syntax.js:
3889 * stress/async-await-throw-loop.js:
3890 * stress/async-function-create-nobaseline.js:
3891 * stress/async-function-create-optimized.js:
3892 * stress/async-function-declaration-sinking-no-double-allocate.js:
3893 * stress/async-function-declaration-sinking-osrexit.js:
3894 * stress/async-function-declaration-sinking-put.js:
3895 * stress/async-function-expression-sinking-no-double-allocate.js:
3896 * stress/async-function-expression-sinking-osrexit.js:
3897 * stress/async-function-expression-sinking-put.js:
3900 2016-11-15 Mark Lam <mark.lam@apple.com>
3902 Make JSC test functions more robust.
3903 https://bugs.webkit.org/show_bug.cgi?id=164807
3905 Reviewed by Keith Miller.
3907 * stress/jsc-test-functions-should-be-more-robust.js: Added.
3909 2016-11-15 Keith Miller <keith_miller@apple.com>
3911 B3 should support UDiv/UMod
3912 https://bugs.webkit.org/show_bug.cgi?id=164811
3914 Reviewed by Filip Pizlo.
3916 Link new instructions to wasm.
3920 2016-11-15 Saam Barati <sbarati@apple.com>
3922 Debug JSC test timeout: stress/has-own-property-name-cache-symbols-and-strings.js.ftl-no-cjit-small-pool
3923 https://bugs.webkit.org/show_bug.cgi?id=163012
3925 Unreviewed. This patch makes a test run for less time because it's timing out on the bots.
3927 * stress/has-own-property-name-cache-symbols-and-strings.js:
3929 2016-11-15 Mark Lam <mark.lam@apple.com>
3931 The jsc shell's setImpureGetterDelegate() should ensure that the set value is an ImpureGetter.
3932 https://bugs.webkit.org/show_bug.cgi?id=164781
3933 <rdar://problem/28418590>
3935 Reviewed by Geoffrey Garen and Michael Saboff.
3937 * stress/jsc-setImpureGetterDelegate-on-bad-type.js: Added.
3939 2016-11-15 Yusuke Suzuki <utatane.tea@gmail.com>
3941 [DOMJIT] Allow using macro assembler scratches in FTL CheckDOM
3942 https://bugs.webkit.org/show_bug.cgi?id=164727
3944 Reviewed by Filip Pizlo.
3946 * stress/check-dom-with-signature.js: Added.
3951 2016-11-14 Caitlin Potter <caitp@igalia.com>
3953 [JSC] do not reference AwaitExpression Promises in async function Promise chain
3954 https://bugs.webkit.org/show_bug.cgi?id=164753
3956 Reviewed by Yusuke Suzuki.
3958 * asyncFunctionTests.yaml:
3959 * stress/async-await-long-loop.js: Added.
3962 * stress/async-await-throw-loop.js: Added.
3967 2016-11-14 Keith Miller <keith_miller@apple.com>
3970 https://bugs.webkit.org/show_bug.cgi?id=164743
3972 Reviewed by Saam Barati.
3974 * wasm/function-tests/select.js: Added.
3976 2016-11-14 Caitlin Potter <caitp@igalia.com>
3978 [JSC] Handle new_async_func / new_async_func_exp in DFG / FTL
3979 https://bugs.webkit.org/show_bug.cgi?id=164037
3981 Reviewed by Yusuke Suzuki.
3983 Add tests based on tests from https://trac.webkit.org/changeset/194216.
3985 * asyncFunctionTests.yaml:
3986 * stress/async-function-create-nobaseline.js: Added.
3987 * stress/async-function-create-optimized.js: Added.
3988 * stress/async-function-declaration-sinking-no-double-allocate.js: Added.
3989 * stress/async-function-declaration-sinking-osrexit.js: Added.
3990 * stress/async-function-declaration-sinking-put.js: Added.
3991 * stress/async-function-expression-sinking-no-double-allocate.js: Added.
3992 * stress/async-function-expression-sinking-osrexit.js: Added.
3993 * stress/async-function-expression-sinking-put.js: Added.
3995 2016-11-14 Mark Lam <mark.lam@apple.com>
3997 Some of JSStringView::SafeView methods are not idiomatically safe for JSString to StringView conversions.
3998 https://bugs.webkit.org/show_bug.cgi?id=164701
3999 <rdar://problem/27462104>
4001 Reviewed by Darin Adler.
4003 * stress/string-prototype-charCodeAt-on-too-long-rope.js: Added.
4005 2016-11-14 Mark Lam <mark.lam@apple.com>
4007 RegExpObject::exec/match should handle errors gracefully.
4008 https://bugs.webkit.org/show_bug.cgi?id=155145
4009 <rdar://problem/27435934>
4011 Reviewed by Keith Miller.
4013 * stress/regexp-prototype-exec-on-too-long-rope.js: Added.
4014 * stress/regexp-prototype-match-on-too-long-rope.js: Added.
4015 * stress/regexp-prototype-test-on-too-long-rope.js: Added.
4017 2016-11-14 Mark Lam <mark.lam@apple.com>
4019 Enhance run-jsc-stress-test script to allow optional test specific options to be added for all test run configurations.
4020 https://bugs.webkit.org/show_bug.cgi?id=164695
4022 Reviewed by Keith Miller.
4024 Replace use of runMisc* test run configurations with equivalents.
4026 * stress/licm-no-pre-header-nested.js:
4027 * stress/licm-no-pre-header.js:
4028 * stress/licm-pre-header-cannot-exit-nested.js:
4029 * stress/licm-pre-header-cannot-exit.js:
4030 * stress/make-dictionary-repatch.js:
4031 * stress/retry-cache-later.js:
4032 * stress/shadow-chicken-reading-from-scope-after-ftl-osr-exit-bytecode-liveness.js:
4033 * stress/slow-path-generator-updating-current-node-dfg.js:
4034 * stress/unshift-array-storage.js:
4036 2016-11-11 Joseph Pecoraro <pecoraro@apple.com>
4038 test262: DataView with explicit undefined byteLength should be the same as it not being present
4039 https://bugs.webkit.org/show_bug.cgi?id=164453
4041 Reviewed by Darin Adler.
4043 * stress/dataview-construct.js: Added.
4048 2016-11-11 Joseph Pecoraro <pecoraro@apple.com>
4050 test262: DataView get methods should allow for missing offset, set methods should allow for missing value
4051 https://bugs.webkit.org/show_bug.cgi?id=164451
4053 Reviewed by Darin Adler.
4057 2016-11-11 Saam Barati <sbarati@apple.com>
4059 We should have a more concise way of determining when we're varargs calling a function using rest parameters
4060 https://bugs.webkit.org/show_bug.cgi?id=164258
4062 Reviewed by Yusuke Suzuki.
4064 * microbenchmarks/call-using-spread.js: Added.
4067 * microbenchmarks/spread-large-array.js: Added.
4070 * microbenchmarks/spread-small-array.js: Added.
4072 * stress/spread-array-iterator-watchpoint-2.js: Added.
4074 (arrayIterator.next):
4075 * stress/spread-array-iterator-watchpoint.js: Added.
4077 (Array.prototype.Symbol.iterator):
4078 * stress/spread-non-array.js: Added.
4081 (let.customIterator.Symbol.iterator):
4084 2016-11-11 Keith Miller <keith_miller@apple.com>
4086 Relocate wasm tests and actually add them to the test runner
4087 https://bugs.webkit.org/show_bug.cgi?id=164668
4089 Reviewed by Yusuke Suzuki.
4091 This moves the Wasm tests from their current location down a level.
4092 Without relocating, the tests cannot properly be run by the wasm test runner.
4095 * wasm/Builder.js: Fix typos, yay lazy synatx checking!
4096 * wasm/LowLevelBinary.js: Fix typos, yay lazy synatx checking!
4097 (export.default.LowLevelBinary.prototype.get return):
4098 * wasm/function-tests/add-12.js: Renamed from JSTests/wasm/js-api/function-tests/add-12.js.
4099 * wasm/function-tests/br-if-loop-less-than.js: Renamed from JSTests/wasm/js-api/function-tests/br-if-loop-less-than.js.
4100 * wasm/function-tests/brTableAsIf.js: Renamed from JSTests/wasm/js-api/function-tests/brTableAsIf.js.
4101 * wasm/function-tests/brTableManyValues.js: Renamed from JSTests/wasm/js-api/function-tests/brTableManyValues.js.
4102 * wasm/function-tests/brTableWithLoop.js: Renamed from JSTests/wasm/js-api/function-tests/brTableWithLoop.js.
4103 * wasm/function-tests/dumb-eq-if-then-else.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-eq-if-then-else.js.
4104 * wasm/function-tests/dumb-less-than-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-less-than-fallthrough.js.
4105 * wasm/function-tests/dumb-less-than-ite.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-less-than-ite.js.
4106 * wasm/function-tests/factorial.js: Renamed from JSTests/wasm/js-api/function-tests/factorial.js.
4107 * wasm/function-tests/float-sub.js: Renamed from JSTests/wasm/js-api/function-tests/float-sub.js.
4108 * wasm/function-tests/i32-load.js: Renamed from JSTests/wasm/js-api/function-tests/i32-load.js.
4109 * wasm/function-tests/i32-load8-s.js: Renamed from JSTests/wasm/js-api/function-tests/i32-load8-s.js.
4110 * wasm/function-tests/if-then-else-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/if-then-else-fallthrough.js.
4111 * wasm/function-tests/if-then-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/if-then-fallthrough.js.
4112 * wasm/function-tests/loop-mult.js: Renamed from JSTests/wasm/js-api/function-tests/loop-mult.js.
4113 * wasm/function-tests/loop-sum.js: Renamed from JSTests/wasm/js-api/function-tests/loop-sum.js.
4114 * wasm/function-tests/ret5.js: Renamed from JSTests/wasm/js-api/function-tests/ret5.js.
4115 * wasm/self-test/test_BuilderJSON.js: Rebasline
4117 2016-11-11 Keith Miller <keith_miller@apple.com>
4119 Move Wasm tests to JS
4120 https://bugs.webkit.org/show_bug.cgi?id=164611
4122 Reviewed by Geoffrey Garen.
4124 This patch translates most of the tests from testWasm.cpp to the JS testing api. Most of the
4125 ommited tests were earliest tests, which tested trivial things, like adding two
4126 constants. Some tests are ommited for other reasons, however. These are:
4128 1) Tests using I64 since the testing api does not yet know how to handle 64-bit numbers. 2)
4129 Tests that would validate the memory of the module once wasm was done with it since that's
4130 not really possible in JS.
4132 In order to make such a translation easier this patch also adds some features to the JS
4135 1) Blocks can now be done lexically by adding a lambda as the last argument of the block
4136 opcode. For example one can do:
4138 .Block("i32", b => b.I32Const(1) )
4140 and the nested lambda will automatically have an end attached.
4142 2) The JS testing api can now handle inline signature types.
4144 3) Relocate some code to make it easier to follow and prevent 44 space indentation.
4146 4) Rename varuint/varint to varuint32/varint32, this lets them be directly called from the
4147 wasm.json without being remapped.
4149 5) Add support for Memory and Function sections to the Builder.
4151 6) Add support for local variables.
4153 On the JSC side, we needed to expose a new function to validate the compiled wasm code
4154 behaves the way we expect. At least until the JS Wasm API is finished. The new validation
4155 function, testWasmModuleFunctions, takes an array buffer containing the wasm binary, the
4156 number of functions in the blob and tests for each of those functions.
4159 (const._maybeRegisterType):
4161 (switch.typeof): Deleted.
4162 * wasm/Builder_WebAssemblyBinary.js:
4163 (const.emitters.Type):
4164 (const.emitters.Import):
4165 (const.emitters.Function):
4166 (const.emitters.Memory):
4167 (const.emitters.Code):
4168 (export.const.Binary):
4169 * wasm/LowLevelBinary.js:
4170 (export.default.LowLevelBinary.prototype.get return):
4171 (export.default.LowLevelBinary.prototype.varuint32):
4172 (export.default.LowLevelBinary.prototype.varint32):
4173 (export.default.LowLevelBinary.prototype.varuint1):
4174 (export.default.LowLevelBinary.prototype.varint7):
4175 (export.default.LowLevelBinary.prototype.varuint7):
4176 (export.default.LowLevelBinary.prototype.inline_signature_type):
4177 (export.default.LowLevelBinary.prototype.string):
4178 (export.default.LowLevelBinary.prototype.getVaruint32):
4179 (export.default.LowLevelBinary.prototype.getVarint32):
4180 (export.default.LowLevelBinary.prototype.getVaruint7):
4181 (export.default.LowLevelBinary.prototype.getString):
4182 (export.default.LowLevelBinary):
4183 (export.default.LowLevelBinary.prototype.varuint): Deleted.
4184 (export.default.LowLevelBinary.prototype.varint): Deleted.
4185 (export.default.LowLevelBinary.prototype.getVaruint): Deleted.
4186 (export.default.LowLevelBinary.prototype.getVarint): Deleted.
4187 * wasm/js-api/test_old_tests.js: Added.
4190 (brTableManyValues):
4191 (run.brTableManyValues.brTableAsIf):
4192 (ifThenFallthrough):
4193 (ifThenElseFallthrough):
4194 (dumbLessThanFallthrough):
4195 (run.dumbLessThanFallthrough.floatSub):
4196 (run.floatSub.add12):
4197 (run.add12.factorial):
4199 (run.i32load.i32load8s):
4200 (run.i32load8s.dumbEqIfThenElse):
4201 (run.dumbEqIfThenElse.dumbEqIfThenElse):
4202 (run.dumbEqIfThenElse.dumbLessThanIfThenElse):
4203 (run.dumbLessThanIfThenElse.loopSum):
4204 (run.loopSum.loopMult):
4206 (run.brIfLoopLessThan.run):
4207 * wasm/self-test/test_LowLevelBinary_varint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varint.js.
4208 * wasm/self-test/test_LowLevelBinary_varuint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varuint.js.
4211 (const._maybeRegisterType):
4213 (switch.typeof): Deleted.
4214 * wasm/Builder_WebAssemblyBinary.js:
4215 (const.emitters.Type):
4216 (const.emitters.Import):
4217 (const.emitters.Function):
4218 (const.emitters.Memory):
4219 (const.emitters.Code):
4220 (export.const.Binary):
4221 * wasm/LowLevelBinary.js:
4222 (export.default.LowLevelBinary.prototype.get return):
4223 (export.default.LowLevelBinary.prototype.varuint32):
4224 (export.default.LowLevelBinary.prototype.varint32):
4225 (export.default.LowLevelBinary.prototype.varuint1):
4226 (export.default.LowLevelBinary.prototype.varint7):
4227 (export.default.LowLevelBinary.prototype.varuint7):
4228 (export.default.LowLevelBinary.prototype.inline_signature_type):
4229 (export.default.LowLevelBinary.prototype.string):
4230 (export.default.LowLevelBinary.prototype.getVaruint32):
4231 (export.default.LowLevelBinary.prototype.getVarint32):
4232 (export.default.LowLevelBinary.prototype.getVaruint7):
4233 (export.default.LowLevelBinary.prototype.getString):
4234 (export.default.LowLevelBinary):
4235 (export.default.LowLevelBinary.prototype.varuint): Deleted.
4236 (export.default.LowLevelBinary.prototype.varint): Deleted.
4237 (export.default.LowLevelBinary.prototype.getVaruint): Deleted.
4238 (export.default.LowLevelBinary.prototype.getVarint): Deleted.
4239 * wasm/js-api/function-tests/add-12.js: Added.
4240 * wasm/js-api/function-tests/br-if-loop-less-than.js: Added.
4241 * wasm/js-api/function-tests/brTableAsIf.js: Added.
4242 * wasm/js-api/function-tests/brTableManyValues.js: Added.
4243 * wasm/js-api/function-tests/brTableWithLoop.js: Added.
4244 * wasm/js-api/function-tests/dumb-eq-if-then-else.js: Added.
4245 * wasm/js-api/function-tests/dumb-less-than-fallthrough.js: Added.
4246 * wasm/js-api/function-tests/dumb-less-than-ite.js: Added.
4247 * wasm/js-api/function-tests/factorial.js: Added.
4248 * wasm/js-api/function-tests/float-sub.js: Added.
4249 * wasm/js-api/function-tests/i32-load.js: Added.
4250 * wasm/js-api/function-tests/i32-load8-s.js: Added.
4251 * wasm/js-api/function-tests/if-then-else-fallthrough.js: Added.
4252 * wasm/js-api/function-tests/if-then-fallthrough.js: Added.
4253 * wasm/js-api/function-tests/loop-mult.js: Added.
4254 * wasm/js-api/function-tests/loop-sum.js: Added.
4255 * wasm/js-api/function-tests/ret5.js: Added.
4256 * wasm/self-test/test_LowLevelBinary_varint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varint.js.
4257 * wasm/self-test/test_LowLevelBinary_varuint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varuint.js.
4259 2016-11-11 Saam Barati <sbarati@apple.com>
4261 We recursively grab a lock in the DFGBytecodeParser causing us to deadlock
4262 https://bugs.webkit.org/show_bug.cgi?id=164650
4264 Reviewed by Geoffrey Garen.
4266 * stress/dont-dead-lock-put-by-val-as-put-by-id.js: Added.
4271 2016-11-11 Chris Dumez <cdumez@apple.com>
4273 Unreviewed, rolling out r208584.
4275 Seems to have regressed Speedometer by 1% on Mac
4279 "We should have a more concise way of determining when we're
4280 varargs calling a function using rest parameters"
4281 https://bugs.webkit.org/show_bug.cgi?id=164258
4282 http://trac.webkit.org/changeset/208584
4284 2016-11-11 Chris Dumez <cdumez@apple.com>
4286 Unreviewed, rolling out r208117 and r208160.
4288 Regressed Speedometer by >1.5%
4290 Reverted changesets:
4292 "We should have a way of profiling when a get_by_id is pure
4293 and to emit a PureGetById in the DFG/FTL"
4294 https://bugs.webkit.org/show_bug.cgi?id=163305
4295 http://trac.webkit.org/changeset/208117
4297 "Debug JSC test microbenchmarks/pure-get-by-id-cse-2.js timing
4299 https://bugs.webkit.org/show_bug.cgi?id=164227
4300 http://trac.webkit.org/changeset/208160
4302 2016-11-11 Saam Barati <sbarati@apple.com>
4304 We should have a more concise way of determining when we're varargs calling a function using rest parameters
4305 https://bugs.webkit.org/show_bug.cgi?id=164258
4307 Reviewed by Yusuke Suzuki.
4309 * microbenchmarks/call-using-spread.js: Added.
4312 * microbenchmarks/spread-large-array.js: Added.
4315 * microbenchmarks/spread-small-array.js: Added.
4317 * stress/spread-array-iterator-watchpoint-2.js: Added.
4319 (arrayIterator.next):
4320 * stress/spread-array-iterator-watchpoint.js: Added.
4322 (Array.prototype.Symbol.iterator):
4323 * stress/spread-non-array.js: Added.
4326 (let.customIterator.Symbol.iterator):
4329 2016-11-10 Mark Lam <mark.lam@apple.com>
4331 Fix broken have-a-bad-time-with-arguments.js test.
4332 https://bugs.webkit.org/show_bug.cgi?id=164626
4334 Reviewed by Filip Pizlo.
4336 But also saved a copy of the broken one as broken-have-a-bad-time-with-arguments-for-gc-testing.js
4337 because coincidentally, it stresses the GC in ways that help reveal bugs.
4339 * stress/broken-have-a-bad-time-with-arguments-for-gc-testing.js: Added.
4342 (let.argsDeclIndex.in.argumentsDecls.let.indexToReturnIndex.in.indicesToReturn.let.insertElementActionIndex.in.insertElementActions.let.tierWarmupCountIndex.in.tierWarmupCounts.let.testArgsIndex.in.testArgsList.catch):
4343 * stress/have-a-bad-time-with-arguments.js:
4345 2016-11-10 JF Bastien <jfbastien@apple.com>
4347 ASSERTION FAILED: length > offset encountered with wasm.yaml/wasm/js-api/test_Module.js.default-wasm
4348 https://bugs.webkit.org/show_bug.cgi?id=164597
4350 Reviewed by Keith Miller.
4352 Trim the array buffer before returning it: it's optimistically
4353 over-allocated to avoid growing all the time, but when parsed it
4354 can't have extra content.
4356 * wasm/Builder_WebAssemblyBinary.js:
4357 (export.const.Binary):
4358 * wasm/LowLevelBinary.js:
4359 (export.default.LowLevelBinary.prototype.get return):
4361 2016-11-10 Joseph Pecoraro <pecoraro@apple.com>
4363 test262: DataView / TypedArray methods should throw RangeErrors for negative numbers (ToIndex)
4364 https://bugs.webkit.org/show_bug.cgi?id=164450
4366 Reviewed by Darin Adler.
4368 * stress/dataview-typedarray-toindex.js: Added.
4369 Tests for all cases where ToIndex should be used.
4374 2016-11-10 Mark Lam <mark.lam@apple.com>
4376 Graph::methodOfGettingAValueProfileFor() should be returning the profile for the operand node.
4377 https://bugs.webkit.org/show_bug.cgi?id=164600
4378 <rdar://problem/28828676>
4380 Reviewed by Filip Pizlo.
4382 * stress/osr-exit-on-op-negate-should-no-fail-assertions.js: Added.
4384 2016-11-08 Yusuke Suzuki <utatane.tea@gmail.com>
4386 [JSC] Avoid cloned arguments allocation in ArrayPrototype methods
4387 https://bugs.webkit.org/show_bug.cgi?id=164502
4389 Reviewed by Saam Barati.
4391 * stress/argument-intrinsic-basic.js: Added.
4393 (builtin.createBuiltin):
4394 * stress/argument-intrinsic-inlining-with-result-escape.js: Added.
4396 (builtin.createBuiltin):
4398 * stress/argument-intrinsic-nested-inlining.js: Added.
4400 (builtin.createBuiltin):
4404 * stress/argument-intrinsic-not-convert-to-get-argument.js: Added.
4406 (builtin.createBuiltin):
4407 * stress/argument-intrinsic-with-stack-write.js: Added.
4409 (builtin.createBuiltin):
4411 2016-11-09 Saam Barati <sbarati@apple.com>
4413 Math.min()/Math.max() with no arguments is lowered incorrectly in the BytecodeParser
4414 https://bugs.webkit.org/show_bug.cgi?id=164464
4415 <rdar://problem/29131452>
4417 Reviewed by Darin Adler.