1 2017-03-23 Yusuke Suzuki <utatane.tea@gmail.com>
3 [JSC][DFG] Make addShouldSpeculateAnyInt more conservative to avoid regression caused by Double <-> Int52 conversions
4 https://bugs.webkit.org/show_bug.cgi?id=169998
6 Reviewed by Saam Barati.
8 * microbenchmarks/int52-back-and-forth.js: Added.
12 2017-03-23 Mark Lam <mark.lam@apple.com>
14 Clients of JSArray::tryCreateForInitializationPrivate() should do their own null checks.
15 https://bugs.webkit.org/show_bug.cgi?id=169783
17 Reviewed by Saam Barati.
19 * stress/regress-169783.js: Added.
21 2017-03-22 Yusuke Suzuki <utatane.tea@gmail.com>
23 [JSC][DFG] Propagate AnyIntAsDouble information carefully to utilize it in fixup
24 https://bugs.webkit.org/show_bug.cgi?id=169914
26 Reviewed by Saam Barati.
28 * stress/any-int-as-double-add.js: Added.
31 * stress/to-this-numbers.js: Added.
33 (Number.prototype.toThis):
35 2017-03-22 Mark Lam <mark.lam@apple.com>
37 Add support for Error.stackTraceLimit.
38 https://bugs.webkit.org/show_bug.cgi?id=169904
40 Reviewed by Saam Barati.
42 * stress/error-stack-trace-limit.js: Added.
44 2017-03-22 Yusuke Suzuki <utatane.tea@gmail.com>
46 [JSC] Use jsNontrivialString for Number toString operations
47 https://bugs.webkit.org/show_bug.cgi?id=169965
51 * stress/to-string-int32.js: Added.
56 2017-03-22 JF Bastien <jfbastien@apple.com>
58 WebAssembly: test module namespace object for WebAssembly.Instance
59 https://bugs.webkit.org/show_bug.cgi?id=169951
61 Reviewed by Saam Barati.
63 * wasm/js-api/test_basic_api.js:
64 (const.c.in.constructorProperties.switch):
66 2017-03-22 JF Bastien <jfbastien@apple.com>
68 WebAssembly: constructors without new don't throw
69 https://bugs.webkit.org/show_bug.cgi?id=165995
71 Reviewed by Saam Barati.
73 * wasm/js-api/test_basic_api.js:
74 (const.c.in.constructorProperties.switch):
76 2017-03-21 Yusuke Suzuki <utatane.tea@gmail.com>
78 [JSC] Optimize Number.prototype.toString on Int32 / Int52 / Double
79 https://bugs.webkit.org/show_bug.cgi?id=167454
81 Reviewed by Saam Barati.
83 * stress/number-to-string-abstract-operation.js: Added.
86 (shouldBe.int32ToString.new.Number.int52ToString):
87 (shouldBe.int32ToString.new.Number):
88 (shouldBe.doubleToString):
89 * stress/number-to-string-radix.js: Added.
92 (shouldBe.int32ToString.new.Number.int52ToString):
93 (shouldBe.int32ToString.new.Number):
94 (shouldBe.doubleToString):
95 * stress/number-to-string.js: Added.
98 (shouldBe.int32ToString.new.Number.int52ToString):
99 (shouldBe.int32ToString.new.Number):
100 (shouldBe.doubleToString):
102 2017-03-19 Chris Dumez <cdumez@apple.com>
104 `const location = "foo"` throws in a worker
105 https://bugs.webkit.org/show_bug.cgi?id=169839
107 Reviewed by Mark Lam.
109 * ChakraCore/test/es6/letconst_global_shadow_builtins_nonconfigurable.baseline-jsc:
110 Update expected jsc result now that we throw a SyntaxError when trying to shadow undefined
111 with a let variable. We used not to throw because the value is undefined but this was not
112 as per EcmaScript. Both Firefox and Chrome throw in this case.
114 * stress/global-lexical-redeclare-variable.js:
116 Update test that defines a non-configurable 'zoo' property on the global object and then
117 expected shadowing it with a 'let zoo' variable to work because its value was undefined.
118 This was not as per EcmaScript spec and both Firefox and Chrome throw in this case.
120 2017-03-19 Yusuke Suzuki <utatane.tea@gmail.com>
122 import(arg) crashes when ToString(arg) throws
123 https://bugs.webkit.org/show_bug.cgi?id=169778
125 Reviewed by Saam Barati.
127 * stress/import-reject-with-exception.js: Added.
129 (let.x.get toString):
131 2017-03-16 Filip Pizlo <fpizlo@apple.com>
133 FTL should support global and eval code
134 https://bugs.webkit.org/show_bug.cgi?id=169656
136 Reviewed by Geoffrey Garen and Saam Barati.
138 Added basic performance tests of global and eval code. These tests will run a lot faster in with
139 the FTL because of the object allocation.
141 * microbenchmarks/eval-code-ftl-reentry.js: Added.
142 * microbenchmarks/eval-code-ftl.js: Added.
143 * microbenchmarks/global-code-ftl.js: Added.
144 * 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.
146 2017-03-16 Caio Lima <ticaiolima@gmail.com>
148 [ESnext] Implement Object Spread
149 https://bugs.webkit.org/show_bug.cgi?id=167963
151 Reviewed by Yusuke Suzuki.
153 * stress/object-spread.js: Added.
162 (try.let.obj.get foo):
165 2017-03-15 Yusuke Suzuki <utatane.tea@gmail.com>
167 [JSC] Default parameter part should be retrieved by op_get_argument opcode instead of changing arity
168 https://bugs.webkit.org/show_bug.cgi?id=164582
170 Reviewed by Saam Barati.
172 * stress/function-with-defaults-inlining.js: Added.
176 * stress/function-with-defaults-non-inlining.js: Added.
181 2017-03-15 Yusuke Suzuki <utatane.tea@gmail.com>
183 [DFG] ToString operation should have fixup for primitives to say this node does not have side effects
184 https://bugs.webkit.org/show_bug.cgi?id=169544
186 Reviewed by Saam Barati.
188 * microbenchmarks/template-string-array.js: Added.
190 * stress/to-string-non-cell-use.js: Added.
194 2017-03-13 Commit Queue <commit-queue@webkit.org>
196 Unreviewed, rolling out r213856.
197 https://bugs.webkit.org/show_bug.cgi?id=169562
199 Breaks JSC stress test stress/super-property-access.js.ftl-
200 eager failing (Requested by mlam|g on #webkit).
204 "FTL should not flush strict arguments unless it really needs
206 https://bugs.webkit.org/show_bug.cgi?id=169519
207 http://trac.webkit.org/changeset/213856
209 2017-03-11 Filip Pizlo <fpizlo@apple.com>
211 FTL should not flush strict arguments unless it really needs to
212 https://bugs.webkit.org/show_bug.cgi?id=169519
214 Reviewed by Mark Lam.
216 This benchmark runs 3.5x faster thanks to this patch.
218 * microbenchmarks/strict-arguments-no-escape.js: Added.
223 2017-03-13 Caio Lima <ticaiolima@gmail.com>
225 [JSC] It should be possible create a label named let when parsing Statement in non strict mode
226 https://bugs.webkit.org/show_bug.cgi?id=168684
228 Reviewed by Saam Barati.
230 * ChakraCore/test/LetConst/DeclOutofBlock.baseline-jsc:
232 2017-03-10 Saam Barati <sbarati@apple.com>
234 WebAssembly: Make more demos run
235 https://bugs.webkit.org/show_bug.cgi?id=165510
236 <rdar://problem/29760310>
238 Reviewed by Keith Miller.
241 (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
242 * wasm/js-api/wrapper-function.js: Added.
244 (return.new.WebAssembly.Module):
245 (assert.throws.makeInstance):
249 2017-03-10 Mark Lam <mark.lam@apple.com>
251 JSC: BindingNode::bindValue doesn't increase the scope's reference count.
252 https://bugs.webkit.org/show_bug.cgi?id=168546
253 <rdar://problem/30589551>
255 Reviewed by Saam Barati.
257 * stress/regress-168546.js: Added.
259 2017-03-09 Caio Lima <ticaiolima@gmail.com>
261 [ESnext] Implement Object Rest - Implementing Object Rest Destructuring
262 https://bugs.webkit.org/show_bug.cgi?id=167962
264 Reviewed by Keith Miller.
266 * stress/object-rest-deconstruct.js: Added.
268 (let.assertPropDescriptor):
276 2017-03-09 Saam Barati <sbarati@apple.com>
278 WebAssembly: Make the Unity AngryBots demo run
279 https://bugs.webkit.org/show_bug.cgi?id=169268
281 Reviewed by Keith Miller.
283 * wasm/function-tests/many-arguments-to-function.js: Added.
284 (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):
285 (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):
286 (i.instance.exports.f0):
287 (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):
288 (instance.exports.f0):
290 2017-03-08 Yusuke Suzuki <utatane.tea@gmail.com>
292 [GTK] JSC test stress/arity-check-ftl-throw.js.ftl-no-cjit-validate-sampling-profiler crashing on GTK bot
293 https://bugs.webkit.org/show_bug.cgi?id=160124
295 Reviewed by Mark Lam.
297 * stress/spread-forward-call-varargs-stack-overflow.js:
299 2017-03-06 Saam Barati <sbarati@apple.com>
301 WebAssembly: Implement the WebAssembly.instantiate API
302 https://bugs.webkit.org/show_bug.cgi?id=165982
303 <rdar://problem/29760110>
305 Reviewed by Keith Miller.
307 * wasm/js-api/web-assembly-instantiate.js: Added.
308 (assert.eq.async.test):
310 (assert.truthy.async.test):
313 2017-03-06 Saam Barati <sbarati@apple.com>
315 Unreviewed. Fix test expected error message.
317 * wasm/js-api/element.js:
320 2017-03-06 Caio Lima <ticaiolima@gmail.com>
322 op_get_by_id_with_this should use inline caching
323 https://bugs.webkit.org/show_bug.cgi?id=162124
325 Reviewed by Saam Barati.
327 * microbenchmarks/super-getter.js: Added.
332 * stress/super-force-ic-fail.js: Added.
338 * stress/super-get-by-id.js: Added.
341 (Base.prototype.get name):
342 (Base.prototype.set name):
343 (Subclass.prototype.get name):
347 (PolymorphicSubclass.prototype.get value):
348 (PolymorphicSubclass):
351 (MegamorphicSubclass.prototype.get value):
352 (MegamorphicSubclass):
353 (let.subObj.get value):
357 (BaseException.prototype.get name):
358 (SubclassException.prototype.get name):
361 (prototype.get name):
362 (SubclassExceptionComplex.prototype.get name):
363 (SubclassExceptionComplex):
364 * stress/super-getter-reset-ic.js: Added.
368 2017-03-06 Saam Barati <sbarati@apple.com>
370 WebAssembly: implement init_expr for Element
371 https://bugs.webkit.org/show_bug.cgi?id=165888
372 <rdar://problem/29760199>
374 Reviewed by Keith Miller.
376 * wasm/Builder_WebAssemblyBinary.js:
377 (const.emitters.Element):
379 * wasm/js-api/element.js:
381 (badInstantiation.makeModule):
382 (badInstantiation.test):
384 * wasm/js-api/global-error.js:
386 2017-03-06 Carlos Alberto Lopez Perez <clopez@igalia.com>
388 [JSC] [Linux] Test stress/spread-forward-call-varargs-stack-overflow.js fails
389 https://bugs.webkit.org/show_bug.cgi?id=169206
391 Unreviewed test gardening.
393 * stress/spread-forward-call-varargs-stack-overflow.js: Skip on Linux platforms.
395 2017-03-06 Yusuke Suzuki <utatane.tea@gmail.com>
397 [JSC] Allow indexed module namespace object fields
398 https://bugs.webkit.org/show_bug.cgi?id=168870
400 Reviewed by Saam Barati.
402 * wasm/spec-tests/names.wast.js:
404 2017-03-06 Yusuke Suzuki <utatane.tea@gmail.com>
406 Null pointer crash when loading module with unresolved import also as a script file
407 https://bugs.webkit.org/show_bug.cgi?id=168971
409 Reviewed by Saam Barati.
411 * stress/re-execute-error-module.js: Added.
414 * stress/resources/error-module.js: Added.
416 2017-03-02 Keith Miller <keith_miller@apple.com>
418 WebAssemblyFunction should have Function.prototype as its prototype
419 https://bugs.webkit.org/show_bug.cgi?id=169101
421 Reviewed by Filip Pizlo.
423 * wasm/js-api/web-assembly-function.js: Added.
425 2017-02-28 Oleksandr Skachkov <gskachkov@gmail.com>
427 Use of arguments in arrow function is slow
428 https://bugs.webkit.org/show_bug.cgi?id=168829
430 Reviewed by Saam Barati.
432 * microbenchmarks/arrowfunciton-direct-arguments.js: Added.
434 * microbenchmarks/arrowfunciton-reference-arguments.js: Added.
437 2017-02-27 Commit Queue <commit-queue@webkit.org>
439 Unreviewed, rolling out r213019.
440 https://bugs.webkit.org/show_bug.cgi?id=168925
442 "It broke 32-bit jsc tests in debug builds" (Requested by
443 saamyjoon on #webkit).
447 "op_get_by_id_with_this should use inline caching"
448 https://bugs.webkit.org/show_bug.cgi?id=162124
449 http://trac.webkit.org/changeset/213019
451 2017-02-27 JF Bastien <jfbastien@apple.com>
453 WebAssembly: miscellaneous spec fixes part deux
454 https://bugs.webkit.org/show_bug.cgi?id=168861
456 Reviewed by Keith Miller.
458 * wasm.yaml: more passing tests
459 * wasm/Builder.js: use a Map instead of an Object for the function
460 index space, because Number entries such as 0 were colliding with
461 string entries such as "0". This in turn requires some hashing of
462 objects which are inserted, because Map uses Object's insertion
463 order when comparing.
464 (export.default.Builder):
465 (export.default.Builder.prototype._functionIndexSpaceKeyHash):
466 (export.default.Builder.prototype._registerFunctionToIndexSpace):
467 (export.default.Builder.prototype._getFunctionFromIndexSpace):
468 * wasm/js-api/test_Instance.js: add a FIXME test
469 * wasm/spec-tests/memory.wast.js:
471 * wasm/spec-tests/names.wast.js:
473 2017-02-26 Caio Lima <ticaiolima@gmail.com>
475 op_get_by_id_with_this should use inline caching
476 https://bugs.webkit.org/show_bug.cgi?id=162124
478 Reviewed by Saam Barati.
480 * microbenchmarks/super-getter.js: Added.
485 * stress/super-force-ic-fail.js: Added.
491 * stress/super-get-by-id.js: Added.
494 (Base.prototype.get name):
495 (Base.prototype.set name):
496 (Subclass.prototype.get name):
500 (PolymorphicSubclass.prototype.get value):
501 (PolymorphicSubclass):
504 (MegamorphicSubclass.prototype.get value):
505 (MegamorphicSubclass):
506 (let.subObj.get value):
510 (BaseException.prototype.get name):
511 (SubclassException.prototype.get name):
514 (prototype.get name):
515 (SubclassExceptionComplex.prototype.get name):
516 (SubclassExceptionComplex):
517 * stress/super-getter-reset-ic.js: Added.
521 2017-02-24 JF Bastien <jfbastien@apple.com>
523 WebAssembly: miscellaneous spec fixes
524 https://bugs.webkit.org/show_bug.cgi?id=168822
526 Reviewed by Saam Barati.
528 * wasm.yaml: mark some skip tests as normal, now that they pass
529 * wasm/Builder.js: error message was wrong, causing extra error if hit
530 * wasm/js-api/global-error.js: new tests
532 * wasm/spec-tests/call.wast.js: comment out stack check tests
533 * wasm/spec-tests/call_indirect.wast.js: comment out stack check tests
534 * wasm/spec-tests/fac.wast.js: comment out stack check tests
535 * wasm/spec-tests/float_exprs.wast.js: wabt is wrong, bug reported, we should update
536 * wasm/spec-tests/imports.wast.js: bug in old wabt, fixed in recent wabt
539 2017-02-23 Saam Barati <sbarati@apple.com>
541 Intrinsicify parseInt
542 https://bugs.webkit.org/show_bug.cgi?id=168627
544 Reviewed by Filip Pizlo.
546 * stress/parse-int-intrinsic.js: Added.
548 (testIntrinsic.let.s):
550 (testIntrinsic2.baz):
552 (testIntrinsic3.foo):
554 (testIntrinsic4.foo):
556 (testIntrinsic5.foo):
558 (testIntrinsic6.foo):
560 (testIntrinsic7.foo):
563 2017-02-23 JF Bastien <jfbastien@apple.com>
565 WebAssembly: support 0x1 version
566 https://bugs.webkit.org/show_bug.cgi?id=168672
568 Reviewed by Keith Miller.
570 Update the version number for all the tests. Note that the spec
571 tests are only updated with a new version number because spec+wabt
572 aren't ready for 0x1 yet. This is tracked by bug #168784.
574 * wasm/import-spec-tests.rb: use the new spec repository layout
575 * wasm/js-api/test_basic_api.js:
576 * wasm/self-test/test_BuilderWebAssembly.js:
579 * wasm/spec-tests/address.wast.js:
580 * wasm/spec-tests/binary.wast.js:
581 * wasm/spec-tests/block.wast.js:
582 * wasm/spec-tests/br.wast.js:
583 * wasm/spec-tests/br_if.wast.js:
584 * wasm/spec-tests/br_table.wast.js:
585 * wasm/spec-tests/break-drop.wast.js:
586 * wasm/spec-tests/call.wast.js:
587 * wasm/spec-tests/call_indirect.wast.js:
588 * wasm/spec-tests/comments.wast.js:
589 * wasm/spec-tests/conversions.wast.js:
590 * wasm/spec-tests/custom_section.wast.js:
591 * wasm/spec-tests/endianness.wast.js:
592 * wasm/spec-tests/exports.wast.js:
593 * wasm/spec-tests/f32.wast.js:
594 * wasm/spec-tests/f32_cmp.wast.js:
595 * wasm/spec-tests/f64.wast.js:
596 * wasm/spec-tests/f64_cmp.wast.js:
597 * wasm/spec-tests/fac.wast.js:
598 * wasm/spec-tests/float_exprs.wast.js:
599 * wasm/spec-tests/float_literals.wast.js:
600 * wasm/spec-tests/float_memory.wast.js:
601 * wasm/spec-tests/float_misc.wast.js:
602 * wasm/spec-tests/forward.wast.js:
603 * wasm/spec-tests/func.wast.js:
604 * wasm/spec-tests/func_ptrs.wast.js:
605 * wasm/spec-tests/get_local.wast.js:
606 * wasm/spec-tests/globals.wast.js:
607 * wasm/spec-tests/i32.wast.js:
608 * wasm/spec-tests/i64.wast.js:
609 * wasm/spec-tests/imports.wast.js:
610 * wasm/spec-tests/int_exprs.wast.js:
611 * wasm/spec-tests/int_literals.wast.js:
612 * wasm/spec-tests/left-to-right.wast.js:
613 * wasm/spec-tests/linking.wast.js:
614 * wasm/spec-tests/loop.wast.js:
615 * wasm/spec-tests/memory.wast.js:
616 * wasm/spec-tests/memory_redundancy.wast.js:
617 * wasm/spec-tests/memory_trap.wast.js:
618 * wasm/spec-tests/names.wast.js:
619 * wasm/spec-tests/nop.wast.js:
620 * wasm/spec-tests/resizing.wast.js:
621 * wasm/spec-tests/return.wast.js:
622 * wasm/spec-tests/select.wast.js:
623 * wasm/spec-tests/set_local.wast.js:
624 * wasm/spec-tests/skip-stack-guard-page.wast.js:
625 * wasm/spec-tests/stack.wast.js:
626 * wasm/spec-tests/start.wast.js:
627 * wasm/spec-tests/store_retval.wast.js:
628 * wasm/spec-tests/switch.wast.js:
629 * wasm/spec-tests/tee_local.wast.js:
630 * wasm/spec-tests/traps.wast.js:
631 * wasm/spec-tests/typecheck.wast.js:
632 * wasm/spec-tests/unreachable.wast.js:
633 * wasm/spec-tests/unwind.wast.js:
636 2017-02-22 Yusuke Suzuki <utatane.tea@gmail.com>
638 JSModuleNamespace object should have IC
639 https://bugs.webkit.org/show_bug.cgi?id=160590
641 Reviewed by Saam Barati.
643 * modules/module-assert-access-binding.js: Added.
644 * modules/module-assert-access-namespace.js: Added.
645 * modules/namespace-empty.js: Added.
646 (from.string_appeared_here.access):
648 * stress/module-namespace-access-change.js: Added.
651 (import.string_appeared_here.then):
652 * stress/module-namespace-access-non-constant.js: Added.
654 (import.string_appeared_here.then):
655 * stress/module-namespace-access-poly.js: Added.
658 (import.string_appeared_here.then):
659 * stress/module-namespace-access-transitive-exports.js: Added.
661 (import.string_appeared_here.then):
662 * stress/module-namespace-access.js: Added.
664 (import.string_appeared_here.then):
665 * stress/resources/module-namespace-access-transitive-exports-2.js: Added.
668 * stress/resources/module-namespace-access-transitive-exports.js: Added.
669 * stress/resources/module-namespace-access.js: Added.
673 2017-02-20 Filip Pizlo <fpizlo@apple.com>
675 The collector thread should only start when the mutator doesn't have heap access
676 https://bugs.webkit.org/show_bug.cgi?id=167737
678 Reviewed by Keith Miller.
680 Add versions of splay that flash heap access, to simulate what might happen if a third-party app
681 was running concurrent GC. In this case, we might actually start the collector thread.
683 * stress/splay-flash-access-1ms.js: Added.
685 (this.Setup.setup.setup):
686 (this.TearDown.tearDown.tearDown):
689 (BenchmarkResult.prototype.valueOf):
693 (BenchmarkSuite.ResetRNG):
695 (BenchmarkSuite.RunSuites):
696 (BenchmarkSuite.CountBenchmarks):
697 (BenchmarkSuite.GeometricMean):
698 (BenchmarkSuite.GeometricMeanTime):
699 (BenchmarkSuite.AverageAbovePercentile):
700 (BenchmarkSuite.GeometricMeanLatency):
701 (BenchmarkSuite.FormatScore):
702 (BenchmarkSuite.prototype.NotifyStep):
703 (BenchmarkSuite.prototype.NotifyResult):
704 (BenchmarkSuite.prototype.NotifyError):
705 (BenchmarkSuite.prototype.RunSingleBenchmark):
709 (BenchmarkSuite.prototype.RunStep):
710 (GeneratePayloadTree):
718 (SplayTree.prototype.isEmpty):
719 (SplayTree.prototype.insert):
720 (SplayTree.prototype.remove):
721 (SplayTree.prototype.find):
722 (SplayTree.prototype.findMax):
723 (SplayTree.prototype.findGreatestLessThan):
724 (SplayTree.prototype.exportKeys):
725 (SplayTree.prototype.splay_):
727 (SplayTree.Node.prototype.traverse_):
731 (averageAbovePercentile):
733 * stress/splay-flash-access.js: Added.
735 (this.Setup.setup.setup):
736 (this.TearDown.tearDown.tearDown):
739 (BenchmarkResult.prototype.valueOf):
743 (BenchmarkSuite.ResetRNG):
745 (BenchmarkSuite.RunSuites):
746 (BenchmarkSuite.CountBenchmarks):
747 (BenchmarkSuite.GeometricMean):
748 (BenchmarkSuite.GeometricMeanTime):
749 (BenchmarkSuite.AverageAbovePercentile):
750 (BenchmarkSuite.GeometricMeanLatency):
751 (BenchmarkSuite.FormatScore):
752 (BenchmarkSuite.prototype.NotifyStep):
753 (BenchmarkSuite.prototype.NotifyResult):
754 (BenchmarkSuite.prototype.NotifyError):
755 (BenchmarkSuite.prototype.RunSingleBenchmark):
759 (BenchmarkSuite.prototype.RunStep):
760 (GeneratePayloadTree):
768 (SplayTree.prototype.isEmpty):
769 (SplayTree.prototype.insert):
770 (SplayTree.prototype.remove):
771 (SplayTree.prototype.find):
772 (SplayTree.prototype.findMax):
773 (SplayTree.prototype.findGreatestLessThan):
774 (SplayTree.prototype.exportKeys):
775 (SplayTree.prototype.splay_):
777 (SplayTree.Node.prototype.traverse_):
781 (averageAbovePercentile):
784 2017-02-21 Ryan Haddad <ryanhaddad@apple.com>
786 Unreviewed, rolling out r212712.
788 This change broke the CLoop build.
792 "JSModuleNamespace object should have IC"
793 https://bugs.webkit.org/show_bug.cgi?id=160590
794 http://trac.webkit.org/changeset/212712
796 2017-02-21 Yusuke Suzuki <utatane.tea@gmail.com>
798 JSModuleNamespace object should have IC
799 https://bugs.webkit.org/show_bug.cgi?id=160590
801 Reviewed by Saam Barati.
803 * modules/module-assert-access-binding.js: Added.
804 * modules/module-assert-access-namespace.js: Added.
805 * modules/namespace-empty.js: Added.
806 (from.string_appeared_here.access):
808 * stress/module-namespace-access-change.js: Added.
811 (import.string_appeared_here.then):
812 * stress/module-namespace-access-non-constant.js: Added.
814 (import.string_appeared_here.then):
815 * stress/module-namespace-access-poly.js: Added.
818 (import.string_appeared_here.then):
819 * stress/module-namespace-access-transitive-exports.js: Added.
821 (import.string_appeared_here.then):
822 * stress/module-namespace-access.js: Added.
824 (import.string_appeared_here.then):
825 * stress/resources/module-namespace-access-transitive-exports-2.js: Added.
828 * stress/resources/module-namespace-access-transitive-exports.js: Added.
829 * stress/resources/module-namespace-access.js: Added.
833 2017-02-21 Yusuke Suzuki <utatane.tea@gmail.com>
835 ASSERTION FAILED: "!scope.exception()" with Object.isSealed/isFrozen and uninitialized module bindings
836 https://bugs.webkit.org/show_bug.cgi?id=168605
838 Reviewed by Saam Barati.
840 * modules/module-namespace-is-frozen.js: Added.
841 (from.string_appeared_here.shouldThrow):
843 * modules/module-namespace-is-sealed.js: Added.
844 (from.string_appeared_here.shouldThrow):
847 2017-02-19 Commit Queue <commit-queue@webkit.org>
849 Unreviewed, rolling out r212466.
850 https://bugs.webkit.org/show_bug.cgi?id=168577
852 causes crashes on AArch64 on linux, maybe it's causing crashes
853 on iOS too (Requested by pizlo on #webkit).
857 "The collector thread should only start when the mutator
858 doesn't have heap access"
859 https://bugs.webkit.org/show_bug.cgi?id=167737
860 http://trac.webkit.org/changeset/212466
862 2017-02-10 Filip Pizlo <fpizlo@apple.com>
864 The collector thread should only start when the mutator doesn't have heap access
865 https://bugs.webkit.org/show_bug.cgi?id=167737
867 Reviewed by Keith Miller.
869 Add versions of splay that flash heap access, to simulate what might happen if a third-party app
870 was running concurrent GC. In this case, we might actually start the collector thread.
872 * stress/splay-flash-access-1ms.js: Added.
874 (this.Setup.setup.setup):
875 (this.TearDown.tearDown.tearDown):
878 (BenchmarkResult.prototype.valueOf):
882 (BenchmarkSuite.ResetRNG):
884 (BenchmarkSuite.RunSuites):
885 (BenchmarkSuite.CountBenchmarks):
886 (BenchmarkSuite.GeometricMean):
887 (BenchmarkSuite.GeometricMeanTime):
888 (BenchmarkSuite.AverageAbovePercentile):
889 (BenchmarkSuite.GeometricMeanLatency):
890 (BenchmarkSuite.FormatScore):
891 (BenchmarkSuite.prototype.NotifyStep):
892 (BenchmarkSuite.prototype.NotifyResult):
893 (BenchmarkSuite.prototype.NotifyError):
894 (BenchmarkSuite.prototype.RunSingleBenchmark):
898 (BenchmarkSuite.prototype.RunStep):
899 (GeneratePayloadTree):
907 (SplayTree.prototype.isEmpty):
908 (SplayTree.prototype.insert):
909 (SplayTree.prototype.remove):
910 (SplayTree.prototype.find):
911 (SplayTree.prototype.findMax):
912 (SplayTree.prototype.findGreatestLessThan):
913 (SplayTree.prototype.exportKeys):
914 (SplayTree.prototype.splay_):
916 (SplayTree.Node.prototype.traverse_):
920 (averageAbovePercentile):
922 * stress/splay-flash-access.js: Added.
924 (this.Setup.setup.setup):
925 (this.TearDown.tearDown.tearDown):
928 (BenchmarkResult.prototype.valueOf):
932 (BenchmarkSuite.ResetRNG):
934 (BenchmarkSuite.RunSuites):
935 (BenchmarkSuite.CountBenchmarks):
936 (BenchmarkSuite.GeometricMean):
937 (BenchmarkSuite.GeometricMeanTime):
938 (BenchmarkSuite.AverageAbovePercentile):
939 (BenchmarkSuite.GeometricMeanLatency):
940 (BenchmarkSuite.FormatScore):
941 (BenchmarkSuite.prototype.NotifyStep):
942 (BenchmarkSuite.prototype.NotifyResult):
943 (BenchmarkSuite.prototype.NotifyError):
944 (BenchmarkSuite.prototype.RunSingleBenchmark):
948 (BenchmarkSuite.prototype.RunStep):
949 (GeneratePayloadTree):
957 (SplayTree.prototype.isEmpty):
958 (SplayTree.prototype.insert):
959 (SplayTree.prototype.remove):
960 (SplayTree.prototype.find):
961 (SplayTree.prototype.findMax):
962 (SplayTree.prototype.findGreatestLessThan):
963 (SplayTree.prototype.exportKeys):
964 (SplayTree.prototype.splay_):
966 (SplayTree.Node.prototype.traverse_):
970 (averageAbovePercentile):
973 2017-02-16 Yusuke Suzuki <utatane.tea@gmail.com>
975 [JSC] Update module namespace object according to the latest ECMA262
976 https://bugs.webkit.org/show_bug.cgi?id=168280
978 Reviewed by Saam Barati.
980 * modules/namespace-object-symbol-iterator-name.js:
981 * modules/namespace-object-typed-array-fast-path.js:
982 * modules/namespace.js:
983 (shouldBe.JSON.stringify.Reflect.getOwnPropertyDescriptor):
986 2017-02-11 Yusuke Suzuki <utatane.tea@gmail.com>
988 [JSC] Implement (Shared)ArrayBuffer.prototype.byteLength
989 https://bugs.webkit.org/show_bug.cgi?id=166476
991 Reviewed by Saam Barati.
993 * ChakraCore/test/typedarray/arraybufferType.baseline-jsc:
994 * stress/array-buffer-byte-length.js: Added.
998 * stress/reflect-set.js:
1000 2017-02-10 Saam Barati <sbarati@apple.com>
1002 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
1003 https://bugs.webkit.org/show_bug.cgi?id=168140
1004 <rdar://problem/30205880>
1006 Reviewed by Filip Pizlo.
1008 * stress/allocation-sinking-puthint-control-flow.js: Added.
1017 2017-02-09 Mark Lam <mark.lam@apple.com>
1019 B3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
1020 https://bugs.webkit.org/show_bug.cgi?id=167437
1021 <rdar://problem/30198083>
1023 Reviewed by Filip Pizlo.
1025 * stress/b3-delete-orphans-should-neutralize-upsilons-with-dead-phis.js: Added.
1027 2017-02-09 Saam Barati <sbarati@apple.com>
1029 Sloppy mode: We don't properly hoist functions names "arguments" when we have a non-simple parameter list
1030 https://bugs.webkit.org/show_bug.cgi?id=167319
1031 <rdar://problem/30149432>
1033 Reviewed by Mark Lam.
1035 * stress/sloppy-mode-hoist-arguments-function-non-simple-parameter-list.js: Added.
1043 2017-02-09 Mark Lam <mark.lam@apple.com>
1045 Fix max length check in ArrayPrototype.js' concatSlowPath().
1046 https://bugs.webkit.org/show_bug.cgi?id=167270
1047 <rdar://problem/30128133>
1049 Reviewed by Filip Pizlo.
1051 * stress/array-prototype-concat-of-long-spliced-arrays.js: Added.
1052 * stress/array-prototype-concat-of-long-spliced-arrays2.js: Added.
1054 2017-02-09 Keith Miller <keith_miller@apple.com>
1056 We should not allow Function.caller to be used on native functions
1057 https://bugs.webkit.org/show_bug.cgi?id=165628
1059 Reviewed by Mark Lam.
1061 * stress/caller-native-code.js: Added.
1064 2017-02-04 Yusuke Suzuki <utatane.tea@gmail.com>
1066 [JSC] Add operationToInt32SensibleSlow to optimize kraken pbkdf2 and sha256
1067 https://bugs.webkit.org/show_bug.cgi?id=167736
1069 Reviewed by Saam Barati.
1071 * stress/to-int32-sensible.js: Added.
1076 2017-02-01 Yusuke Suzuki <utatane.tea@gmail.com>
1078 Unreviewed, remove loop
1079 https://bugs.webkit.org/show_bug.cgi?id=167694
1082 Original bug can be tested even without this loop.
1084 * stress/arity-fixup-should-not-touch-stack-area-below-sp.js:
1086 2017-02-01 Yusuke Suzuki <utatane.tea@gmail.com>
1088 ArityFixup should adjust SP first
1089 https://bugs.webkit.org/show_bug.cgi?id=167239
1091 Reviewed by Michael Saboff.
1093 Significantly large arity fixup reliably causes this crash.
1095 * stress/arity-fixup-should-not-touch-stack-area-below-sp.js: Added.
1097 2017-01-31 Filip Pizlo <fpizlo@apple.com>
1099 Move slow-running microbenchmarks out of JSTests/microbenchmarks
1100 https://bugs.webkit.org/show_bug.cgi?id=167676
1102 Reviewed by Saam Barati.
1104 The microbenchmarks directory is profitable when it's cheap to run. This change moves very slow
1105 tests (>=200ms running time on my machine) and puts them in JSTests/slowMicrobenchmarks instead.
1106 That directory is run only through `slow!; defaultQuickRun` and is not run by run-jsc-benchmarks.
1107 This is a big progression in test running time. But because it frontloads more slow tests, the
1108 tests will seem to run more slowly when you first start the test runner.
1110 * microbenchmarks/default-derived-constructor.js: Removed.
1111 * microbenchmarks/dense-set.js: Removed.
1112 * microbenchmarks/ftl-polymorphic-div.js: Removed.
1113 * microbenchmarks/ftl-polymorphic-mul.js: Removed.
1114 * microbenchmarks/function-bind-inlining.js: Removed.
1115 * microbenchmarks/function-bind-no-inlining.js: Removed.
1116 * microbenchmarks/large-map-iteration-with-additions.js: Removed.
1117 * microbenchmarks/large-map-iteration-with-mutation.js: Removed.
1118 * microbenchmarks/map-get-get-cse.js: Removed.
1119 * microbenchmarks/misc-bugs-847389-jpeg2000.js: Removed.
1120 * microbenchmarks/spread-small-array.js: Removed.
1121 * microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Removed.
1122 * slowMicrobenchmarks: Added.
1123 * slowMicrobenchmarks.yaml: Added.
1124 * slowMicrobenchmarks/README: Added.
1125 * slowMicrobenchmarks/default-derived-constructor.js: Copied from JSTests/microbenchmarks/default-derived-constructor.js.
1126 * slowMicrobenchmarks/dense-set.js: Copied from JSTests/microbenchmarks/dense-set.js.
1127 * slowMicrobenchmarks/ftl-polymorphic-div.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-div.js.
1128 * slowMicrobenchmarks/ftl-polymorphic-mul.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-mul.js.
1129 * slowMicrobenchmarks/function-bind-inlining.js: Copied from JSTests/microbenchmarks/function-bind-inlining.js.
1130 * slowMicrobenchmarks/function-bind-no-inlining.js: Copied from JSTests/microbenchmarks/function-bind-no-inlining.js.
1131 * slowMicrobenchmarks/large-map-iteration-with-additions.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-additions.js.
1132 * slowMicrobenchmarks/large-map-iteration-with-mutation.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-mutation.js.
1133 * slowMicrobenchmarks/map-get-get-cse.js: Copied from JSTests/microbenchmarks/map-get-get-cse.js.
1134 * slowMicrobenchmarks/misc-bugs-847389-jpeg2000.js: Copied from JSTests/microbenchmarks/misc-bugs-847389-jpeg2000.js.
1135 * slowMicrobenchmarks/spread-small-array.js: Copied from JSTests/microbenchmarks/spread-small-array.js.
1136 * slowMicrobenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Copied from JSTests/microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js.
1138 2017-01-30 Yusuke Suzuki <utatane.tea@gmail.com>
1140 [JSC] Do not reject WebAssembly.compile() with Exception
1141 https://bugs.webkit.org/show_bug.cgi?id=167585
1143 Reviewed by Mark Lam.
1145 * wasm/js-api/Module-compile.js:
1146 (async.testPromiseAPI):
1148 2017-01-27 Yusuke Suzuki <utatane.tea@gmail.com>
1150 Lift template escape sequence restrictions in tagged templates
1151 https://bugs.webkit.org/show_bug.cgi?id=166871
1153 Reviewed by Saam Barati.
1155 Update the error messages and add new tests.
1157 * ChakraCore/test/es6/unicode_6_identifier_Blue524737.baseline-jsc:
1158 * stress/lift-template-literal.js: Added.
1160 (testTag.return.tag):
1162 * stress/template-literal-syntax.js:
1164 2017-01-26 Mark Lam <mark.lam@apple.com>
1166 Fix missing exception check in genericTypedArrayViewProtoFuncSet().
1167 https://bugs.webkit.org/show_bug.cgi?id=166812
1168 <rdar://problem/29916672>
1170 Reviewed by Saam Barati.
1172 * stress/regress-166812.js: Added.
1174 2017-01-26 Commit Queue <commit-queue@webkit.org>
1176 Unreviewed, rolling out r211224.
1177 https://bugs.webkit.org/show_bug.cgi?id=167479
1179 "It was a Kraken performance regression" (Requested by
1180 saamyjoon on #webkit).
1184 "OSR entry: delay outer-loop compilation when at inner-loop"
1185 https://bugs.webkit.org/show_bug.cgi?id=167149
1186 http://trac.webkit.org/changeset/211224
1188 2017-01-26 JF Bastien <jfbastien@apple.com>
1190 OSR entry: delay outer-loop compilation when at inner-loop
1191 https://bugs.webkit.org/show_bug.cgi?id=167149
1193 Reviewed by Filip Pizlo.
1195 Try to be mean to OSR entry by using nested loops, and having
1196 non-int32 types or truly varying types.
1198 Mandelbrot currently never tiers up to FTL because it exits too
1199 many times before this. That shouldn't happen because it's just
1200 numbers and int32s. I'll file a bug to fix this.
1202 * microbenchmarks/mandelbrot.js: Added.
1205 * microbenchmarks/nonude.js: Added.
1206 (Array.prototype.remove):
1212 2017-01-25 Saam Barati <sbarati@apple.com>
1214 WebAssembly JS API: coerce return values from imports
1215 https://bugs.webkit.org/show_bug.cgi?id=165480
1216 <rdar://problem/29760318>
1218 Reviewed by Yusuke Suzuki.
1220 * wasm/function-tests/function-import-return-value.js: Added.
1221 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.x.assert.eq):
1222 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.Math.fround):
1223 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.let.type.of.Reflect.ownKeys):
1228 2017-01-25 Filip Pizlo <fpizlo@apple.com>
1230 jsc.cpp should have the $.agent stuff for testing SAB
1231 https://bugs.webkit.org/show_bug.cgi?id=167431
1233 Reviewed by Saam Barati.
1235 Add a very basic test of Atomics using $.agent. This is based on
1236 LayoutTests/workers/sab/simple.html.
1238 * stress/lars-sab-workers.js: Added.
1244 2017-01-24 Filip Pizlo <fpizlo@apple.com>
1246 Atomics.store should return the int-converted value according to toInteger
1247 https://bugs.webkit.org/show_bug.cgi?id=167399
1249 Reviewed by Saam Barati.
1251 * stress/atomics-add-uint32.js: Added.
1252 * stress/atomics-store-return.js: Fix the test to match what the spec wants.
1254 2017-01-24 Yusuke Suzuki <utatane.tea@gmail.com>
1256 [JSC] Optimize Number#toString with Int52
1257 https://bugs.webkit.org/show_bug.cgi?id=167303
1259 Reviewed by Sam Weinig.
1261 * stress/to-string-with-int52.js: Added.
1264 2017-01-24 Filip Pizlo <fpizlo@apple.com>
1266 Atomics.store should return the int-converted value, not the value that it stored
1267 https://bugs.webkit.org/show_bug.cgi?id=167395
1269 Reviewed by Saam Barati.
1271 * stress/atomics-store-return.js: Added.
1273 2017-01-24 Filip Pizlo <fpizlo@apple.com>
1275 -0 is a valid array index and AtomicsObject should know this
1276 https://bugs.webkit.org/show_bug.cgi?id=167386
1278 Reviewed by Mark Lam.
1280 * stress/atomics-neg-zero.js: Added.
1282 2017-01-23 Saam Barati <sbarati@apple.com>
1284 https://bugs.webkit.org/show_bug.cgi?id=167247
1285 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
1286 <rdar://problem/30121809>
1288 Reviewed by Filip Pizlo.
1290 * stress/spread-consults-correct-global-object.js: Added.
1293 * stress/spread-correct-global-object-on-exception.js: Added.
1296 (const.objectText.let.o.Symbol.iterator):
1299 2017-01-21 Yusuke Suzuki <utatane.tea@gmail.com>
1301 dynamic import is ambiguous with import declaration at module code
1302 https://bugs.webkit.org/show_bug.cgi?id=167098
1304 Reviewed by Darin Adler.
1306 * modules/import-call.js: Added.
1307 (from.string_appeared_here.import.string_appeared_here.then):
1308 * modules/import-call/main.js: Added.
1309 * stress/import-syntax.js:
1312 2017-01-19 Skachkov Oleksandr <gskachkov@gmail.com>
1314 "this" missing after await in async arrow function
1315 https://bugs.webkit.org/show_bug.cgi?id=166919
1317 Reviewed by Saam Barati.
1319 * stress/async-arrow-functions-lexical-binding-in-class.js:
1320 (ChildClass.prototype.asyncThisPropWithAwaitBody):
1321 (ChildClass.prototype.asyncThisPropInEvalWithAwaitBody):
1322 (ChildClass.prototype.asyncThisValueBodyWithAwait):
1323 (ChildClass.prototype.asyncThisValueInEvalWithAwaitBody):
1326 (ChildClass3.prototype.classValue):
1327 (ChildClass3.prototype.get classProperty):
1328 * stress/async-arrow-functions-lexical-new.target-binding.js:
1331 2017-01-16 Filip Pizlo <fpizlo@apple.com>
1333 Make opaque root scanning truly constraint-based
1334 https://bugs.webkit.org/show_bug.cgi?id=165760
1336 Reviewed by Geoffrey Garen.
1338 Added this test, which demonstrates the benefit of having a dedicated string subspace.
1340 * microbenchmarks/stringalloc.js: Added.
1342 2017-01-17 Michael Saboff <msaboff@apple.com>
1344 Nested parenthesized regular expressions with non-zero minimum counts appear to hang and use lots of memory
1345 https://bugs.webkit.org/show_bug.cgi?id=167125
1347 Reviewed by Filip Pizlo.
1349 * microbenchmarks/regexp-nested-nonzero-min-counted-parens.js: Added.
1350 New test with limits that run slow and take a reasonable amount of memory
1351 before the change and run fast, using little memory with the change.
1353 2017-01-14 Yusuke Suzuki <utatane.tea@gmail.com>
1355 Annotate large string tests with largeHeap
1356 https://bugs.webkit.org/show_bug.cgi?id=167054
1358 Reviewed by Filip Pizlo.
1360 * microbenchmarks/dense-set.js:
1361 * microbenchmarks/lots-of-fields.js:
1362 * stress/joined-strings-should-not-exceed-max-string-length.js:
1363 * stress/make-large-string-jit-strcat.js:
1364 * stress/make-large-string-jit.js:
1365 * stress/make-large-string-strcat.js:
1366 * stress/make-large-string.js:
1367 * stress/string-joining-long-strings-should-not-crash.js:
1368 * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
1370 2017-01-14 Yusuke Suzuki <utatane.tea@gmail.com>
1372 Reserve capacity for StringBuilder in unescape
1373 https://bugs.webkit.org/show_bug.cgi?id=167008
1375 Reviewed by Sam Weinig.
1377 * stress/unescape.js: Added.
1380 2017-01-12 Saam Barati <sbarati@apple.com>
1382 Add a slice intrinsic to the DFG/FTL
1383 https://bugs.webkit.org/show_bug.cgi?id=166707
1384 <rdar://problem/29913445>
1386 Reviewed by Filip Pizlo.
1388 * stress/array-slice-intrinsic.js: Added.
1393 * stress/array-slice-jettison-on-constructor-change.js: Added.
1397 (addRandomProperties):
1399 * stress/array-slice-osr-exit-2.js: Added.
1405 (addRandomProperties):
1407 * stress/array-slice-osr-exit.js: Added.
1413 (addRandomProperties):
1416 2017-01-11 Ryan Haddad <ryanhaddad@apple.com>
1418 Mark es6/typed_arrays_correct_prototype_chains.js as failing after r210570.
1419 https://bugs.webkit.org/show_bug.cgi?id=166931i
1421 Unreviewed test gardening.
1425 2017-01-10 Commit Queue <commit-queue@webkit.org>
1427 Unreviewed, rolling out r210052.
1428 https://bugs.webkit.org/show_bug.cgi?id=166915
1430 "breaks web compatability" (Requested by keith_miller on
1435 "Add support for global"
1436 https://bugs.webkit.org/show_bug.cgi?id=165171
1437 http://trac.webkit.org/changeset/210052
1439 2017-01-10 Mark Lam <mark.lam@apple.com>
1441 Property setters should not be called for bound arguments list entries.
1442 https://bugs.webkit.org/show_bug.cgi?id=165631
1444 Reviewed by Filip Pizlo.
1446 * stress/property-setters-should-not-be-called-for-bound-arguments-list-entries.js: Added.
1448 2017-01-10 Skachkov Oleksandr <gskachkov@gmail.com>
1450 Calling async arrow function which is in a class's member function will cause error
1451 https://bugs.webkit.org/show_bug.cgi?id=166879
1453 Reviewed by Saam Barati.
1455 * stress/async-arrow-functions-lexical-binding-in-class.js: Added.
1458 (BaseClass.prototype.baseClassValue):
1459 (BaseClass.prototype.get property):
1462 (ChildClass.prototype.classValue):
1463 (ChildClass.prototype.get classProperty):
1464 (ChildClass.prototype.asyncValueExp):
1465 (ChildClass.prototype.asyncValueBody):
1466 (ChildClass.prototype.asyncThisPropExp):
1467 (ChildClass.prototype.asyncThisPropBody):
1468 (ChildClass.prototype.asyncThisPropInEvalExp):
1469 (ChildClass.prototype.asyncThisPropInEvalBody):
1470 (ChildClass.prototype.asyncThisValueExp):
1471 (ChildClass.prototype.asyncThisValueBody):
1472 (ChildClass.prototype.asyncThisValueInEvalExp):
1473 (ChildClass.prototype.asyncThisValueInEvalBody):
1476 (ChildClass2.prototype.classValue):
1477 (ChildClass2.prototype.get classProperty):
1478 * stress/async-arrow-functions-lexical-super-binding.js:
1480 2017-01-09 Yusuke Suzuki <utatane.tea@gmail.com>
1482 [JSC] Prototype dynamic-import
1483 https://bugs.webkit.org/show_bug.cgi?id=165724
1485 Reviewed by Saam Barati.
1487 * stress/import-basic.js: Added.
1491 * stress/import-from-eval.js: Added.
1494 * stress/import-syntax.js: Added.
1496 * stress/import-tests/cocoa.js: Added.
1499 * stress/import-tests/multiple.js: Added.
1501 * stress/import-tests/multiple2.js: Added.
1503 * stress/import-tests/should.js: Added.
1505 (export.shouldThrow):
1506 * stress/modules-syntax-error.js:
1508 2017-01-09 Commit Queue <commit-queue@webkit.org>
1510 Unreviewed, rolling out r210476.
1511 https://bugs.webkit.org/show_bug.cgi?id=166859
1513 "4% JSBench regression" (Requested by keith_mi_ on #webkit).
1517 "Add a slice intrinsic to the DFG/FTL"
1518 https://bugs.webkit.org/show_bug.cgi?id=166707
1519 http://trac.webkit.org/changeset/210476
1521 2017-01-06 Saam Barati <sbarati@apple.com>
1523 Add a slice intrinsic to the DFG/FTL
1524 https://bugs.webkit.org/show_bug.cgi?id=166707
1526 Reviewed by Filip Pizlo.
1528 * stress/array-slice-intrinsic.js: Added.
1533 * stress/array-slice-jettison-on-constructor-change.js: Added.
1537 (addRandomProperties):
1539 * stress/array-slice-osr-exit-2.js: Added.
1545 (addRandomProperties):
1547 * stress/array-slice-osr-exit.js: Added.
1553 (addRandomProperties):
1556 2017-01-06 Michael Saboff <msaboff@apple.com>
1558 @putByValDirect in Array.of and Array.from overwrites non-writable/configurable properties
1559 https://bugs.webkit.org/show_bug.cgi?id=153486
1561 Reviewed by Saam Barati.
1563 New regression test.
1565 * stress/regress-153486.js: Added.
1567 (makeUnwriteableUnconfigurableObject):
1572 2016-12-30 Filip Pizlo <fpizlo@apple.com>
1574 DeferGC::~DeferGC should be super cheap
1575 https://bugs.webkit.org/show_bug.cgi?id=166626
1577 Reviewed by Saam Barati.
1579 * stress/slow-path-generator-updating-current-node-dfg.js:
1580 * stress/unshift-array-storage.js:
1582 2017-01-04 JF Bastien <jfbastien@apple.com>
1584 WebAssembly: sections with the same name are allowed
1585 https://bugs.webkit.org/show_bug.cgi?id=166708
1587 Reviewed by Saam Barati.
1589 * wasm/self-test/test_BuilderJSON.js:
1590 (SectionsWithSameCustomName):
1592 2017-01-04 Saam Barati <sbarati@apple.com>
1594 stress/spread-calling.js timing out on the bots
1595 https://bugs.webkit.org/show_bug.cgi?id=166689
1596 <rdar://problem/29779182>
1598 Reviewed by Mark Lam.
1600 * stress/spread-calling.js:
1602 2017-01-04 JF Bastien <jfbastien@apple.com>
1604 WebAssembly JS API: add Module.sections
1605 https://bugs.webkit.org/show_bug.cgi?id=165159
1606 <rdar://problem/29760326>
1608 Reviewed by Mark Lam.
1610 As described here: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymodulecustomsections
1612 * wasm/Builder.js: allow custom sections to be duplicated
1613 * wasm/js-api/Module.customSection.js: Added.
1614 (assert.throws.WebAssembly.Module.prototype.customSections):
1617 2017-01-04 Saam Barati <sbarati@apple.com>
1619 We don't properly handle exceptions inside the nativeCallTrampoline macro in the LLInt
1620 https://bugs.webkit.org/show_bug.cgi?id=163720
1622 Reviewed by Mark Lam.
1624 * stress/bound-function-tail-call-with-exception.js: Added.
1629 2017-01-03 JF Bastien <jfbastien@apple.com>
1631 WebAssembly JS API: check and test in-call / out-call values
1632 https://bugs.webkit.org/show_bug.cgi?id=164876
1633 <rdar://problem/29844107>
1635 Reviewed by Saam Barati.
1638 * wasm/assert.js: add an assert for NaN comparison
1639 * wasm/fuzz/export-function.js: Added. Generate random wasm export
1640 signatures, and call them with random parameters.
1641 (const.paramExporter):
1643 (const.types.generate):
1645 * wasm/js-api/export-arity.js: Added.
1646 (const.paramExporter): Test that mismatched arities when JS calls
1647 wasm follow the defined semantics: i32 is 0, f32 / f64 are NaN.
1648 https://github.com/WebAssembly/design/blob/master/JS.md#exported-function-exotic-objects
1649 * wasm/js-api/export-void-is-undef.js: Added. Test that "void"
1650 wasm functions return "undefined" in JS.
1652 2017-01-02 JF Bastien <jfbastien@apple.com>
1654 WebAssembly: handle and optimize wasm export → wasm import calls
1655 https://bugs.webkit.org/show_bug.cgi?id=165282
1657 Reviewed by Saam Barati.
1659 * wasm/Builder.js: Add a Proxy to Builder.js, which intercepts
1660 unknown property lookups. This creates way better error messages
1661 on typos than 'undefined is not a function', which happens
1662 semi-frequently as I typo opcode names (and which one is a typo is
1663 hard to find because we chain builders).
1664 (const._isValidValue):
1666 (const._importFunctionContinuation):
1667 (const._importMemoryContinuation):
1668 (const._importTableContinuation):
1669 (const._exportFunctionContinuation):
1670 (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
1671 (export.default.Builder.prototype._registerSectionBuilders.this.Unknown):
1672 * wasm/LowLevelBinary.js: Add limited support for var{u}int64 (only the 32-bit values)
1673 (export.default.LowLevelBinary.prototype.varint32):
1674 (export.default.LowLevelBinary.prototype.varuint64):
1675 (export.default.LowLevelBinary.prototype.varint64):
1676 * wasm/function-tests/exceptions.js: update error message
1677 * wasm/function-tests/trap-load.js: update error message
1678 * wasm/function-tests/trap-store.js: update error message
1679 * wasm/js-api/wasm-to-wasm-bad-signature.js: Added. Test a bunch of bad wasm->wasm import signatures
1680 (const.makeImportee.signature.switch):
1681 (BadSignatureDropStartParams):
1682 * wasm/js-api/wasm-to-wasm.js: Added. Test 64-bit wasm->wasm import calls
1683 (const.callerModule):
1684 (const.calleeModule):
1687 2017-01-02 Saam Barati <sbarati@apple.com>
1689 WebAssembly: Some loads don't take into account the offset
1690 https://bugs.webkit.org/show_bug.cgi?id=166616
1691 <rdar://problem/29841541>
1693 Reviewed by Keith Miller.
1695 * wasm/function-tests/load-offset.js: Added.
1697 2016-12-29 Saam Barati <sbarati@apple.com>
1699 WebAssembly: Rebase spec-tests now that wabt has been updated to produce certain kinds of invalid modules
1700 https://bugs.webkit.org/show_bug.cgi?id=166491
1701 <rdar://problem/29814999>
1703 Reviewed by Yusuke Suzuki.
1705 Based off these revisions:
1706 - spec: b055d01ea1dfdd7a5231ae779095435f836de97f
1707 - wabt: d0d44702c753f851b094615298a2f4d4e3c21035
1709 The reason for the rebase is that wabt was updated to stop
1710 silently rejecting invalid modules. This was needed because
1711 some of the spec tests check to make sure that the module
1712 is invalid, but wabt was silently ignoring the errors and
1713 generating valid modules:
1714 https://github.com/WebAssembly/wabt/issues/256
1717 * wasm/spec-tests/address.wast.js:
1718 * wasm/spec-tests/binary.wast.js:
1719 * wasm/spec-tests/block.wast.js:
1720 * wasm/spec-tests/br.wast.js:
1721 * wasm/spec-tests/br_if.wast.js:
1722 * wasm/spec-tests/br_table.wast.js:
1723 * wasm/spec-tests/break-drop.wast.js:
1724 * wasm/spec-tests/call.wast.js:
1725 * wasm/spec-tests/call_indirect.wast.js:
1726 * wasm/spec-tests/comments.wast.js:
1727 * wasm/spec-tests/conversions.wast.js:
1728 * wasm/spec-tests/custom_section.wast.js:
1729 * wasm/spec-tests/endianness.wast.js:
1730 * wasm/spec-tests/exports.wast.js:
1731 * wasm/spec-tests/f32.wast.js:
1732 * wasm/spec-tests/f32_cmp.wast.js:
1733 * wasm/spec-tests/f64.wast.js:
1734 * wasm/spec-tests/f64_cmp.wast.js:
1735 * wasm/spec-tests/fac.wast.js:
1736 * wasm/spec-tests/float_exprs.wast.js:
1737 * wasm/spec-tests/float_literals.wast.js:
1738 * wasm/spec-tests/float_memory.wast.js:
1739 * wasm/spec-tests/float_misc.wast.js:
1740 * wasm/spec-tests/forward.wast.js:
1741 * wasm/spec-tests/func.wast.js:
1742 * wasm/spec-tests/func_ptrs.wast.js:
1743 * wasm/spec-tests/get_local.wast.js:
1744 * wasm/spec-tests/globals.wast.js:
1745 * wasm/spec-tests/i32.wast.js:
1746 * wasm/spec-tests/i64.wast.js:
1747 * wasm/spec-tests/imports.wast.js:
1748 * wasm/spec-tests/int_exprs.wast.js:
1749 * wasm/spec-tests/int_literals.wast.js:
1750 * wasm/spec-tests/left-to-right.wast.js:
1751 * wasm/spec-tests/linking.wast.js:
1752 * wasm/spec-tests/loop.wast.js:
1753 * wasm/spec-tests/memory.wast.js:
1754 * wasm/spec-tests/memory_redundancy.wast.js:
1755 * wasm/spec-tests/memory_trap.wast.js:
1756 * wasm/spec-tests/names.wast.js:
1757 * wasm/spec-tests/nop.wast.js:
1758 * wasm/spec-tests/resizing.wast.js:
1759 * wasm/spec-tests/return.wast.js:
1760 * wasm/spec-tests/select.wast.js:
1761 * wasm/spec-tests/set_local.wast.js:
1762 * wasm/spec-tests/skip-stack-guard-page.wast.js:
1763 * wasm/spec-tests/stack.wast.js:
1764 * wasm/spec-tests/start.wast.js:
1765 * wasm/spec-tests/store_retval.wast.js:
1766 * wasm/spec-tests/switch.wast.js:
1767 * wasm/spec-tests/tee_local.wast.js:
1768 * wasm/spec-tests/traps.wast.js:
1769 * wasm/spec-tests/typecheck.wast.js:
1770 * wasm/spec-tests/unreachable.wast.js:
1771 * wasm/spec-tests/unwind.wast.js:
1773 2016-12-28 Saam Barati <sbarati@apple.com>
1775 WebAssembly: Don't allow duplicate export names
1776 https://bugs.webkit.org/show_bug.cgi?id=166490
1777 <rdar://problem/29815000>
1779 Reviewed by Keith Miller.
1782 * wasm/function-tests/invalid-duplicate-export.js: Added.
1784 2016-12-28 Saam Barati <sbarati@apple.com>
1786 WebAssembly: Implement grow_memory and current_memory
1787 https://bugs.webkit.org/show_bug.cgi?id=166448
1788 <rdar://problem/29803676>
1790 Reviewed by Keith Miller.
1792 I rewrote some of the testWasmModuleFunctions that used Memory to use
1793 the JS API since the jsc.cpp version can no longer use memory.
1796 * wasm/function-tests/add-12.js:
1797 (testWasmModuleFunctions):
1798 * wasm/function-tests/br-if-loop-less-than.js:
1799 (testWasmModuleFunctions):
1800 * wasm/function-tests/brTableAsIf.js:
1801 (testWasmModuleFunctions):
1802 * wasm/function-tests/brTableManyValues.js:
1803 (testWasmModuleFunctions):
1804 * wasm/function-tests/brTableWithLoop.js:
1805 (testWasmModuleFunctions):
1806 * wasm/function-tests/dumb-eq-if-then-else.js:
1807 * wasm/function-tests/eqz.js:
1808 * wasm/function-tests/grow-memory-2.js: Added.
1810 (assert.eq.instance.exports.foo):
1811 * wasm/function-tests/grow-memory-3.js: Added.
1812 * wasm/function-tests/grow-memory-4.js: Added.
1814 * wasm/function-tests/grow-memory.js: Added.
1815 (binaryShouldNotParse):
1819 * wasm/function-tests/i32-load.js:
1820 (testWasmModuleFunctions):
1821 * wasm/function-tests/i32-load8-s.js:
1822 * wasm/function-tests/max.js:
1823 * wasm/function-tests/min.js:
1824 * wasm/js-api/memory-grow.js: Added.
1827 * wasm/js-api/test_memory.js:
1830 2016-12-25 Yusuke Suzuki <utatane.tea@gmail.com>
1832 Propagate the source origin as much as possible
1833 https://bugs.webkit.org/show_bug.cgi?id=166348
1835 Reviewed by Darin Adler.
1837 * stress/source-origin.js: Added.
1840 2016-12-24 Caio Lima <ticaiolima@gmail.com>
1842 [test262] Fixing mapped arguments object property test case
1843 https://bugs.webkit.org/show_bug.cgi?id=159398
1845 Reviewed by Saam Barati.
1847 * stress/arguments-bizarre-behaviour-disable-enumerability.js:
1848 * stress/arguments-define-property.js: Added.
1851 * stress/arguments-non-configurable.js: Added.
1853 (tryChangeNonConfigurableDescriptor):
1854 (set tryChangeNonConfigurableDescriptor):
1855 (tryChangeWritableOfNonConfigurableDescriptor):
1858 016-12-20 Caio Lima <ticaiolima@gmail.com>
1860 [test262] Fixing mapped arguments object property test case
1861 https://bugs.webkit.org/show_bug.cgi?id=159398
1865 * stress/arguments-bizarre-behaviour-disable-enumerability.js:
1866 * stress/arguments-define-property.js: Added.
1869 * stress/arguments-non-configurable.js: Added.
1871 (tryChangeNonConfigurableDescriptor):
1872 (set tryChangeNonConfigurableDescriptor):
1873 (tryChangeWritableOfNonConfigurableDescriptor):
1876 2016-12-23 Keith Miller <keith_miller@apple.com>
1878 WebAssembly: trap on bad division.
1879 https://bugs.webkit.org/show_bug.cgi?id=164786
1881 Reviewed by Mark Lam.
1883 Also, mark conversions as passing.
1888 2016-12-22 Keith Miller <keith_miller@apple.com>
1890 WebAssembly: Make spec-tests/f32.wast.js and spec-tests/f64.wast.js pass
1891 https://bugs.webkit.org/show_bug.cgi?id=166447
1893 Reviewed by Saam Barati.
1898 2016-12-22 Saam Barati <sbarati@apple.com>
1900 WebAssembly: Make calling Wasm functions that returns or takes an i64 as a parameter an early exception
1901 https://bugs.webkit.org/show_bug.cgi?id=166437
1902 <rdar://problem/29793949>
1904 Reviewed by Keith Miller.
1907 * wasm/function-tests/i64-from-js-exceptions.js: Added.
1908 (const.imp.import.sideEffects):
1909 (assert.throws.instance.exports.foo.valueOf):
1911 2016-12-22 Mark Lam <mark.lam@apple.com>
1913 De-duplicate finally blocks.
1914 https://bugs.webkit.org/show_bug.cgi?id=160168
1916 Reviewed by Saam Barati.
1918 Re-landing r209952 with a few new tests added in test-finally.js.
1920 * stress/deeply-nested-finallys.js: Copied from JSTests/stress/deeply-nested-finallys.js.
1921 - Tests many levels of finally nesting. This causes the old code to hang (and
1922 crashes eventually) while trying to generate bytecode for the exponentially
1923 duplicated finally blocks. The new code completes this test almost instantly.
1925 * stress/test-finally.js: Copied from JSTests/stress/test-finally.js.
1926 - Tests control flow through various permutations of finally blocks.
1928 2016-12-22 Saam Barati <sbarati@apple.com>
1930 WebAssembly: Make the spec-tests/address.wast.js test pass
1931 https://bugs.webkit.org/show_bug.cgi?id=166429
1932 <rdar://problem/29793220>
1934 Reviewed by Keith Miller.
1938 2016-12-22 Keith Miller <keith_miller@apple.com>
1940 WebAssembly: The validator should not allow unused stack entries at the end of a block
1941 https://bugs.webkit.org/show_bug.cgi?id=166411
1943 Reviewed by Saam Barati.
1945 Test cleanup and enable new passing tests.
1948 * wasm/function-tests/br-if-as-return.js:
1950 2016-12-22 Saam Barati <sbarati@apple.com>
1952 WebAssembly: Make the spec-tests/start.wast.js test pass
1953 https://bugs.webkit.org/show_bug.cgi?id=166416
1954 <rdar://problem/29784532>
1956 Reviewed by Yusuke Suzuki.
1960 2016-12-21 Keith Miller <keith_miller@apple.com>
1962 WebAssembly: Fix decode floating point constants in unreachable code
1963 https://bugs.webkit.org/show_bug.cgi?id=166400
1965 Reviewed by Saam Barati.
1969 2016-12-21 Keith Miller <keith_miller@apple.com>
1971 WebAssembly: Allow br, br_if, and br_table to act as a return
1972 https://bugs.webkit.org/show_bug.cgi?id=166393
1974 Reviewed by Saam Barati.
1976 Add tests for breaks acting as returns and fix tests that
1977 validate error messages.
1979 * wasm/function-tests/br-as-return.js: Added.
1980 * wasm/function-tests/br-if-as-return.js: Added.
1981 * wasm/function-tests/br-table-as-return.js: Added.
1982 * wasm/function-tests/if-no-else-non-void.js:
1983 * wasm/function-tests/struct.js: Added.
1984 * wasm/js-api/global-error.js:
1986 * wasm/js-api/table.js:
1989 2016-12-21 Saam Barati <sbarati@apple.com>
1991 WebAssembly: Import spec tests
1992 https://bugs.webkit.org/show_bug.cgi?id=166395
1994 Rubber stamped by Keith Miller.
1996 This patch implements the Wasm spec's tests found here:
1997 https://github.com/WebAssembly/spec/tree/master/interpreter/test
1999 These tests are in .wast s-epxression format. To convert
2000 them to JS, I use a script from the wabt library, found here:
2001 https://github.com/WebAssembly/wabt/blob/master/test/run-gen-spec-js.py
2003 I also added a script that automatically imports the tests as
2004 JS files. The inputs to the script is the path to the Wasm spec
2005 git repo and the path to the wabt git repo. This will make importing
2006 new tests easy in the future.
2008 The wasm spec imported is at commit: b055d01ea1dfdd7a5231ae779095435f836de97f
2009 The wabt used to do the import is at commit: 622b42dced6d793e9d49e9b1fd1d1524defd1387
2012 * wasm/import-spec-tests.rb: Added.
2013 * wasm/spec-tests: Added.
2014 * wasm/spec-tests/address.wast.js: Added.
2020 (assert_soft_invalid):
2021 (assert_unlinkable):
2022 (assert_uninstantiable):
2025 (assert_return_nan):
2026 * wasm/spec-tests/binary.wast.js: Added.
2032 (assert_soft_invalid):
2033 (assert_unlinkable):
2034 (assert_uninstantiable):
2037 (assert_return_nan):
2038 * wasm/spec-tests/block.wast.js: Added.
2044 (assert_soft_invalid):
2045 (assert_unlinkable):
2046 (assert_uninstantiable):
2049 (assert_return_nan):
2050 * wasm/spec-tests/br.wast.js: Added.
2056 (assert_soft_invalid):
2057 (assert_unlinkable):
2058 (assert_uninstantiable):
2061 (assert_return_nan):
2062 * wasm/spec-tests/br_if.wast.js: Added.
2068 (assert_soft_invalid):
2069 (assert_unlinkable):
2070 (assert_uninstantiable):
2073 (assert_return_nan):
2074 * wasm/spec-tests/br_table.wast.js: Added.
2080 (assert_soft_invalid):
2081 (assert_unlinkable):
2082 (assert_uninstantiable):
2085 (assert_return_nan):
2086 * wasm/spec-tests/break-drop.wast.js: Added.
2092 (assert_soft_invalid):
2093 (assert_unlinkable):
2094 (assert_uninstantiable):
2097 (assert_return_nan):
2098 * wasm/spec-tests/call.wast.js: Added.
2104 (assert_soft_invalid):
2105 (assert_unlinkable):
2106 (assert_uninstantiable):
2109 (assert_return_nan):
2110 * wasm/spec-tests/call_indirect.wast.js: Added.
2116 (assert_soft_invalid):
2117 (assert_unlinkable):
2118 (assert_uninstantiable):
2121 (assert_return_nan):
2122 * wasm/spec-tests/comments.wast.js: Added.
2128 (assert_soft_invalid):
2129 (assert_unlinkable):
2130 (assert_uninstantiable):
2133 (assert_return_nan):
2134 * wasm/spec-tests/conversions.wast.js: Added.
2140 (assert_soft_invalid):
2141 (assert_unlinkable):
2142 (assert_uninstantiable):
2145 (assert_return_nan):
2146 * wasm/spec-tests/custom_section.wast.js: Added.
2152 (assert_soft_invalid):
2153 (assert_unlinkable):
2154 (assert_uninstantiable):
2157 (assert_return_nan):
2158 * wasm/spec-tests/endianness.wast.js: Added.
2164 (assert_soft_invalid):
2165 (assert_unlinkable):
2166 (assert_uninstantiable):
2169 (assert_return_nan):
2170 * wasm/spec-tests/exports.wast.js: Added.
2176 (assert_soft_invalid):
2177 (assert_unlinkable):
2178 (assert_uninstantiable):
2181 (assert_return_nan):
2182 * wasm/spec-tests/f32.wast.js: Added.
2188 (assert_soft_invalid):
2189 (assert_unlinkable):
2190 (assert_uninstantiable):
2193 (assert_return_nan):
2194 * wasm/spec-tests/f32_cmp.wast.js: Added.
2200 (assert_soft_invalid):
2201 (assert_unlinkable):
2202 (assert_uninstantiable):
2205 (assert_return_nan):
2206 * wasm/spec-tests/f64.wast.js: Added.
2212 (assert_soft_invalid):
2213 (assert_unlinkable):
2214 (assert_uninstantiable):
2217 (assert_return_nan):
2218 * wasm/spec-tests/f64_cmp.wast.js: Added.
2224 (assert_soft_invalid):
2225 (assert_unlinkable):
2226 (assert_uninstantiable):
2229 (assert_return_nan):
2230 * wasm/spec-tests/fac.wast.js: Added.
2236 (assert_soft_invalid):
2237 (assert_unlinkable):
2238 (assert_uninstantiable):
2241 (assert_return_nan):
2242 * wasm/spec-tests/float_exprs.wast.js: Added.
2248 (assert_soft_invalid):
2249 (assert_unlinkable):
2250 (assert_uninstantiable):
2253 (assert_return_nan):
2254 * wasm/spec-tests/float_literals.wast.js: Added.
2260 (assert_soft_invalid):
2261 (assert_unlinkable):
2262 (assert_uninstantiable):
2265 (assert_return_nan):
2266 * wasm/spec-tests/float_memory.wast.js: Added.
2272 (assert_soft_invalid):
2273 (assert_unlinkable):
2274 (assert_uninstantiable):
2277 (assert_return_nan):
2278 * wasm/spec-tests/float_misc.wast.js: Added.
2284 (assert_soft_invalid):
2285 (assert_unlinkable):
2286 (assert_uninstantiable):
2289 (assert_return_nan):
2290 * wasm/spec-tests/forward.wast.js: Added.
2296 (assert_soft_invalid):
2297 (assert_unlinkable):
2298 (assert_uninstantiable):
2301 (assert_return_nan):
2302 * wasm/spec-tests/func.wast.js: Added.
2308 (assert_soft_invalid):
2309 (assert_unlinkable):
2310 (assert_uninstantiable):
2313 (assert_return_nan):
2314 * wasm/spec-tests/func_ptrs.wast.js: Added.
2320 (assert_soft_invalid):
2321 (assert_unlinkable):
2322 (assert_uninstantiable):
2325 (assert_return_nan):
2326 * wasm/spec-tests/get_local.wast.js: Added.
2332 (assert_soft_invalid):
2333 (assert_unlinkable):
2334 (assert_uninstantiable):
2337 (assert_return_nan):
2338 * wasm/spec-tests/globals.wast.js: Added.
2344 (assert_soft_invalid):
2345 (assert_unlinkable):
2346 (assert_uninstantiable):
2349 (assert_return_nan):
2350 * wasm/spec-tests/i32.wast.js: Added.
2356 (assert_soft_invalid):
2357 (assert_unlinkable):
2358 (assert_uninstantiable):
2361 (assert_return_nan):
2362 * wasm/spec-tests/i64.wast.js: Added.
2368 (assert_soft_invalid):
2369 (assert_unlinkable):
2370 (assert_uninstantiable):
2373 (assert_return_nan):
2374 * wasm/spec-tests/imports.wast.js: Added.
2380 (assert_soft_invalid):
2381 (assert_unlinkable):
2382 (assert_uninstantiable):
2385 (assert_return_nan):
2386 * wasm/spec-tests/int_exprs.wast.js: Added.
2392 (assert_soft_invalid):
2393 (assert_unlinkable):
2394 (assert_uninstantiable):
2397 (assert_return_nan):
2398 * wasm/spec-tests/int_literals.wast.js: Added.
2404 (assert_soft_invalid):
2405 (assert_unlinkable):
2406 (assert_uninstantiable):
2409 (assert_return_nan):
2410 * wasm/spec-tests/left-to-right.wast.js: Added.
2416 (assert_soft_invalid):
2417 (assert_unlinkable):
2418 (assert_uninstantiable):
2421 (assert_return_nan):
2422 * wasm/spec-tests/linking.wast.js: Added.
2428 (assert_soft_invalid):
2429 (assert_unlinkable):
2430 (assert_uninstantiable):
2433 (assert_return_nan):
2434 * wasm/spec-tests/loop.wast.js: Added.
2440 (assert_soft_invalid):
2441 (assert_unlinkable):
2442 (assert_uninstantiable):
2445 (assert_return_nan):
2446 * wasm/spec-tests/memory.wast.js: Added.
2452 (assert_soft_invalid):
2453 (assert_unlinkable):
2454 (assert_uninstantiable):
2457 (assert_return_nan):
2458 * wasm/spec-tests/memory_redundancy.wast.js: Added.
2464 (assert_soft_invalid):
2465 (assert_unlinkable):
2466 (assert_uninstantiable):
2469 (assert_return_nan):
2470 * wasm/spec-tests/memory_trap.wast.js: Added.
2476 (assert_soft_invalid):
2477 (assert_unlinkable):
2478 (assert_uninstantiable):
2481 (assert_return_nan):
2482 * wasm/spec-tests/names.wast.js: Added.
2488 (assert_soft_invalid):
2489 (assert_unlinkable):
2490 (assert_uninstantiable):
2493 (assert_return_nan):
2494 * wasm/spec-tests/nop.wast.js: Added.
2500 (assert_soft_invalid):
2501 (assert_unlinkable):
2502 (assert_uninstantiable):
2505 (assert_return_nan):
2506 * wasm/spec-tests/resizing.wast.js: Added.
2512 (assert_soft_invalid):
2513 (assert_unlinkable):
2514 (assert_uninstantiable):
2517 (assert_return_nan):
2518 * wasm/spec-tests/return.wast.js: Added.
2524 (assert_soft_invalid):
2525 (assert_unlinkable):
2526 (assert_uninstantiable):
2529 (assert_return_nan):
2530 * wasm/spec-tests/select.wast.js: Added.
2536 (assert_soft_invalid):
2537 (assert_unlinkable):
2538 (assert_uninstantiable):
2541 (assert_return_nan):
2542 * wasm/spec-tests/set_local.wast.js: Added.
2548 (assert_soft_invalid):
2549 (assert_unlinkable):
2550 (assert_uninstantiable):
2553 (assert_return_nan):
2554 * wasm/spec-tests/skip-stack-guard-page.wast.js: Added.
2560 (assert_soft_invalid):
2561 (assert_unlinkable):
2562 (assert_uninstantiable):
2565 (assert_return_nan):
2566 * wasm/spec-tests/stack.wast.js: Added.
2572 (assert_soft_invalid):
2573 (assert_unlinkable):
2574 (assert_uninstantiable):
2577 (assert_return_nan):
2578 * wasm/spec-tests/start.wast.js: Added.
2584 (assert_soft_invalid):
2585 (assert_unlinkable):
2586 (assert_uninstantiable):
2589 (assert_return_nan):
2590 * wasm/spec-tests/store_retval.wast.js: Added.
2596 (assert_soft_invalid):
2597 (assert_unlinkable):
2598 (assert_uninstantiable):
2601 (assert_return_nan):
2602 * wasm/spec-tests/switch.wast.js: Added.
2608 (assert_soft_invalid):
2609 (assert_unlinkable):
2610 (assert_uninstantiable):
2613 (assert_return_nan):
2614 * wasm/spec-tests/tee_local.wast.js: Added.
2620 (assert_soft_invalid):
2621 (assert_unlinkable):
2622 (assert_uninstantiable):
2625 (assert_return_nan):
2626 * wasm/spec-tests/traps.wast.js: Added.
2632 (assert_soft_invalid):
2633 (assert_unlinkable):
2634 (assert_uninstantiable):
2637 (assert_return_nan):
2638 * wasm/spec-tests/typecheck.wast.js: Added.
2644 (assert_soft_invalid):
2645 (assert_unlinkable):
2646 (assert_uninstantiable):
2649 (assert_return_nan):
2650 * wasm/spec-tests/unreachable.wast.js: Added.
2656 (assert_soft_invalid):
2657 (assert_unlinkable):
2658 (assert_uninstantiable):
2661 (assert_return_nan):
2662 * wasm/spec-tests/unwind.wast.js: Added.
2668 (assert_soft_invalid):
2669 (assert_unlinkable):
2670 (assert_uninstantiable):
2673 (assert_return_nan):
2675 2016-12-20 Keith Miller <keith_miller@apple.com>
2677 Add support for global
2678 https://bugs.webkit.org/show_bug.cgi?id=165171
2680 Reviewed by Filip Pizlo.
2682 * stress/global.js: Added.
2684 2016-12-20 JF Bastien <jfbastien@apple.com>
2686 WebAssembly API: implement WebAssembly.LinkError
2687 https://bugs.webkit.org/show_bug.cgi?id=165805
2688 <rdar://problem/29747874>
2690 Reviewed by Mark lam.
2692 Update all exception sites which now throw WebAssembly.LinkError.
2694 * wasm/js-api/element-data.js:
2695 * wasm/js-api/element.js:
2697 * wasm/js-api/global-error.js:
2699 * wasm/js-api/table.js:
2701 (new.WebAssembly.Table):
2702 * wasm/js-api/test_Data.js:
2703 * wasm/js-api/test_basic_api.js:
2704 (const.c.in.constructorProperties.switch):
2705 * wasm/js-api/test_memory.js:
2707 (test.testMemImportError): Deleted.
2709 2016-12-20 JF Bastien <jfbastien@apple.com>
2711 WebAssembly: unique function signatures
2712 https://bugs.webkit.org/show_bug.cgi?id=165957
2713 <rdar://problem/29735737>
2715 Reviewed by Saam Barati.
2717 * wasm/function-tests/table-basic.js: FIXME is now addressed,
2718 though instance to instance calls still need work which bug
2719 #165282 will address
2721 * wasm/js-api/unique-signature.js: Added.
2722 (CallIndirectWithDuplicateSignatures):
2724 2016-12-19 Mark Lam <mark.lam@apple.com>
2726 Rolling out r209974 and r209952. They break some websites in mysterious ways. Step 2: Rollout r209952.
2727 https://bugs.webkit.org/show_bug.cgi?id=166049
2731 * stress/deeply-nested-finallys.js: Removed.
2732 * stress/test-finally.js: Removed.
2734 2016-12-19 Saam Barati <sbarati@apple.com>
2736 WebAssembly: Make running Wasm tests take less time by reducing some tests' iteration count and by splitting some tests into different files
2737 https://bugs.webkit.org/show_bug.cgi?id=166017
2739 Reviewed by Yusuke Suzuki.
2741 * wasm/function-tests/trap-load-2.js: Added.
2743 (wasmFrameCountFromError):
2746 * wasm/function-tests/trap-load.js:
2747 (assert.continuation): Deleted.
2748 * wasm/function-tests/trap-store-2.js: Added.
2749 (import.Builder.from.string_appeared_here.assert):
2752 * wasm/function-tests/trap-store.js:
2753 (assert.continuation): Deleted.
2755 * wasm/js-api/test_memory.js:
2758 2016-12-18 Saam Barati <sbarati@apple.com>
2760 WebAssembly: Implement the WebAssembly.compile and WebAssembly.validate
2761 https://bugs.webkit.org/show_bug.cgi?id=165936
2763 Reviewed by Mark Lam.
2765 * wasm/js-api/Module-compile.js: Added.
2766 (async.testPromiseAPI):
2767 * wasm/js-api/test_basic_api.js:
2768 (const.c.in.constructorProperties.switch):
2769 * wasm/js-api/validate.js: Added.
2770 (assert.truthy.WebAssembly.validate.builder.WebAssembly):
2772 2016-12-16 Mark Lam <mark.lam@apple.com>
2774 De-duplicate finally blocks.
2775 https://bugs.webkit.org/show_bug.cgi?id=160168
2777 Reviewed by Keith Miller.
2779 * stress/deeply-nested-finallys.js: Added.
2780 - Tests many levels of finally nesting. This causes the old code to hang (and
2781 crashes eventually) while trying to generate bytecode for the exponentially
2782 duplicated finally blocks. The new code completes this test almost instantly.
2784 * stress/test-finally.js: Added.
2785 - Tests control flow through various permutations of finally blocks.
2787 2016-12-16 Saam Barati <sbarati@apple.com>
2789 WebAssembly: WasmB3IRGenerator should throw exceptions instead of crash
2790 https://bugs.webkit.org/show_bug.cgi?id=165834
2792 Reviewed by Keith Miller.
2794 * wasm/function-tests/exceptions.js: Added.
2795 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
2796 * wasm/function-tests/table-basic.js:
2797 (i.i.42.throw.new.Error):
2799 2016-12-16 Keith Miller <keith_miller@apple.com>
2801 i64.eqz should use an Int64 zero
2802 https://bugs.webkit.org/show_bug.cgi?id=165942
2804 Reviewed by Mark Lam.
2808 2016-12-15 Keith Miller <keith_miller@apple.com>
2810 Fix validation of non-void if blocks with no else
2811 https://bugs.webkit.org/show_bug.cgi?id=165938
2813 Reviewed by Saam Barati.
2815 Add a new failing test and a fix an existing one.
2817 * wasm/function-tests/dead-call.js:
2818 * wasm/function-tests/if-no-else-non-void.js: Added.
2820 2016-12-15 Keith Miller <keith_miller@apple.com>
2822 Wasm should not create empty unlinked callsites
2823 https://bugs.webkit.org/show_bug.cgi?id=165933
2825 Reviewed by Mark Lam.
2827 * wasm/function-tests/dead-call.js: Added.
2829 2016-12-15 JF Bastien <jfbastien@apple.com>
2831 WebAssembly: improve compilation error messages
2832 https://bugs.webkit.org/show_bug.cgi?id=163919
2834 Reviewed by Saam Barati.
2836 Update error messages in these tests.
2837 Use the assert.throws facility in many of them which weren't already.
2839 * wasm/js-api/element.js:
2840 (assert.throws.new.WebAssembly.Module.builder.WebAssembly):
2842 * wasm/js-api/global-error.js:
2843 (assert.throws.new.WebAssembly.Module.bin):
2846 * wasm/js-api/table.js:
2847 (assert.throws.new.WebAssembly.Module.builder.WebAssembly):
2849 (assertBadTableImport):
2850 * wasm/js-api/test_Data.js:
2851 (DataSectionWithoutMemory):
2852 * wasm/js-api/test_Start.js:
2853 (InvalidStartFunctionIndex):
2854 * wasm/js-api/test_basic_api.js:
2855 (const.c.in.constructorProperties.switch):
2857 2016-12-15 JF Bastien <jfbastien@apple.com>
2859 WebAssembly API: improve data section errors
2860 https://bugs.webkit.org/show_bug.cgi?id=165733
2862 Reviewed by Keith Miller.
2864 * wasm/js-api/element-data.js: Added.
2865 (ElementBeforeData.set const):
2866 (ElementBeforeData): check the order of initialization, which is observable on failure
2867 * wasm/js-api/test_Data.js:
2868 (DataSectionWithoutMemory):
2869 (DataSectionOffTheEnd): Deleted.
2870 (DataSectionPartlyOffTheEnd): Deleted.
2871 (DataSectionEmptyOffTheEnd): Deleted.
2872 (DataSectionSeenByStart): Deleted.
2874 2016-12-15 Keith Miller <keith_miller@apple.com>
2876 Fix 64-bit shift family Wasm opcodes
2877 https://bugs.webkit.org/show_bug.cgi?id=165902
2879 Reviewed by Geoffrey Garen.
2881 Add tests for shift family of instructions. Since
2882 we can't generate i64 values to pass to wasm we only compile
2883 the code for those functions. Attempting to generate any i64
2884 code using these instructions would have been enough to cause
2885 the B3 Validation error anyway.
2888 * wasm/function-tests/rotl.js: Added.
2889 * wasm/function-tests/rotr.js: Added.
2890 * wasm/function-tests/shl.js: Added.
2891 * wasm/function-tests/shr-s.js: Added.
2892 * wasm/function-tests/shr-u.js: Added.
2895 2016-12-14 Keith Miller <keith_miller@apple.com>
2897 WebAssembly: test_BuilderJSON.js is broken
2898 https://bugs.webkit.org/show_bug.cgi?id=165893
2900 Reviewed by Michael Saboff.
2903 (const._isValidValue):
2904 * wasm/self-test/test_BuilderJSON.js:
2906 2016-12-14 Keith Miller <keith_miller@apple.com>
2908 Unreviewed, fix test.
2910 * wasm/function-tests/i32-const.js:
2912 2016-12-14 Keith Miller <keith_miller@apple.com>
2914 Wasm should decode constants correctly
2915 https://bugs.webkit.org/show_bug.cgi?id=165886
2917 Reviewed by Saam Barati.
2920 (const._isValidValue):
2921 * wasm/Builder_WebAssemblyBinary.js:
2923 * wasm/LowLevelBinary.js:
2924 (export.default.LowLevelBinary.prototype.float):
2925 (export.default.LowLevelBinary.prototype.double):
2926 * wasm/function-tests/f32-const.js: Added.
2927 * wasm/function-tests/f64-const.js: Added.
2928 * wasm/function-tests/i32-const.js: Added.
2931 2016-12-14 Saam Barati <sbarati@apple.com>
2933 WebAssembly: Add various low hanging fruit that will allow us to run the LLVM torture tests in Wasm
2934 https://bugs.webkit.org/show_bug.cgi?id=165883
2936 Reviewed by Keith Miller.
2939 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
2940 * wasm/Builder_WebAssemblyBinary.js:
2941 (const.emitters.Export):
2942 * wasm/js-api/table.js:
2946 * wasm/js-api/test_memory.js:
2947 (binaryShouldNotParse):
2949 (test.testMemImportError):
2953 2016-12-14 Filip Pizlo <fpizlo@apple.com>
2955 DirectTailCall implementation needs to tell the shuffler what to put into the ArgumentCount explicitly
2956 https://bugs.webkit.org/show_bug.cgi?id=165882
2958 Reviewed by Mark Lam.
2960 * stress/direct-tail-call-arity-mismatch-count-args.js: Added.
2964 2016-12-14 Keith Miller <keith_miller@apple.com>
2966 WebAssembly JS API: implement Global
2967 https://bugs.webkit.org/show_bug.cgi?id=164133
2969 Reviewed by Saam Barati.
2972 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
2973 * wasm/Builder_WebAssemblyBinary.js:
2974 (const.valueType.WASM.description.type.i32.type.const.putGlobalType):
2976 (const.putInitExpr):
2977 (const.emitters.Import):
2978 (const.emitters.Global):
2979 (const.emitters.Export):
2980 (const.emitters.Code):
2981 * wasm/LowLevelBinary.js:
2982 (export.default.LowLevelBinary.prototype.varuint32):
2983 (export.default.LowLevelBinary.prototype.varint32):
2984 * wasm/js-api/global-error.js: Added.
2987 * wasm/js-api/global-external-init-from-import.js: Added.
2988 * wasm/js-api/global-internal-init-from-import.js: Added.
2989 * wasm/js-api/global-mutate.js: Added.
2990 (createInternalGlobalModule):
2991 * wasm/js-api/globals-export.js: Added.
2992 * wasm/js-api/globals-import.js: Added.
2995 2016-12-13 Saam Barati <sbarati@apple.com>
2997 WebAssembly: implement the elements section
2998 https://bugs.webkit.org/show_bug.cgi?id=165715
3000 Reviewed by Keith Miller.
3003 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
3004 (export.default.Builder.prototype._registerSectionBuilders.switch):
3005 * wasm/Builder_WebAssemblyBinary.js:
3006 (const.emitters.Element):
3007 * wasm/function-tests/basic-element.js: Added.
3008 * wasm/js-api/element.js: Added.
3010 (assertBadBinary.badInstantiation):
3012 2016-12-13 Saam Barati <sbarati@apple.com>
3014 WebAssembly: implement the table section and table import
3015 https://bugs.webkit.org/show_bug.cgi?id=165716
3017 Reviewed by Keith Miller.
3020 (const._importMemoryContinuation):
3021 (const._importTableContinuation):
3022 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
3023 (const._importMemoryContinuation.section): Deleted.
3025 (const._importMemoryContinuation.assert): Deleted.
3026 * wasm/Builder_WebAssemblyBinary.js:
3027 (const.putResizableLimits):
3029 (const.emitters.Import):
3030 (const.emitters.Table):
3031 * wasm/function-tests/call-indirect-params.js:
3032 * wasm/function-tests/call-indirect.js:
3033 * wasm/function-tests/table-basic-2.js: Added.
3034 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
3036 * wasm/function-tests/table-basic.js: Added.
3037 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
3038 * wasm/js-api/call-indirect-results.js:
3039 (const.wasmModuleWhichImportJS): Deleted.
3040 (MonomorphicImport): Deleted.
3041 * wasm/js-api/call-indirect.js:
3042 (const.wasmModuleWhichImportJS):
3046 (MonomorphicImport): Deleted.
3047 * wasm/js-api/table.js: Added.
3051 (assertBadTableImport):
3052 (assertBadBinary.assertBadTableInstance):
3053 (assertBadTableInstance):
3054 (new.WebAssembly.Table):
3055 * wasm/js-api/test_basic_api.js:
3056 (const.c.in.constructorProperties.switch):
3058 2016-12-13 Commit Queue <commit-queue@webkit.org>
3060 Unreviewed, rolling out r209725.
3061 https://bugs.webkit.org/show_bug.cgi?id=165811
3063 "Broke ARMv7 builds" (Requested by msaboff on #webkit).
3067 "REGRESSION(r209653): speedometer crashes making virtual slow
3069 https://bugs.webkit.org/show_bug.cgi?id=165748
3070 http://trac.webkit.org/changeset/209725
3072 2016-12-12 Michael Saboff <msaboff@apple.com>
3074 REGRESSION(r209653): speedometer crashes making virtual slow path tailcalls
3075 https://bugs.webkit.org/show_bug.cgi?id=165748
3077 Reviewed by Filip Pizlo.
3079 New regression test.
3081 * stress/regress-165748.js: Added.
3091 2016-12-12 Mark Lam <mark.lam@apple.com>
3093 Debug JSC test timeout: stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js.ftl-no-cjit.
3094 https://bugs.webkit.org/show_bug.cgi?id=164630
3096 Reviewed by Keith Miller.
3098 Speculative fix for timeout issue. It looks like this test just runs a bit
3099 slower on debug builds. So, we'll give it a little more time to run.
3101 * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
3103 2016-12-11 Saam Barati <sbarati@apple.com>
3105 We should be able to throw exceptions from Wasm code and when Wasm frames are on the stack
3106 https://bugs.webkit.org/show_bug.cgi?id=165429
3108 Reviewed by Keith Miller.
3110 * wasm/function-tests/trap-load.js: Added.
3112 (wasmFrameCountFromError):
3114 (assert.continuation):
3115 * wasm/function-tests/trap-store.js: Added.
3116 (import.Builder.from.string_appeared_here.assert):
3118 (assert.continuation):
3120 * wasm/js-api/test_memory_constructor.js:
3123 2016-12-10 Commit Queue <commit-queue@webkit.org>
3125 Unreviewed, rolling out r209653, r209654, r209663, and
3127 https://bugs.webkit.org/show_bug.cgi?id=165739
3129 speedometer crashes (Requested by pizlo on #webkit).
3131 Reverted changesets:
3133 "JSVALUE64: Pass arguments in platform argument registers when
3134 making JavaScript calls"
3135 https://bugs.webkit.org/show_bug.cgi?id=160355
3136 http://trac.webkit.org/changeset/209653
3138 "Unreviewed build fix for 32 bit builds."
3139 http://trac.webkit.org/changeset/209654
3141 "Unreviewed build fix for the CLOOP after r209653"
3142 http://trac.webkit.org/changeset/209663
3144 "REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()"
3145 https://bugs.webkit.org/show_bug.cgi?id=165728
3146 http://trac.webkit.org/changeset/209673
3148 2016-12-10 Michael Saboff <msaboff@apple.com>
3150 REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()
3151 https://bugs.webkit.org/show_bug.cgi?id=165728
3153 Reviewed by Filip Pizlo.
3155 New regression test.
3157 * stress/regress-165728.js: Added.
3163 2016-12-10 Keith Miller <keith_miller@apple.com>
3165 Fix indirect_call if the result type is used.
3166 https://bugs.webkit.org/show_bug.cgi?id=165727
3168 Reviewed by Michael Saboff.
3170 * wasm/js-api/call-indirect-results.js: Added.
3171 (const.wasmModuleWhichImportJS):
3172 (MonomorphicImport):
3174 2016-12-10 Yusuke Suzuki <utatane.tea@gmail.com>
3176 [JSC] Module namespace object behaves like immutable prototype exotic object
3177 https://bugs.webkit.org/show_bug.cgi?id=165598
3179 Reviewed by Mark Lam.
3181 * modules/namespace-prototype-assignment.js: Added.
3188 (doInternalSetPrototypeOf):
3189 (ordinarySetPrototypeOf):
3190 (setImmutablePrototype):
3191 (windowProxySetPrototypeOf):
3192 (initSetterExpectation):
3193 (throwIfNoExceptionPending):
3194 (objectSetPrototypeOf):
3195 (setUnderscoreProto):
3196 (reflectSetPrototypeOf):
3198 (newObjectProto.toString):
3202 * modules/namespace-set-prototype-of.js: Added.
3204 (TypeError.Cannot.set prototype):
3206 2016-12-09 Michael Saboff <msaboff@apple.com>
3208 JSVALUE64: Pass arguments in platform argument registers when making JavaScript calls
3209 https://bugs.webkit.org/show_bug.cgi?id=160355
3211 Reviewed by Filip Pizlo.
3213 New microbenchmarks to measure call type performance.
3215 * microbenchmarks/calling-computed-args.js: Added.
3216 * microbenchmarks/calling-many-callees.js: Added.
3217 * microbenchmarks/calling-one-callee-fixed.js: Added.
3218 * microbenchmarks/calling-one-callee.js: Added.
3219 * microbenchmarks/calling-poly-callees.js: Added.
3220 * microbenchmarks/calling-poly-extra-arity-callees.js: Added.
3221 * microbenchmarks/calling-tailcall.js: Added.
3222 * microbenchmarks/calling-virtual-arity-fixup-callees.js: Added.
3223 * microbenchmarks/calling-virtual-arity-fixup-stackargs.js: Added.
3224 * microbenchmarks/calling-virtual-callees.js: Added.
3225 * microbenchmarks/calling-virtual-extra-arity-callees.js: Added.
3227 2016-12-09 Keith Miller <keith_miller@apple.com>
3229 Wasm should support call_indirect
3230 https://bugs.webkit.org/show_bug.cgi?id=165718
3232 Reviewed by Filip Pizlo.
3235 * wasm/function-tests/call-indirect-params.js: Added.
3236 * wasm/function-tests/call-indirect.js: Added.
3237 * wasm/js-api/call-indirect.js: Added.
3238 (const.wasmModuleWhichImportJS):
3239 (MonomorphicImport):
3244 2016-12-09 JF Bastien <jfbastien@apple.com>
3246 WebAssembly: implement data section
3247 https://bugs.webkit.org/show_bug.cgi?id=165696
3249 Reviewed by Keith Miller.
3251 As specified in https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#data-section
3252 Note that some of the interesting corner cases are ill-defined by the spec: https://github.com/WebAssembly/design/issues/897
3254 * wasm/Builder.js: create a data section from JavaScript
3255 * wasm/Builder_WebAssemblyBinary.js: assemble the data section into the proper binary encoding
3256 (const.emitters.Data):
3257 * wasm/js-api/test_Data.js: Added.
3259 (DataSectionOffTheEnd):
3260 (DataSectionPartlyOffTheEnd):
3261 (DataSectionEmptyOffTheEnd):
3262 (DataSectionSeenByStart):
3263 * wasm/self-test/test_BuilderJSON.js: make sure the JSON structure is fine (this sanity checks before going to binary)
3265 2016-12-09 JF Bastien <jfbastien@apple.com>
3267 WebAssembly JS API: implement start function
3268 https://bugs.webkit.org/show_bug.cgi?id=165150
3270 Reviewed by Saam Barati.
3272 * wasm/Builder.js: allow building a .Start()
3273 * wasm/Builder_WebAssemblyBinary.js:
3274 * wasm/js-api/test_Start.js: Added.
3275 (const.emitters.Start): serialize a start section
3276 * wasm/self-test/test_BuilderJSON.js: validate the start section's content
3278 2016-12-09 Saam Barati <sbarati@apple.com>
3280 WebAssembly JS API: implement importing and defining Memory
3281 https://bugs.webkit.org/show_bug.cgi?id=164134
3283 Reviewed by Keith Miller.
3286 (const._importMemoryContinuation.section):
3287 (const._importMemoryContinuation.assert):
3288 (const._importMemoryContinuation):
3289 (const._exportFunctionContinuation.const): Deleted.
3290 (const._exportFunctionContinuation): Deleted.
3291 * wasm/Builder_WebAssemblyBinary.js:
3292 (const.emitters.Import):
3293 * wasm/js-api/test_basic_api.js:
3294 (const.c.in.constructorProperties.switch):
3295 * wasm/js-api/test_memory.js: Added.
3297 (binaryShouldNotParse):
3299 (test.testMemImportError):
3300 * wasm/js-api/test_memory_constructor.js: Added.
3304 (assert.testInvalidInitial):
3305 (testInvalidInitial.testInvalidMaximum):
3306 (testInvalidInitial):
3307 (testInvalidMaximum):
3308 * wasm/self-test/test_BuilderJSON.js:
3310 2016-12-08 JF Bastien <jfbastien@apple.com>
3312 WebAssembly: JSC::link* shouldn't need a CodeBlock
3313 https://bugs.webkit.org/show_bug.cgi?id=165591
3315 Reviewed by Keith Miller.
3317 test that wasm -> JS works, including the IC
3319 * wasm/js-api/test_Instance.js:
3320 (const.wasmModuleWhichImportJS):
3321 (MonomorphicImport):
3326 2016-12-08 Filip Pizlo <fpizlo@apple.com>
3328 Green the cloop bot by raising this threshold.
3330 * mozilla/js1_5/Array/regress-101964.js:
3332 2016-12-08 JF Bastien <jfbastien@apple.com>
3334 WebAssembly JS API: wire up Instance imports
3335 https://bugs.webkit.org/show_bug.cgi?id=165118
3337 Reviewed by Saam Barati.
3339 * wasm/js-api/test_Instance.js: add the test, disabled for now
3341 2016-12-07 Keith Miller <keith_miller@apple.com>
3343 Add more missing trivial wasm ops.
3344 https://bugs.webkit.org/show_bug.cgi?id=165564
3346 Add tests for drop and tee_local.
3348 Reviewed by Geoffrey Garen.
3350 * wasm/function-tests/drop.js: Added.
3351 * wasm/function-tests/nop.js: Added.
3352 * wasm/function-tests/tee-local.js: Added.
3354 2016-12-06 Keith Miller <keith_miller@apple.com>
3356 Add support for truncation operators
3357 https://bugs.webkit.org/show_bug.cgi?id=165519
3359 Reviewed by Geoffrey Garen.
3361 * wasm/function-tests/i32-trunc-s-f32.js: Added.
3362 * wasm/function-tests/i32-trunc-s-f64.js: Added.
3363 * wasm/function-tests/i32-trunc-u-f32.js: Added.
3364 * wasm/function-tests/i32-trunc-u-f64.js: Added.
3365 * wasm/function-tests/i64-trunc-s-f32.js: Added.
3366 * wasm/function-tests/i64-trunc-s-f64.js: Added.
3367 * wasm/function-tests/i64-trunc-u-f32.js: Added.
3368 * wasm/function-tests/i64-trunc-u-f64.js: Added.
3370 2016-12-06 Mark Lam <mark.lam@apple.com>
3372 Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
3373 https://bugs.webkit.org/show_bug.cgi?id=165227
3374 <rdar://problem/29442665>
3376 Reviewed by Saam Barati.
3378 * stress/get-from-scope-dynamic-onto-proxy.js:
3379 - Updated error message.
3381 * stress/proxy-dont-infinite-loop.js: Removed.
3382 * stress/proxy-json-path.js: Removed.
3383 * stress/rest-parameter-allocation-elimination-watchpoints-6.js: Removed.
3384 - Removed these tests because the issue they are testing relies on being able to
3385 set Object.prototype.__proto__ to something else (which is now not possible).
3387 2016-12-05 Caitlin Potter <caitp@igalia.com>
3389 [JSC] report unexpected token when "async" is followed by identifier
3390 https://bugs.webkit.org/show_bug.cgi?id=165091
3392 Reviewed by Mark Lam.
3394 * stress/bug-165091.js:
3396 2016-12-05 Keith Miller <keith_miller@apple.com>
3398 Add Wasm i64 to i32 conversion.
3399 https://bugs.webkit.org/show_bug.cgi?id=165378
3401 Reviewed by Filip Pizlo.
3403 It turns out the wrap operation is just B3's Trunc.
3407 2016-12-04 Keith Miller <keith_miller@apple.com>
3409 Add support for Wasm ctz and popcnt
3410 https://bugs.webkit.org/show_bug.cgi?id=165369
3412 Reviewed by Saam Barati.
3414 * wasm/function-tests/ctz.js: Added.
3415 * wasm/function-tests/popcnt.js: Added.
3417 2016-12-03 JF Bastien <jfbastien@apple.com>
3419 WebAssembly: update binary format to 0xD version
3420 https://bugs.webkit.org/show_bug.cgi?id=165345
3422 Reviewed by Keith Miller.
3424 As described in the following PR: https://github.com/WebAssembly/design/pull/836
3425 Originally committed in r209175, reverted in r209242, and fixed in r209284.
3428 (const._normalizeFunctionSignature):
3429 * wasm/Builder_WebAssemblyBinary.js:
3430 (const.emitters.Type):
3431 (const.emitters.Code):
3432 * wasm/LowLevelBinary.js:
3433 (export.default.LowLevelBinary.prototype.block_type):
3434 (export.default.LowLevelBinary.prototype.inline_signature_type): Deleted.
3436 * wasm/js-api/test_basic_api.js:
3437 * wasm/self-test/test_BuilderWebAssembly.js:
3440 * wasm/self-test/test_WASM.js:
3443 2016-12-02 Keith Miller <keith_miller@apple.com>
3446 https://bugs.webkit.org/show_bug.cgi?id=165355
3448 Reviewed by Filip Pizlo.
3450 * wasm/function-tests/copysign.js: Added.
3452 2016-12-03 Commit Queue <commit-queue@webkit.org>
3454 Unreviewed, rolling out r209298.
3455 https://bugs.webkit.org/show_bug.cgi?id=165359
3457 broke the build (Requested by smfr on #webkit).
3462 https://bugs.webkit.org/show_bug.cgi?id=165355
3463 http://trac.webkit.org/changeset/209298
3465 2016-12-02 Keith Miller <keith_miller@apple.com>
3468 https://bugs.webkit.org/show_bug.cgi?id=165355
3470 Reviewed by Filip Pizlo.
3472 * wasm/function-tests/copysign.js: Added.
3474 2016-12-02 Keith Miller <keith_miller@apple.com>
3476 Unreviewed, fix git having a breakdown over trying to reland a rollout.
3478 2016-12-02 Keith Miller <keith_miller@apple.com>
3480 Add Wasm floating point nearest and trunc
3481 https://bugs.webkit.org/show_bug.cgi?id=165339
3483 Reviewed by Saam Barati.
3485 * wasm/function-tests/nearest.js: Added.
3486 * wasm/function-tests/trunc.js: Added.
3488 2016-12-02 Caitlin Potter <caitp@igalia.com>
3490 [JSC] add additional bit to JSTokenType bitfield
3491 https://bugs.webkit.org/show_bug.cgi?id=165091
3493 Reviewed by Geoffrey Garen.
3495 * stress/bug-165091.js: Added.
3496 (shouldThrowSyntaxError):
3498 2016-12-02 Commit Queue <commit-queue@webkit.org>
3500 Unreviewed, rolling out r209275 and r209276.
3501 https://bugs.webkit.org/show_bug.cgi?id=165348
3503 "broke the arm build" (Requested by keith_miller on #webkit).
3505 Reverted changesets:
3507 "Add Wasm floating point nearest and trunc"
3508 https://bugs.webkit.org/show_bug.cgi?id=165339
3509 http://trac.webkit.org/changeset/209275
3511 "Unreviewed, forgot to change instruction after renaming."
3512 http://trac.webkit.org/changeset/209276
3514 2016-12-02 Keith Miller <keith_miller@apple.com>
3516 Add Wasm floating point nearest and trunc
3517 https://bugs.webkit.org/show_bug.cgi?id=165339
3519 Reviewed by Filip Pizlo.
3521 * wasm/function-tests/nearest.js: Added.
3522 * wasm/function-tests/trunc.js: Added.
3524 2016-12-02 JF Bastien <jfbastien@apple.com>
3526 WebAssembly: revert patch causing odd breakage
3527 https://bugs.webkit.org/show_bug.cgi?id=165308
3531 Bug #164724 seems to cause build issues which I haven't tracked down yet. WasmOps.h can't be found:
3532 ./Source/JavaScriptCore/wasm/WasmFormat.h:34:10: fatal error: 'WasmOps.h' file not found
3534 It's weird since the file is auto-generated and has been for a while. #164724 merely includes it in WasmFormat.h.
3537 (const._normalizeFunctionSignature):
3538 * wasm/Builder_WebAssemblyBinary.js:
3539 (const.emitters.Type):
3540 (const.emitters.Code):
3541 * wasm/LowLevelBinary.js:
3542 (export.default.LowLevelBinary.prototype.inline_signature_type):
3543 (export.default.LowLevelBinary.prototype.block_type): Deleted.
3545 * wasm/js-api/test_basic_api.js:
3546 * wasm/self-test/test_BuilderWebAssembly.js:
3549 * wasm/self-test/test_WASM.js:
3552 2016-12-01 Ryan Haddad <ryanhaddad@apple.com>
3554 Skip flaky test ChakraCore/test/fieldopts/objtypespec-newobj-invalidation.1.js
3555 https://bugs.webkit.org/show_bug.cgi?id=162567
3557 Reviewed by Saam Barati.
3561 2016-12-01 Keith Miller <keith_miller@apple.com>
3563 Add wasm int to floating point opcodes
3564 https://bugs.webkit.org/show_bug.cgi?id=165252
3566 Reviewed by Geoffrey Garen.
3568 Add tests for Wasm integral to floating point conversion opcodes.
3570 * wasm/function-tests/int-to-floating-point.js: Added.
3573 2016-12-01 Geoffrey Garen <ggaren@apple.com>
3575 Land a test case for <rdar://problem/27889416>
3576 https://bugs.webkit.org/show_bug.cgi?id=165272
3578 Reviewed by Saam Barati.
3580 * stress/marked-argument-buffer.js: Added.
3585 2016-11-29 Per Arne Vollan <pvollan@apple.com>
3587 [Win] Skip failing JSC tests.
3588 https://bugs.webkit.org/show_bug.cgi?id=165140
3590 Reviewed by Mark Lam.
3593 * microbenchmarks/tan.js:
3595 2016-11-30 JF Bastien <jfbastien@apple.com>
3597 WebAssembly builder: don't throw when checker not implemented
3598 https://bugs.webkit.org/show_bug.cgi?id=165219
3600 Reviewed by Mark Lam.
3602 We should perform whichever checks we've implemented, and assume the rest are OK until bug #163421 is fixed.
3606 * wasm/function-tests/add-12.js:
3607 * wasm/function-tests/br-if-loop-less-than.js:
3608 * wasm/function-tests/brTableAsIf.js:
3609 * wasm/function-tests/brTableManyValues.js:
3610 * wasm/function-tests/brTableWithLoop.js:
3611 * wasm/function-tests/dumb-eq-if-then-else.js:
3612 * wasm/function-tests/dumb-less-than-fallthrough.js:
3613 * wasm/function-tests/dumb-less-than-ite.js:
3614 * wasm/function-tests/eqz.js:
3615 * wasm/function-tests/factorial.js:
3616 * wasm/function-tests/float-sub.js:
3617 * wasm/function-tests/i32-load.js:
3618 * wasm/function-tests/i32-load8-s.js:
3619 * wasm/function-tests/if-then-else-fallthrough.js:
3620 * wasm/function-tests/if-then-fallthrough.js:
3621 * wasm/function-tests/loop-mult.js:
3622 * wasm/function-tests/loop-sum.js:
3623 * wasm/function-tests/max.js:
3624 * wasm/function-tests/min.js:
3625 * wasm/function-tests/ret5.js:
3626 * wasm/function-tests/select.js:
3627 * wasm/self-test/test_BuilderJSON.js:
3629 2016-11-29 JF Bastien <jfbastien@apple.com>
3631 WebAssembly JS API: improve Instance
3632 https://bugs.webkit.org/show_bug.cgi?id=164757
3634 Reviewed by Keith Miller.
3636 An Instance's `exports` property wasn't populated with exports.
3638 A follow-up patch will do imports.
3640 A few things of note:
3642 - LowLevelBinary: support 3-byte integers.
3643 - LowLevelBinary: support proper UTF-8 2003 code points (instead of UTF-16).
3646 * wasm/Builder_WebAssemblyBinary.js: wire up exports, stub other things out some more
3647 (const.emitters.Export):
3648 * wasm/LowLevelBinary.js:
3649 (export.default.LowLevelBinary.prototype.uint24): add, used for UTF-8
3650 (export.default.LowLevelBinary.prototype.string): support UTF-8
3651 (export.default.LowLevelBinary.prototype.getUint24): add, used for UTF-8
3652 (export.default.LowLevelBinary.prototype.getVaruint1): was missing
3653 (export.default.LowLevelBinary.prototype.getString): support UTF-8
3654 (export.default.LowLevelBinary):
3655 * wasm/js-api/test_Instance.js: instance.exports.answer() // <-- this is where the magic of this entire patch is
3656 (ExportedAnswerI32):
3657 * wasm/js-api/test_basic_api.js: punt test to later
3658 (const.c.in.constructorProperties.switch):
3659 * wasm/self-test/test_BuilderWebAssembly.js: UTF-8
3661 * wasm/self-test/test_LowLevelBinary_string.js: UTF-8 now works
3662 * wasm/self-test/test_LowLevelBinary_uint16.js: was missing one value
3663 * wasm/self-test/test_LowLevelBinary_uint24.js: Copied from JSTests/wasm/self-test/test_LowLevelBinary_uint8.js.
3664 * wasm/self-test/test_LowLevelBinary_uint8.js: was missing one value
3665 * wasm/self-test/test_LowLevelBinary_varuint1.js: Added.
3666 * wasm/utilities.js: this `dump` thing was useful
3669 2016-11-29 Saam Barati <sbarati@apple.com>
3671 We should be able optimize the pattern where we spread a function's rest parameter to another call
3672 https://bugs.webkit.org/show_bug.cgi?id=163865
3674 Reviewed by Filip Pizlo.
3676 * microbenchmarks/default-derived-constructor.js: Added.
3677 (createClassHierarchy.let.currentClass):
3678 (createClassHierarchy):
3679 * stress/call-varargs-spread.js: Added.
3683 * stress/load-varargs-on-new-array-with-spread-convert-to-static-loads.js: Added.
3688 * stress/new-array-with-spread-with-normal-spread-and-phantom-spread.js: Added.
3693 * stress/phantom-new-array-with-spread-osr-exit.js: Added.
3699 * stress/phantom-spread-forward-varargs.js: Added.
3715 * stress/phantom-spread-osr-exit.js: Added.
3721 * stress/spread-call-convert-to-static-call.js: Added.
3726 * stress/spread-forward-call-varargs-stack-overflow.js: Added.
3731 * stress/spread-forward-varargs-rest-parameter-change-iterator-protocol-2.js: Added.
3733 (baz.Array.prototype.Symbol.iterator):