1 2017-01-14 Yusuke Suzuki <utatane.tea@gmail.com>
3 Reserve capacity for StringBuilder in unescape
4 https://bugs.webkit.org/show_bug.cgi?id=167008
6 Reviewed by Sam Weinig.
8 * stress/unescape.js: Added.
11 2017-01-12 Saam Barati <sbarati@apple.com>
13 Add a slice intrinsic to the DFG/FTL
14 https://bugs.webkit.org/show_bug.cgi?id=166707
15 <rdar://problem/29913445>
17 Reviewed by Filip Pizlo.
19 * stress/array-slice-intrinsic.js: Added.
24 * stress/array-slice-jettison-on-constructor-change.js: Added.
28 (addRandomProperties):
30 * stress/array-slice-osr-exit-2.js: Added.
36 (addRandomProperties):
38 * stress/array-slice-osr-exit.js: Added.
44 (addRandomProperties):
47 2017-01-11 Ryan Haddad <ryanhaddad@apple.com>
49 Mark es6/typed_arrays_correct_prototype_chains.js as failing after r210570.
50 https://bugs.webkit.org/show_bug.cgi?id=166931i
52 Unreviewed test gardening.
56 2017-01-10 Commit Queue <commit-queue@webkit.org>
58 Unreviewed, rolling out r210052.
59 https://bugs.webkit.org/show_bug.cgi?id=166915
61 "breaks web compatability" (Requested by keith_miller on
66 "Add support for global"
67 https://bugs.webkit.org/show_bug.cgi?id=165171
68 http://trac.webkit.org/changeset/210052
70 2017-01-10 Mark Lam <mark.lam@apple.com>
72 Property setters should not be called for bound arguments list entries.
73 https://bugs.webkit.org/show_bug.cgi?id=165631
75 Reviewed by Filip Pizlo.
77 * stress/property-setters-should-not-be-called-for-bound-arguments-list-entries.js: Added.
79 2017-01-10 Skachkov Oleksandr <gskachkov@gmail.com>
81 Calling async arrow function which is in a class's member function will cause error
82 https://bugs.webkit.org/show_bug.cgi?id=166879
84 Reviewed by Saam Barati.
86 * stress/async-arrow-functions-lexical-binding-in-class.js: Added.
89 (BaseClass.prototype.baseClassValue):
90 (BaseClass.prototype.get property):
93 (ChildClass.prototype.classValue):
94 (ChildClass.prototype.get classProperty):
95 (ChildClass.prototype.asyncValueExp):
96 (ChildClass.prototype.asyncValueBody):
97 (ChildClass.prototype.asyncThisPropExp):
98 (ChildClass.prototype.asyncThisPropBody):
99 (ChildClass.prototype.asyncThisPropInEvalExp):
100 (ChildClass.prototype.asyncThisPropInEvalBody):
101 (ChildClass.prototype.asyncThisValueExp):
102 (ChildClass.prototype.asyncThisValueBody):
103 (ChildClass.prototype.asyncThisValueInEvalExp):
104 (ChildClass.prototype.asyncThisValueInEvalBody):
107 (ChildClass2.prototype.classValue):
108 (ChildClass2.prototype.get classProperty):
109 * stress/async-arrow-functions-lexical-super-binding.js:
111 2017-01-09 Yusuke Suzuki <utatane.tea@gmail.com>
113 [JSC] Prototype dynamic-import
114 https://bugs.webkit.org/show_bug.cgi?id=165724
116 Reviewed by Saam Barati.
118 * stress/import-basic.js: Added.
122 * stress/import-from-eval.js: Added.
125 * stress/import-syntax.js: Added.
127 * stress/import-tests/cocoa.js: Added.
130 * stress/import-tests/multiple.js: Added.
132 * stress/import-tests/multiple2.js: Added.
134 * stress/import-tests/should.js: Added.
136 (export.shouldThrow):
137 * stress/modules-syntax-error.js:
139 2017-01-09 Commit Queue <commit-queue@webkit.org>
141 Unreviewed, rolling out r210476.
142 https://bugs.webkit.org/show_bug.cgi?id=166859
144 "4% JSBench regression" (Requested by keith_mi_ on #webkit).
148 "Add a slice intrinsic to the DFG/FTL"
149 https://bugs.webkit.org/show_bug.cgi?id=166707
150 http://trac.webkit.org/changeset/210476
152 2017-01-06 Saam Barati <sbarati@apple.com>
154 Add a slice intrinsic to the DFG/FTL
155 https://bugs.webkit.org/show_bug.cgi?id=166707
157 Reviewed by Filip Pizlo.
159 * stress/array-slice-intrinsic.js: Added.
164 * stress/array-slice-jettison-on-constructor-change.js: Added.
168 (addRandomProperties):
170 * stress/array-slice-osr-exit-2.js: Added.
176 (addRandomProperties):
178 * stress/array-slice-osr-exit.js: Added.
184 (addRandomProperties):
187 2017-01-06 Michael Saboff <msaboff@apple.com>
189 @putByValDirect in Array.of and Array.from overwrites non-writable/configurable properties
190 https://bugs.webkit.org/show_bug.cgi?id=153486
192 Reviewed by Saam Barati.
196 * stress/regress-153486.js: Added.
198 (makeUnwriteableUnconfigurableObject):
203 2016-12-30 Filip Pizlo <fpizlo@apple.com>
205 DeferGC::~DeferGC should be super cheap
206 https://bugs.webkit.org/show_bug.cgi?id=166626
208 Reviewed by Saam Barati.
210 * stress/slow-path-generator-updating-current-node-dfg.js:
211 * stress/unshift-array-storage.js:
213 2017-01-04 JF Bastien <jfbastien@apple.com>
215 WebAssembly: sections with the same name are allowed
216 https://bugs.webkit.org/show_bug.cgi?id=166708
218 Reviewed by Saam Barati.
220 * wasm/self-test/test_BuilderJSON.js:
221 (SectionsWithSameCustomName):
223 2017-01-04 Saam Barati <sbarati@apple.com>
225 stress/spread-calling.js timing out on the bots
226 https://bugs.webkit.org/show_bug.cgi?id=166689
227 <rdar://problem/29779182>
229 Reviewed by Mark Lam.
231 * stress/spread-calling.js:
233 2017-01-04 JF Bastien <jfbastien@apple.com>
235 WebAssembly JS API: add Module.sections
236 https://bugs.webkit.org/show_bug.cgi?id=165159
237 <rdar://problem/29760326>
239 Reviewed by Mark Lam.
241 As described here: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymodulecustomsections
243 * wasm/Builder.js: allow custom sections to be duplicated
244 * wasm/js-api/Module.customSection.js: Added.
245 (assert.throws.WebAssembly.Module.prototype.customSections):
248 2017-01-04 Saam Barati <sbarati@apple.com>
250 We don't properly handle exceptions inside the nativeCallTrampoline macro in the LLInt
251 https://bugs.webkit.org/show_bug.cgi?id=163720
253 Reviewed by Mark Lam.
255 * stress/bound-function-tail-call-with-exception.js: Added.
260 2017-01-03 JF Bastien <jfbastien@apple.com>
262 WebAssembly JS API: check and test in-call / out-call values
263 https://bugs.webkit.org/show_bug.cgi?id=164876
264 <rdar://problem/29844107>
266 Reviewed by Saam Barati.
269 * wasm/assert.js: add an assert for NaN comparison
270 * wasm/fuzz/export-function.js: Added. Generate random wasm export
271 signatures, and call them with random parameters.
272 (const.paramExporter):
274 (const.types.generate):
276 * wasm/js-api/export-arity.js: Added.
277 (const.paramExporter): Test that mismatched arities when JS calls
278 wasm follow the defined semantics: i32 is 0, f32 / f64 are NaN.
279 https://github.com/WebAssembly/design/blob/master/JS.md#exported-function-exotic-objects
280 * wasm/js-api/export-void-is-undef.js: Added. Test that "void"
281 wasm functions return "undefined" in JS.
283 2017-01-02 JF Bastien <jfbastien@apple.com>
285 WebAssembly: handle and optimize wasm export → wasm import calls
286 https://bugs.webkit.org/show_bug.cgi?id=165282
288 Reviewed by Saam Barati.
290 * wasm/Builder.js: Add a Proxy to Builder.js, which intercepts
291 unknown property lookups. This creates way better error messages
292 on typos than 'undefined is not a function', which happens
293 semi-frequently as I typo opcode names (and which one is a typo is
294 hard to find because we chain builders).
295 (const._isValidValue):
297 (const._importFunctionContinuation):
298 (const._importMemoryContinuation):
299 (const._importTableContinuation):
300 (const._exportFunctionContinuation):
301 (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
302 (export.default.Builder.prototype._registerSectionBuilders.this.Unknown):
303 * wasm/LowLevelBinary.js: Add limited support for var{u}int64 (only the 32-bit values)
304 (export.default.LowLevelBinary.prototype.varint32):
305 (export.default.LowLevelBinary.prototype.varuint64):
306 (export.default.LowLevelBinary.prototype.varint64):
307 * wasm/function-tests/exceptions.js: update error message
308 * wasm/function-tests/trap-load.js: update error message
309 * wasm/function-tests/trap-store.js: update error message
310 * wasm/js-api/wasm-to-wasm-bad-signature.js: Added. Test a bunch of bad wasm->wasm import signatures
311 (const.makeImportee.signature.switch):
312 (BadSignatureDropStartParams):
313 * wasm/js-api/wasm-to-wasm.js: Added. Test 64-bit wasm->wasm import calls
314 (const.callerModule):
315 (const.calleeModule):
318 2017-01-02 Saam Barati <sbarati@apple.com>
320 WebAssembly: Some loads don't take into account the offset
321 https://bugs.webkit.org/show_bug.cgi?id=166616
322 <rdar://problem/29841541>
324 Reviewed by Keith Miller.
326 * wasm/function-tests/load-offset.js: Added.
328 2016-12-29 Saam Barati <sbarati@apple.com>
330 WebAssembly: Rebase spec-tests now that wabt has been updated to produce certain kinds of invalid modules
331 https://bugs.webkit.org/show_bug.cgi?id=166491
332 <rdar://problem/29814999>
334 Reviewed by Yusuke Suzuki.
336 Based off these revisions:
337 - spec: b055d01ea1dfdd7a5231ae779095435f836de97f
338 - wabt: d0d44702c753f851b094615298a2f4d4e3c21035
340 The reason for the rebase is that wabt was updated to stop
341 silently rejecting invalid modules. This was needed because
342 some of the spec tests check to make sure that the module
343 is invalid, but wabt was silently ignoring the errors and
344 generating valid modules:
345 https://github.com/WebAssembly/wabt/issues/256
348 * wasm/spec-tests/address.wast.js:
349 * wasm/spec-tests/binary.wast.js:
350 * wasm/spec-tests/block.wast.js:
351 * wasm/spec-tests/br.wast.js:
352 * wasm/spec-tests/br_if.wast.js:
353 * wasm/spec-tests/br_table.wast.js:
354 * wasm/spec-tests/break-drop.wast.js:
355 * wasm/spec-tests/call.wast.js:
356 * wasm/spec-tests/call_indirect.wast.js:
357 * wasm/spec-tests/comments.wast.js:
358 * wasm/spec-tests/conversions.wast.js:
359 * wasm/spec-tests/custom_section.wast.js:
360 * wasm/spec-tests/endianness.wast.js:
361 * wasm/spec-tests/exports.wast.js:
362 * wasm/spec-tests/f32.wast.js:
363 * wasm/spec-tests/f32_cmp.wast.js:
364 * wasm/spec-tests/f64.wast.js:
365 * wasm/spec-tests/f64_cmp.wast.js:
366 * wasm/spec-tests/fac.wast.js:
367 * wasm/spec-tests/float_exprs.wast.js:
368 * wasm/spec-tests/float_literals.wast.js:
369 * wasm/spec-tests/float_memory.wast.js:
370 * wasm/spec-tests/float_misc.wast.js:
371 * wasm/spec-tests/forward.wast.js:
372 * wasm/spec-tests/func.wast.js:
373 * wasm/spec-tests/func_ptrs.wast.js:
374 * wasm/spec-tests/get_local.wast.js:
375 * wasm/spec-tests/globals.wast.js:
376 * wasm/spec-tests/i32.wast.js:
377 * wasm/spec-tests/i64.wast.js:
378 * wasm/spec-tests/imports.wast.js:
379 * wasm/spec-tests/int_exprs.wast.js:
380 * wasm/spec-tests/int_literals.wast.js:
381 * wasm/spec-tests/left-to-right.wast.js:
382 * wasm/spec-tests/linking.wast.js:
383 * wasm/spec-tests/loop.wast.js:
384 * wasm/spec-tests/memory.wast.js:
385 * wasm/spec-tests/memory_redundancy.wast.js:
386 * wasm/spec-tests/memory_trap.wast.js:
387 * wasm/spec-tests/names.wast.js:
388 * wasm/spec-tests/nop.wast.js:
389 * wasm/spec-tests/resizing.wast.js:
390 * wasm/spec-tests/return.wast.js:
391 * wasm/spec-tests/select.wast.js:
392 * wasm/spec-tests/set_local.wast.js:
393 * wasm/spec-tests/skip-stack-guard-page.wast.js:
394 * wasm/spec-tests/stack.wast.js:
395 * wasm/spec-tests/start.wast.js:
396 * wasm/spec-tests/store_retval.wast.js:
397 * wasm/spec-tests/switch.wast.js:
398 * wasm/spec-tests/tee_local.wast.js:
399 * wasm/spec-tests/traps.wast.js:
400 * wasm/spec-tests/typecheck.wast.js:
401 * wasm/spec-tests/unreachable.wast.js:
402 * wasm/spec-tests/unwind.wast.js:
404 2016-12-28 Saam Barati <sbarati@apple.com>
406 WebAssembly: Don't allow duplicate export names
407 https://bugs.webkit.org/show_bug.cgi?id=166490
408 <rdar://problem/29815000>
410 Reviewed by Keith Miller.
413 * wasm/function-tests/invalid-duplicate-export.js: Added.
415 2016-12-28 Saam Barati <sbarati@apple.com>
417 WebAssembly: Implement grow_memory and current_memory
418 https://bugs.webkit.org/show_bug.cgi?id=166448
419 <rdar://problem/29803676>
421 Reviewed by Keith Miller.
423 I rewrote some of the testWasmModuleFunctions that used Memory to use
424 the JS API since the jsc.cpp version can no longer use memory.
427 * wasm/function-tests/add-12.js:
428 (testWasmModuleFunctions):
429 * wasm/function-tests/br-if-loop-less-than.js:
430 (testWasmModuleFunctions):
431 * wasm/function-tests/brTableAsIf.js:
432 (testWasmModuleFunctions):
433 * wasm/function-tests/brTableManyValues.js:
434 (testWasmModuleFunctions):
435 * wasm/function-tests/brTableWithLoop.js:
436 (testWasmModuleFunctions):
437 * wasm/function-tests/dumb-eq-if-then-else.js:
438 * wasm/function-tests/eqz.js:
439 * wasm/function-tests/grow-memory-2.js: Added.
441 (assert.eq.instance.exports.foo):
442 * wasm/function-tests/grow-memory-3.js: Added.
443 * wasm/function-tests/grow-memory-4.js: Added.
445 * wasm/function-tests/grow-memory.js: Added.
446 (binaryShouldNotParse):
450 * wasm/function-tests/i32-load.js:
451 (testWasmModuleFunctions):
452 * wasm/function-tests/i32-load8-s.js:
453 * wasm/function-tests/max.js:
454 * wasm/function-tests/min.js:
455 * wasm/js-api/memory-grow.js: Added.
458 * wasm/js-api/test_memory.js:
461 2016-12-25 Yusuke Suzuki <utatane.tea@gmail.com>
463 Propagate the source origin as much as possible
464 https://bugs.webkit.org/show_bug.cgi?id=166348
466 Reviewed by Darin Adler.
468 * stress/source-origin.js: Added.
471 2016-12-24 Caio Lima <ticaiolima@gmail.com>
473 [test262] Fixing mapped arguments object property test case
474 https://bugs.webkit.org/show_bug.cgi?id=159398
476 Reviewed by Saam Barati.
478 * stress/arguments-bizarre-behaviour-disable-enumerability.js:
479 * stress/arguments-define-property.js: Added.
482 * stress/arguments-non-configurable.js: Added.
484 (tryChangeNonConfigurableDescriptor):
485 (set tryChangeNonConfigurableDescriptor):
486 (tryChangeWritableOfNonConfigurableDescriptor):
489 016-12-20 Caio Lima <ticaiolima@gmail.com>
491 [test262] Fixing mapped arguments object property test case
492 https://bugs.webkit.org/show_bug.cgi?id=159398
496 * stress/arguments-bizarre-behaviour-disable-enumerability.js:
497 * stress/arguments-define-property.js: Added.
500 * stress/arguments-non-configurable.js: Added.
502 (tryChangeNonConfigurableDescriptor):
503 (set tryChangeNonConfigurableDescriptor):
504 (tryChangeWritableOfNonConfigurableDescriptor):
507 2016-12-23 Keith Miller <keith_miller@apple.com>
509 WebAssembly: trap on bad division.
510 https://bugs.webkit.org/show_bug.cgi?id=164786
512 Reviewed by Mark Lam.
514 Also, mark conversions as passing.
519 2016-12-22 Keith Miller <keith_miller@apple.com>
521 WebAssembly: Make spec-tests/f32.wast.js and spec-tests/f64.wast.js pass
522 https://bugs.webkit.org/show_bug.cgi?id=166447
524 Reviewed by Saam Barati.
529 2016-12-22 Saam Barati <sbarati@apple.com>
531 WebAssembly: Make calling Wasm functions that returns or takes an i64 as a parameter an early exception
532 https://bugs.webkit.org/show_bug.cgi?id=166437
533 <rdar://problem/29793949>
535 Reviewed by Keith Miller.
538 * wasm/function-tests/i64-from-js-exceptions.js: Added.
539 (const.imp.import.sideEffects):
540 (assert.throws.instance.exports.foo.valueOf):
542 2016-12-22 Mark Lam <mark.lam@apple.com>
544 De-duplicate finally blocks.
545 https://bugs.webkit.org/show_bug.cgi?id=160168
547 Reviewed by Saam Barati.
549 Re-landing r209952 with a few new tests added in test-finally.js.
551 * stress/deeply-nested-finallys.js: Copied from JSTests/stress/deeply-nested-finallys.js.
552 - Tests many levels of finally nesting. This causes the old code to hang (and
553 crashes eventually) while trying to generate bytecode for the exponentially
554 duplicated finally blocks. The new code completes this test almost instantly.
556 * stress/test-finally.js: Copied from JSTests/stress/test-finally.js.
557 - Tests control flow through various permutations of finally blocks.
559 2016-12-22 Saam Barati <sbarati@apple.com>
561 WebAssembly: Make the spec-tests/address.wast.js test pass
562 https://bugs.webkit.org/show_bug.cgi?id=166429
563 <rdar://problem/29793220>
565 Reviewed by Keith Miller.
569 2016-12-22 Keith Miller <keith_miller@apple.com>
571 WebAssembly: The validator should not allow unused stack entries at the end of a block
572 https://bugs.webkit.org/show_bug.cgi?id=166411
574 Reviewed by Saam Barati.
576 Test cleanup and enable new passing tests.
579 * wasm/function-tests/br-if-as-return.js:
581 2016-12-22 Saam Barati <sbarati@apple.com>
583 WebAssembly: Make the spec-tests/start.wast.js test pass
584 https://bugs.webkit.org/show_bug.cgi?id=166416
585 <rdar://problem/29784532>
587 Reviewed by Yusuke Suzuki.
591 2016-12-21 Keith Miller <keith_miller@apple.com>
593 WebAssembly: Fix decode floating point constants in unreachable code
594 https://bugs.webkit.org/show_bug.cgi?id=166400
596 Reviewed by Saam Barati.
600 2016-12-21 Keith Miller <keith_miller@apple.com>
602 WebAssembly: Allow br, br_if, and br_table to act as a return
603 https://bugs.webkit.org/show_bug.cgi?id=166393
605 Reviewed by Saam Barati.
607 Add tests for breaks acting as returns and fix tests that
608 validate error messages.
610 * wasm/function-tests/br-as-return.js: Added.
611 * wasm/function-tests/br-if-as-return.js: Added.
612 * wasm/function-tests/br-table-as-return.js: Added.
613 * wasm/function-tests/if-no-else-non-void.js:
614 * wasm/function-tests/struct.js: Added.
615 * wasm/js-api/global-error.js:
617 * wasm/js-api/table.js:
620 2016-12-21 Saam Barati <sbarati@apple.com>
622 WebAssembly: Import spec tests
623 https://bugs.webkit.org/show_bug.cgi?id=166395
625 Rubber stamped by Keith Miller.
627 This patch implements the Wasm spec's tests found here:
628 https://github.com/WebAssembly/spec/tree/master/interpreter/test
630 These tests are in .wast s-epxression format. To convert
631 them to JS, I use a script from the wabt library, found here:
632 https://github.com/WebAssembly/wabt/blob/master/test/run-gen-spec-js.py
634 I also added a script that automatically imports the tests as
635 JS files. The inputs to the script is the path to the Wasm spec
636 git repo and the path to the wabt git repo. This will make importing
637 new tests easy in the future.
639 The wasm spec imported is at commit: b055d01ea1dfdd7a5231ae779095435f836de97f
640 The wabt used to do the import is at commit: 622b42dced6d793e9d49e9b1fd1d1524defd1387
643 * wasm/import-spec-tests.rb: Added.
644 * wasm/spec-tests: Added.
645 * wasm/spec-tests/address.wast.js: Added.
651 (assert_soft_invalid):
653 (assert_uninstantiable):
657 * wasm/spec-tests/binary.wast.js: Added.
663 (assert_soft_invalid):
665 (assert_uninstantiable):
669 * wasm/spec-tests/block.wast.js: Added.
675 (assert_soft_invalid):
677 (assert_uninstantiable):
681 * wasm/spec-tests/br.wast.js: Added.
687 (assert_soft_invalid):
689 (assert_uninstantiable):
693 * wasm/spec-tests/br_if.wast.js: Added.
699 (assert_soft_invalid):
701 (assert_uninstantiable):
705 * wasm/spec-tests/br_table.wast.js: Added.
711 (assert_soft_invalid):
713 (assert_uninstantiable):
717 * wasm/spec-tests/break-drop.wast.js: Added.
723 (assert_soft_invalid):
725 (assert_uninstantiable):
729 * wasm/spec-tests/call.wast.js: Added.
735 (assert_soft_invalid):
737 (assert_uninstantiable):
741 * wasm/spec-tests/call_indirect.wast.js: Added.
747 (assert_soft_invalid):
749 (assert_uninstantiable):
753 * wasm/spec-tests/comments.wast.js: Added.
759 (assert_soft_invalid):
761 (assert_uninstantiable):
765 * wasm/spec-tests/conversions.wast.js: Added.
771 (assert_soft_invalid):
773 (assert_uninstantiable):
777 * wasm/spec-tests/custom_section.wast.js: Added.
783 (assert_soft_invalid):
785 (assert_uninstantiable):
789 * wasm/spec-tests/endianness.wast.js: Added.
795 (assert_soft_invalid):
797 (assert_uninstantiable):
801 * wasm/spec-tests/exports.wast.js: Added.
807 (assert_soft_invalid):
809 (assert_uninstantiable):
813 * wasm/spec-tests/f32.wast.js: Added.
819 (assert_soft_invalid):
821 (assert_uninstantiable):
825 * wasm/spec-tests/f32_cmp.wast.js: Added.
831 (assert_soft_invalid):
833 (assert_uninstantiable):
837 * wasm/spec-tests/f64.wast.js: Added.
843 (assert_soft_invalid):
845 (assert_uninstantiable):
849 * wasm/spec-tests/f64_cmp.wast.js: Added.
855 (assert_soft_invalid):
857 (assert_uninstantiable):
861 * wasm/spec-tests/fac.wast.js: Added.
867 (assert_soft_invalid):
869 (assert_uninstantiable):
873 * wasm/spec-tests/float_exprs.wast.js: Added.
879 (assert_soft_invalid):
881 (assert_uninstantiable):
885 * wasm/spec-tests/float_literals.wast.js: Added.
891 (assert_soft_invalid):
893 (assert_uninstantiable):
897 * wasm/spec-tests/float_memory.wast.js: Added.
903 (assert_soft_invalid):
905 (assert_uninstantiable):
909 * wasm/spec-tests/float_misc.wast.js: Added.
915 (assert_soft_invalid):
917 (assert_uninstantiable):
921 * wasm/spec-tests/forward.wast.js: Added.
927 (assert_soft_invalid):
929 (assert_uninstantiable):
933 * wasm/spec-tests/func.wast.js: Added.
939 (assert_soft_invalid):
941 (assert_uninstantiable):
945 * wasm/spec-tests/func_ptrs.wast.js: Added.
951 (assert_soft_invalid):
953 (assert_uninstantiable):
957 * wasm/spec-tests/get_local.wast.js: Added.
963 (assert_soft_invalid):
965 (assert_uninstantiable):
969 * wasm/spec-tests/globals.wast.js: Added.
975 (assert_soft_invalid):
977 (assert_uninstantiable):
981 * wasm/spec-tests/i32.wast.js: Added.
987 (assert_soft_invalid):
989 (assert_uninstantiable):
993 * wasm/spec-tests/i64.wast.js: Added.
999 (assert_soft_invalid):
1000 (assert_unlinkable):
1001 (assert_uninstantiable):
1004 (assert_return_nan):
1005 * wasm/spec-tests/imports.wast.js: Added.
1011 (assert_soft_invalid):
1012 (assert_unlinkable):
1013 (assert_uninstantiable):
1016 (assert_return_nan):
1017 * wasm/spec-tests/int_exprs.wast.js: Added.
1023 (assert_soft_invalid):
1024 (assert_unlinkable):
1025 (assert_uninstantiable):
1028 (assert_return_nan):
1029 * wasm/spec-tests/int_literals.wast.js: Added.
1035 (assert_soft_invalid):
1036 (assert_unlinkable):
1037 (assert_uninstantiable):
1040 (assert_return_nan):
1041 * wasm/spec-tests/left-to-right.wast.js: Added.
1047 (assert_soft_invalid):
1048 (assert_unlinkable):
1049 (assert_uninstantiable):
1052 (assert_return_nan):
1053 * wasm/spec-tests/linking.wast.js: Added.
1059 (assert_soft_invalid):
1060 (assert_unlinkable):
1061 (assert_uninstantiable):
1064 (assert_return_nan):
1065 * wasm/spec-tests/loop.wast.js: Added.
1071 (assert_soft_invalid):
1072 (assert_unlinkable):
1073 (assert_uninstantiable):
1076 (assert_return_nan):
1077 * wasm/spec-tests/memory.wast.js: Added.
1083 (assert_soft_invalid):
1084 (assert_unlinkable):
1085 (assert_uninstantiable):
1088 (assert_return_nan):
1089 * wasm/spec-tests/memory_redundancy.wast.js: Added.
1095 (assert_soft_invalid):
1096 (assert_unlinkable):
1097 (assert_uninstantiable):
1100 (assert_return_nan):
1101 * wasm/spec-tests/memory_trap.wast.js: Added.
1107 (assert_soft_invalid):
1108 (assert_unlinkable):
1109 (assert_uninstantiable):
1112 (assert_return_nan):
1113 * wasm/spec-tests/names.wast.js: Added.
1119 (assert_soft_invalid):
1120 (assert_unlinkable):
1121 (assert_uninstantiable):
1124 (assert_return_nan):
1125 * wasm/spec-tests/nop.wast.js: Added.
1131 (assert_soft_invalid):
1132 (assert_unlinkable):
1133 (assert_uninstantiable):
1136 (assert_return_nan):
1137 * wasm/spec-tests/resizing.wast.js: Added.
1143 (assert_soft_invalid):
1144 (assert_unlinkable):
1145 (assert_uninstantiable):
1148 (assert_return_nan):
1149 * wasm/spec-tests/return.wast.js: Added.
1155 (assert_soft_invalid):
1156 (assert_unlinkable):
1157 (assert_uninstantiable):
1160 (assert_return_nan):
1161 * wasm/spec-tests/select.wast.js: Added.
1167 (assert_soft_invalid):
1168 (assert_unlinkable):
1169 (assert_uninstantiable):
1172 (assert_return_nan):
1173 * wasm/spec-tests/set_local.wast.js: Added.
1179 (assert_soft_invalid):
1180 (assert_unlinkable):
1181 (assert_uninstantiable):
1184 (assert_return_nan):
1185 * wasm/spec-tests/skip-stack-guard-page.wast.js: Added.
1191 (assert_soft_invalid):
1192 (assert_unlinkable):
1193 (assert_uninstantiable):
1196 (assert_return_nan):
1197 * wasm/spec-tests/stack.wast.js: Added.
1203 (assert_soft_invalid):
1204 (assert_unlinkable):
1205 (assert_uninstantiable):
1208 (assert_return_nan):
1209 * wasm/spec-tests/start.wast.js: Added.
1215 (assert_soft_invalid):
1216 (assert_unlinkable):
1217 (assert_uninstantiable):
1220 (assert_return_nan):
1221 * wasm/spec-tests/store_retval.wast.js: Added.
1227 (assert_soft_invalid):
1228 (assert_unlinkable):
1229 (assert_uninstantiable):
1232 (assert_return_nan):
1233 * wasm/spec-tests/switch.wast.js: Added.
1239 (assert_soft_invalid):
1240 (assert_unlinkable):
1241 (assert_uninstantiable):
1244 (assert_return_nan):
1245 * wasm/spec-tests/tee_local.wast.js: Added.
1251 (assert_soft_invalid):
1252 (assert_unlinkable):
1253 (assert_uninstantiable):
1256 (assert_return_nan):
1257 * wasm/spec-tests/traps.wast.js: Added.
1263 (assert_soft_invalid):
1264 (assert_unlinkable):
1265 (assert_uninstantiable):
1268 (assert_return_nan):
1269 * wasm/spec-tests/typecheck.wast.js: Added.
1275 (assert_soft_invalid):
1276 (assert_unlinkable):
1277 (assert_uninstantiable):
1280 (assert_return_nan):
1281 * wasm/spec-tests/unreachable.wast.js: Added.
1287 (assert_soft_invalid):
1288 (assert_unlinkable):
1289 (assert_uninstantiable):
1292 (assert_return_nan):
1293 * wasm/spec-tests/unwind.wast.js: Added.
1299 (assert_soft_invalid):
1300 (assert_unlinkable):
1301 (assert_uninstantiable):
1304 (assert_return_nan):
1306 2016-12-20 Keith Miller <keith_miller@apple.com>
1308 Add support for global
1309 https://bugs.webkit.org/show_bug.cgi?id=165171
1311 Reviewed by Filip Pizlo.
1313 * stress/global.js: Added.
1315 2016-12-20 JF Bastien <jfbastien@apple.com>
1317 WebAssembly API: implement WebAssembly.LinkError
1318 https://bugs.webkit.org/show_bug.cgi?id=165805
1319 <rdar://problem/29747874>
1321 Reviewed by Mark lam.
1323 Update all exception sites which now throw WebAssembly.LinkError.
1325 * wasm/js-api/element-data.js:
1326 * wasm/js-api/element.js:
1328 * wasm/js-api/global-error.js:
1330 * wasm/js-api/table.js:
1332 (new.WebAssembly.Table):
1333 * wasm/js-api/test_Data.js:
1334 * wasm/js-api/test_basic_api.js:
1335 (const.c.in.constructorProperties.switch):
1336 * wasm/js-api/test_memory.js:
1338 (test.testMemImportError): Deleted.
1340 2016-12-20 JF Bastien <jfbastien@apple.com>
1342 WebAssembly: unique function signatures
1343 https://bugs.webkit.org/show_bug.cgi?id=165957
1344 <rdar://problem/29735737>
1346 Reviewed by Saam Barati.
1348 * wasm/function-tests/table-basic.js: FIXME is now addressed,
1349 though instance to instance calls still need work which bug
1350 #165282 will address
1352 * wasm/js-api/unique-signature.js: Added.
1353 (CallIndirectWithDuplicateSignatures):
1355 2016-12-19 Mark Lam <mark.lam@apple.com>
1357 Rolling out r209974 and r209952. They break some websites in mysterious ways. Step 2: Rollout r209952.
1358 https://bugs.webkit.org/show_bug.cgi?id=166049
1362 * stress/deeply-nested-finallys.js: Removed.
1363 * stress/test-finally.js: Removed.
1365 2016-12-19 Saam Barati <sbarati@apple.com>
1367 WebAssembly: Make running Wasm tests take less time by reducing some tests' iteration count and by splitting some tests into different files
1368 https://bugs.webkit.org/show_bug.cgi?id=166017
1370 Reviewed by Yusuke Suzuki.
1372 * wasm/function-tests/trap-load-2.js: Added.
1374 (wasmFrameCountFromError):
1377 * wasm/function-tests/trap-load.js:
1378 (assert.continuation): Deleted.
1379 * wasm/function-tests/trap-store-2.js: Added.
1380 (import.Builder.from.string_appeared_here.assert):
1383 * wasm/function-tests/trap-store.js:
1384 (assert.continuation): Deleted.
1386 * wasm/js-api/test_memory.js:
1389 2016-12-18 Saam Barati <sbarati@apple.com>
1391 WebAssembly: Implement the WebAssembly.compile and WebAssembly.validate
1392 https://bugs.webkit.org/show_bug.cgi?id=165936
1394 Reviewed by Mark Lam.
1396 * wasm/js-api/Module-compile.js: Added.
1397 (async.testPromiseAPI):
1398 * wasm/js-api/test_basic_api.js:
1399 (const.c.in.constructorProperties.switch):
1400 * wasm/js-api/validate.js: Added.
1401 (assert.truthy.WebAssembly.validate.builder.WebAssembly):
1403 2016-12-16 Mark Lam <mark.lam@apple.com>
1405 De-duplicate finally blocks.
1406 https://bugs.webkit.org/show_bug.cgi?id=160168
1408 Reviewed by Keith Miller.
1410 * stress/deeply-nested-finallys.js: Added.
1411 - Tests many levels of finally nesting. This causes the old code to hang (and
1412 crashes eventually) while trying to generate bytecode for the exponentially
1413 duplicated finally blocks. The new code completes this test almost instantly.
1415 * stress/test-finally.js: Added.
1416 - Tests control flow through various permutations of finally blocks.
1418 2016-12-16 Saam Barati <sbarati@apple.com>
1420 WebAssembly: WasmB3IRGenerator should throw exceptions instead of crash
1421 https://bugs.webkit.org/show_bug.cgi?id=165834
1423 Reviewed by Keith Miller.
1425 * wasm/function-tests/exceptions.js: Added.
1426 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
1427 * wasm/function-tests/table-basic.js:
1428 (i.i.42.throw.new.Error):
1430 2016-12-16 Keith Miller <keith_miller@apple.com>
1432 i64.eqz should use an Int64 zero
1433 https://bugs.webkit.org/show_bug.cgi?id=165942
1435 Reviewed by Mark Lam.
1439 2016-12-15 Keith Miller <keith_miller@apple.com>
1441 Fix validation of non-void if blocks with no else
1442 https://bugs.webkit.org/show_bug.cgi?id=165938
1444 Reviewed by Saam Barati.
1446 Add a new failing test and a fix an existing one.
1448 * wasm/function-tests/dead-call.js:
1449 * wasm/function-tests/if-no-else-non-void.js: Added.
1451 2016-12-15 Keith Miller <keith_miller@apple.com>
1453 Wasm should not create empty unlinked callsites
1454 https://bugs.webkit.org/show_bug.cgi?id=165933
1456 Reviewed by Mark Lam.
1458 * wasm/function-tests/dead-call.js: Added.
1460 2016-12-15 JF Bastien <jfbastien@apple.com>
1462 WebAssembly: improve compilation error messages
1463 https://bugs.webkit.org/show_bug.cgi?id=163919
1465 Reviewed by Saam Barati.
1467 Update error messages in these tests.
1468 Use the assert.throws facility in many of them which weren't already.
1470 * wasm/js-api/element.js:
1471 (assert.throws.new.WebAssembly.Module.builder.WebAssembly):
1473 * wasm/js-api/global-error.js:
1474 (assert.throws.new.WebAssembly.Module.bin):
1477 * wasm/js-api/table.js:
1478 (assert.throws.new.WebAssembly.Module.builder.WebAssembly):
1480 (assertBadTableImport):
1481 * wasm/js-api/test_Data.js:
1482 (DataSectionWithoutMemory):
1483 * wasm/js-api/test_Start.js:
1484 (InvalidStartFunctionIndex):
1485 * wasm/js-api/test_basic_api.js:
1486 (const.c.in.constructorProperties.switch):
1488 2016-12-15 JF Bastien <jfbastien@apple.com>
1490 WebAssembly API: improve data section errors
1491 https://bugs.webkit.org/show_bug.cgi?id=165733
1493 Reviewed by Keith Miller.
1495 * wasm/js-api/element-data.js: Added.
1496 (ElementBeforeData.set const):
1497 (ElementBeforeData): check the order of initialization, which is observable on failure
1498 * wasm/js-api/test_Data.js:
1499 (DataSectionWithoutMemory):
1500 (DataSectionOffTheEnd): Deleted.
1501 (DataSectionPartlyOffTheEnd): Deleted.
1502 (DataSectionEmptyOffTheEnd): Deleted.
1503 (DataSectionSeenByStart): Deleted.
1505 2016-12-15 Keith Miller <keith_miller@apple.com>
1507 Fix 64-bit shift family Wasm opcodes
1508 https://bugs.webkit.org/show_bug.cgi?id=165902
1510 Reviewed by Geoffrey Garen.
1512 Add tests for shift family of instructions. Since
1513 we can't generate i64 values to pass to wasm we only compile
1514 the code for those functions. Attempting to generate any i64
1515 code using these instructions would have been enough to cause
1516 the B3 Validation error anyway.
1519 * wasm/function-tests/rotl.js: Added.
1520 * wasm/function-tests/rotr.js: Added.
1521 * wasm/function-tests/shl.js: Added.
1522 * wasm/function-tests/shr-s.js: Added.
1523 * wasm/function-tests/shr-u.js: Added.
1526 2016-12-14 Keith Miller <keith_miller@apple.com>
1528 WebAssembly: test_BuilderJSON.js is broken
1529 https://bugs.webkit.org/show_bug.cgi?id=165893
1531 Reviewed by Michael Saboff.
1534 (const._isValidValue):
1535 * wasm/self-test/test_BuilderJSON.js:
1537 2016-12-14 Keith Miller <keith_miller@apple.com>
1539 Unreviewed, fix test.
1541 * wasm/function-tests/i32-const.js:
1543 2016-12-14 Keith Miller <keith_miller@apple.com>
1545 Wasm should decode constants correctly
1546 https://bugs.webkit.org/show_bug.cgi?id=165886
1548 Reviewed by Saam Barati.
1551 (const._isValidValue):
1552 * wasm/Builder_WebAssemblyBinary.js:
1554 * wasm/LowLevelBinary.js:
1555 (export.default.LowLevelBinary.prototype.float):
1556 (export.default.LowLevelBinary.prototype.double):
1557 * wasm/function-tests/f32-const.js: Added.
1558 * wasm/function-tests/f64-const.js: Added.
1559 * wasm/function-tests/i32-const.js: Added.
1562 2016-12-14 Saam Barati <sbarati@apple.com>
1564 WebAssembly: Add various low hanging fruit that will allow us to run the LLVM torture tests in Wasm
1565 https://bugs.webkit.org/show_bug.cgi?id=165883
1567 Reviewed by Keith Miller.
1570 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
1571 * wasm/Builder_WebAssemblyBinary.js:
1572 (const.emitters.Export):
1573 * wasm/js-api/table.js:
1577 * wasm/js-api/test_memory.js:
1578 (binaryShouldNotParse):
1580 (test.testMemImportError):
1584 2016-12-14 Filip Pizlo <fpizlo@apple.com>
1586 DirectTailCall implementation needs to tell the shuffler what to put into the ArgumentCount explicitly
1587 https://bugs.webkit.org/show_bug.cgi?id=165882
1589 Reviewed by Mark Lam.
1591 * stress/direct-tail-call-arity-mismatch-count-args.js: Added.
1595 2016-12-14 Keith Miller <keith_miller@apple.com>
1597 WebAssembly JS API: implement Global
1598 https://bugs.webkit.org/show_bug.cgi?id=164133
1600 Reviewed by Saam Barati.
1603 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
1604 * wasm/Builder_WebAssemblyBinary.js:
1605 (const.valueType.WASM.description.type.i32.type.const.putGlobalType):
1607 (const.putInitExpr):
1608 (const.emitters.Import):
1609 (const.emitters.Global):
1610 (const.emitters.Export):
1611 (const.emitters.Code):
1612 * wasm/LowLevelBinary.js:
1613 (export.default.LowLevelBinary.prototype.varuint32):
1614 (export.default.LowLevelBinary.prototype.varint32):
1615 * wasm/js-api/global-error.js: Added.
1618 * wasm/js-api/global-external-init-from-import.js: Added.
1619 * wasm/js-api/global-internal-init-from-import.js: Added.
1620 * wasm/js-api/global-mutate.js: Added.
1621 (createInternalGlobalModule):
1622 * wasm/js-api/globals-export.js: Added.
1623 * wasm/js-api/globals-import.js: Added.
1626 2016-12-13 Saam Barati <sbarati@apple.com>
1628 WebAssembly: implement the elements section
1629 https://bugs.webkit.org/show_bug.cgi?id=165715
1631 Reviewed by Keith Miller.
1634 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
1635 (export.default.Builder.prototype._registerSectionBuilders.switch):
1636 * wasm/Builder_WebAssemblyBinary.js:
1637 (const.emitters.Element):
1638 * wasm/function-tests/basic-element.js: Added.
1639 * wasm/js-api/element.js: Added.
1641 (assertBadBinary.badInstantiation):
1643 2016-12-13 Saam Barati <sbarati@apple.com>
1645 WebAssembly: implement the table section and table import
1646 https://bugs.webkit.org/show_bug.cgi?id=165716
1648 Reviewed by Keith Miller.
1651 (const._importMemoryContinuation):
1652 (const._importTableContinuation):
1653 (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
1654 (const._importMemoryContinuation.section): Deleted.
1656 (const._importMemoryContinuation.assert): Deleted.
1657 * wasm/Builder_WebAssemblyBinary.js:
1658 (const.putResizableLimits):
1660 (const.emitters.Import):
1661 (const.emitters.Table):
1662 * wasm/function-tests/call-indirect-params.js:
1663 * wasm/function-tests/call-indirect.js:
1664 * wasm/function-tests/table-basic-2.js: Added.
1665 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
1667 * wasm/function-tests/table-basic.js: Added.
1668 (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
1669 * wasm/js-api/call-indirect-results.js:
1670 (const.wasmModuleWhichImportJS): Deleted.
1671 (MonomorphicImport): Deleted.
1672 * wasm/js-api/call-indirect.js:
1673 (const.wasmModuleWhichImportJS):
1677 (MonomorphicImport): Deleted.
1678 * wasm/js-api/table.js: Added.
1682 (assertBadTableImport):
1683 (assertBadBinary.assertBadTableInstance):
1684 (assertBadTableInstance):
1685 (new.WebAssembly.Table):
1686 * wasm/js-api/test_basic_api.js:
1687 (const.c.in.constructorProperties.switch):
1689 2016-12-13 Commit Queue <commit-queue@webkit.org>
1691 Unreviewed, rolling out r209725.
1692 https://bugs.webkit.org/show_bug.cgi?id=165811
1694 "Broke ARMv7 builds" (Requested by msaboff on #webkit).
1698 "REGRESSION(r209653): speedometer crashes making virtual slow
1700 https://bugs.webkit.org/show_bug.cgi?id=165748
1701 http://trac.webkit.org/changeset/209725
1703 2016-12-12 Michael Saboff <msaboff@apple.com>
1705 REGRESSION(r209653): speedometer crashes making virtual slow path tailcalls
1706 https://bugs.webkit.org/show_bug.cgi?id=165748
1708 Reviewed by Filip Pizlo.
1710 New regression test.
1712 * stress/regress-165748.js: Added.
1722 2016-12-12 Mark Lam <mark.lam@apple.com>
1724 Debug JSC test timeout: stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js.ftl-no-cjit.
1725 https://bugs.webkit.org/show_bug.cgi?id=164630
1727 Reviewed by Keith Miller.
1729 Speculative fix for timeout issue. It looks like this test just runs a bit
1730 slower on debug builds. So, we'll give it a little more time to run.
1732 * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
1734 2016-12-11 Saam Barati <sbarati@apple.com>
1736 We should be able to throw exceptions from Wasm code and when Wasm frames are on the stack
1737 https://bugs.webkit.org/show_bug.cgi?id=165429
1739 Reviewed by Keith Miller.
1741 * wasm/function-tests/trap-load.js: Added.
1743 (wasmFrameCountFromError):
1745 (assert.continuation):
1746 * wasm/function-tests/trap-store.js: Added.
1747 (import.Builder.from.string_appeared_here.assert):
1749 (assert.continuation):
1751 * wasm/js-api/test_memory_constructor.js:
1754 2016-12-10 Commit Queue <commit-queue@webkit.org>
1756 Unreviewed, rolling out r209653, r209654, r209663, and
1758 https://bugs.webkit.org/show_bug.cgi?id=165739
1760 speedometer crashes (Requested by pizlo on #webkit).
1762 Reverted changesets:
1764 "JSVALUE64: Pass arguments in platform argument registers when
1765 making JavaScript calls"
1766 https://bugs.webkit.org/show_bug.cgi?id=160355
1767 http://trac.webkit.org/changeset/209653
1769 "Unreviewed build fix for 32 bit builds."
1770 http://trac.webkit.org/changeset/209654
1772 "Unreviewed build fix for the CLOOP after r209653"
1773 http://trac.webkit.org/changeset/209663
1775 "REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()"
1776 https://bugs.webkit.org/show_bug.cgi?id=165728
1777 http://trac.webkit.org/changeset/209673
1779 2016-12-10 Michael Saboff <msaboff@apple.com>
1781 REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()
1782 https://bugs.webkit.org/show_bug.cgi?id=165728
1784 Reviewed by Filip Pizlo.
1786 New regression test.
1788 * stress/regress-165728.js: Added.
1794 2016-12-10 Keith Miller <keith_miller@apple.com>
1796 Fix indirect_call if the result type is used.
1797 https://bugs.webkit.org/show_bug.cgi?id=165727
1799 Reviewed by Michael Saboff.
1801 * wasm/js-api/call-indirect-results.js: Added.
1802 (const.wasmModuleWhichImportJS):
1803 (MonomorphicImport):
1805 2016-12-10 Yusuke Suzuki <utatane.tea@gmail.com>
1807 [JSC] Module namespace object behaves like immutable prototype exotic object
1808 https://bugs.webkit.org/show_bug.cgi?id=165598
1810 Reviewed by Mark Lam.
1812 * modules/namespace-prototype-assignment.js: Added.
1819 (doInternalSetPrototypeOf):
1820 (ordinarySetPrototypeOf):
1821 (setImmutablePrototype):
1822 (windowProxySetPrototypeOf):
1823 (initSetterExpectation):
1824 (throwIfNoExceptionPending):
1825 (objectSetPrototypeOf):
1826 (setUnderscoreProto):
1827 (reflectSetPrototypeOf):
1829 (newObjectProto.toString):
1833 * modules/namespace-set-prototype-of.js: Added.
1835 (TypeError.Cannot.set prototype):
1837 2016-12-09 Michael Saboff <msaboff@apple.com>
1839 JSVALUE64: Pass arguments in platform argument registers when making JavaScript calls
1840 https://bugs.webkit.org/show_bug.cgi?id=160355
1842 Reviewed by Filip Pizlo.
1844 New microbenchmarks to measure call type performance.
1846 * microbenchmarks/calling-computed-args.js: Added.
1847 * microbenchmarks/calling-many-callees.js: Added.
1848 * microbenchmarks/calling-one-callee-fixed.js: Added.
1849 * microbenchmarks/calling-one-callee.js: Added.
1850 * microbenchmarks/calling-poly-callees.js: Added.
1851 * microbenchmarks/calling-poly-extra-arity-callees.js: Added.
1852 * microbenchmarks/calling-tailcall.js: Added.
1853 * microbenchmarks/calling-virtual-arity-fixup-callees.js: Added.
1854 * microbenchmarks/calling-virtual-arity-fixup-stackargs.js: Added.
1855 * microbenchmarks/calling-virtual-callees.js: Added.
1856 * microbenchmarks/calling-virtual-extra-arity-callees.js: Added.
1858 2016-12-09 Keith Miller <keith_miller@apple.com>
1860 Wasm should support call_indirect
1861 https://bugs.webkit.org/show_bug.cgi?id=165718
1863 Reviewed by Filip Pizlo.
1866 * wasm/function-tests/call-indirect-params.js: Added.
1867 * wasm/function-tests/call-indirect.js: Added.
1868 * wasm/js-api/call-indirect.js: Added.
1869 (const.wasmModuleWhichImportJS):
1870 (MonomorphicImport):
1875 2016-12-09 JF Bastien <jfbastien@apple.com>
1877 WebAssembly: implement data section
1878 https://bugs.webkit.org/show_bug.cgi?id=165696
1880 Reviewed by Keith Miller.
1882 As specified in https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#data-section
1883 Note that some of the interesting corner cases are ill-defined by the spec: https://github.com/WebAssembly/design/issues/897
1885 * wasm/Builder.js: create a data section from JavaScript
1886 * wasm/Builder_WebAssemblyBinary.js: assemble the data section into the proper binary encoding
1887 (const.emitters.Data):
1888 * wasm/js-api/test_Data.js: Added.
1890 (DataSectionOffTheEnd):
1891 (DataSectionPartlyOffTheEnd):
1892 (DataSectionEmptyOffTheEnd):
1893 (DataSectionSeenByStart):
1894 * wasm/self-test/test_BuilderJSON.js: make sure the JSON structure is fine (this sanity checks before going to binary)
1896 2016-12-09 JF Bastien <jfbastien@apple.com>
1898 WebAssembly JS API: implement start function
1899 https://bugs.webkit.org/show_bug.cgi?id=165150
1901 Reviewed by Saam Barati.
1903 * wasm/Builder.js: allow building a .Start()
1904 * wasm/Builder_WebAssemblyBinary.js:
1905 * wasm/js-api/test_Start.js: Added.
1906 (const.emitters.Start): serialize a start section
1907 * wasm/self-test/test_BuilderJSON.js: validate the start section's content
1909 2016-12-09 Saam Barati <sbarati@apple.com>
1911 WebAssembly JS API: implement importing and defining Memory
1912 https://bugs.webkit.org/show_bug.cgi?id=164134
1914 Reviewed by Keith Miller.
1917 (const._importMemoryContinuation.section):
1918 (const._importMemoryContinuation.assert):
1919 (const._importMemoryContinuation):
1920 (const._exportFunctionContinuation.const): Deleted.
1921 (const._exportFunctionContinuation): Deleted.
1922 * wasm/Builder_WebAssemblyBinary.js:
1923 (const.emitters.Import):
1924 * wasm/js-api/test_basic_api.js:
1925 (const.c.in.constructorProperties.switch):
1926 * wasm/js-api/test_memory.js: Added.
1928 (binaryShouldNotParse):
1930 (test.testMemImportError):
1931 * wasm/js-api/test_memory_constructor.js: Added.
1935 (assert.testInvalidInitial):
1936 (testInvalidInitial.testInvalidMaximum):
1937 (testInvalidInitial):
1938 (testInvalidMaximum):
1939 * wasm/self-test/test_BuilderJSON.js:
1941 2016-12-08 JF Bastien <jfbastien@apple.com>
1943 WebAssembly: JSC::link* shouldn't need a CodeBlock
1944 https://bugs.webkit.org/show_bug.cgi?id=165591
1946 Reviewed by Keith Miller.
1948 test that wasm -> JS works, including the IC
1950 * wasm/js-api/test_Instance.js:
1951 (const.wasmModuleWhichImportJS):
1952 (MonomorphicImport):
1957 2016-12-08 Filip Pizlo <fpizlo@apple.com>
1959 Green the cloop bot by raising this threshold.
1961 * mozilla/js1_5/Array/regress-101964.js:
1963 2016-12-08 JF Bastien <jfbastien@apple.com>
1965 WebAssembly JS API: wire up Instance imports
1966 https://bugs.webkit.org/show_bug.cgi?id=165118
1968 Reviewed by Saam Barati.
1970 * wasm/js-api/test_Instance.js: add the test, disabled for now
1972 2016-12-07 Keith Miller <keith_miller@apple.com>
1974 Add more missing trivial wasm ops.
1975 https://bugs.webkit.org/show_bug.cgi?id=165564
1977 Add tests for drop and tee_local.
1979 Reviewed by Geoffrey Garen.
1981 * wasm/function-tests/drop.js: Added.
1982 * wasm/function-tests/nop.js: Added.
1983 * wasm/function-tests/tee-local.js: Added.
1985 2016-12-06 Keith Miller <keith_miller@apple.com>
1987 Add support for truncation operators
1988 https://bugs.webkit.org/show_bug.cgi?id=165519
1990 Reviewed by Geoffrey Garen.
1992 * wasm/function-tests/i32-trunc-s-f32.js: Added.
1993 * wasm/function-tests/i32-trunc-s-f64.js: Added.
1994 * wasm/function-tests/i32-trunc-u-f32.js: Added.
1995 * wasm/function-tests/i32-trunc-u-f64.js: Added.
1996 * wasm/function-tests/i64-trunc-s-f32.js: Added.
1997 * wasm/function-tests/i64-trunc-s-f64.js: Added.
1998 * wasm/function-tests/i64-trunc-u-f32.js: Added.
1999 * wasm/function-tests/i64-trunc-u-f64.js: Added.
2001 2016-12-06 Mark Lam <mark.lam@apple.com>
2003 Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
2004 https://bugs.webkit.org/show_bug.cgi?id=165227
2005 <rdar://problem/29442665>
2007 Reviewed by Saam Barati.
2009 * stress/get-from-scope-dynamic-onto-proxy.js:
2010 - Updated error message.
2012 * stress/proxy-dont-infinite-loop.js: Removed.
2013 * stress/proxy-json-path.js: Removed.
2014 * stress/rest-parameter-allocation-elimination-watchpoints-6.js: Removed.
2015 - Removed these tests because the issue they are testing relies on being able to
2016 set Object.prototype.__proto__ to something else (which is now not possible).
2018 2016-12-05 Caitlin Potter <caitp@igalia.com>
2020 [JSC] report unexpected token when "async" is followed by identifier
2021 https://bugs.webkit.org/show_bug.cgi?id=165091
2023 Reviewed by Mark Lam.
2025 * stress/bug-165091.js:
2027 2016-12-05 Keith Miller <keith_miller@apple.com>
2029 Add Wasm i64 to i32 conversion.
2030 https://bugs.webkit.org/show_bug.cgi?id=165378
2032 Reviewed by Filip Pizlo.
2034 It turns out the wrap operation is just B3's Trunc.
2038 2016-12-04 Keith Miller <keith_miller@apple.com>
2040 Add support for Wasm ctz and popcnt
2041 https://bugs.webkit.org/show_bug.cgi?id=165369
2043 Reviewed by Saam Barati.
2045 * wasm/function-tests/ctz.js: Added.
2046 * wasm/function-tests/popcnt.js: Added.
2048 2016-12-03 JF Bastien <jfbastien@apple.com>
2050 WebAssembly: update binary format to 0xD version
2051 https://bugs.webkit.org/show_bug.cgi?id=165345
2053 Reviewed by Keith Miller.
2055 As described in the following PR: https://github.com/WebAssembly/design/pull/836
2056 Originally committed in r209175, reverted in r209242, and fixed in r209284.
2059 (const._normalizeFunctionSignature):
2060 * wasm/Builder_WebAssemblyBinary.js:
2061 (const.emitters.Type):
2062 (const.emitters.Code):
2063 * wasm/LowLevelBinary.js:
2064 (export.default.LowLevelBinary.prototype.block_type):
2065 (export.default.LowLevelBinary.prototype.inline_signature_type): Deleted.
2067 * wasm/js-api/test_basic_api.js:
2068 * wasm/self-test/test_BuilderWebAssembly.js:
2071 * wasm/self-test/test_WASM.js:
2074 2016-12-02 Keith Miller <keith_miller@apple.com>
2077 https://bugs.webkit.org/show_bug.cgi?id=165355
2079 Reviewed by Filip Pizlo.
2081 * wasm/function-tests/copysign.js: Added.
2083 2016-12-03 Commit Queue <commit-queue@webkit.org>
2085 Unreviewed, rolling out r209298.
2086 https://bugs.webkit.org/show_bug.cgi?id=165359
2088 broke the build (Requested by smfr on #webkit).
2093 https://bugs.webkit.org/show_bug.cgi?id=165355
2094 http://trac.webkit.org/changeset/209298
2096 2016-12-02 Keith Miller <keith_miller@apple.com>
2099 https://bugs.webkit.org/show_bug.cgi?id=165355
2101 Reviewed by Filip Pizlo.
2103 * wasm/function-tests/copysign.js: Added.
2105 2016-12-02 Keith Miller <keith_miller@apple.com>
2107 Unreviewed, fix git having a breakdown over trying to reland a rollout.
2109 2016-12-02 Keith Miller <keith_miller@apple.com>
2111 Add Wasm floating point nearest and trunc
2112 https://bugs.webkit.org/show_bug.cgi?id=165339
2114 Reviewed by Saam Barati.
2116 * wasm/function-tests/nearest.js: Added.
2117 * wasm/function-tests/trunc.js: Added.
2119 2016-12-02 Caitlin Potter <caitp@igalia.com>
2121 [JSC] add additional bit to JSTokenType bitfield
2122 https://bugs.webkit.org/show_bug.cgi?id=165091
2124 Reviewed by Geoffrey Garen.
2126 * stress/bug-165091.js: Added.
2127 (shouldThrowSyntaxError):
2129 2016-12-02 Commit Queue <commit-queue@webkit.org>
2131 Unreviewed, rolling out r209275 and r209276.
2132 https://bugs.webkit.org/show_bug.cgi?id=165348
2134 "broke the arm build" (Requested by keith_miller on #webkit).
2136 Reverted changesets:
2138 "Add Wasm floating point nearest and trunc"
2139 https://bugs.webkit.org/show_bug.cgi?id=165339
2140 http://trac.webkit.org/changeset/209275
2142 "Unreviewed, forgot to change instruction after renaming."
2143 http://trac.webkit.org/changeset/209276
2145 2016-12-02 Keith Miller <keith_miller@apple.com>
2147 Add Wasm floating point nearest and trunc
2148 https://bugs.webkit.org/show_bug.cgi?id=165339
2150 Reviewed by Filip Pizlo.
2152 * wasm/function-tests/nearest.js: Added.
2153 * wasm/function-tests/trunc.js: Added.
2155 2016-12-02 JF Bastien <jfbastien@apple.com>
2157 WebAssembly: revert patch causing odd breakage
2158 https://bugs.webkit.org/show_bug.cgi?id=165308
2162 Bug #164724 seems to cause build issues which I haven't tracked down yet. WasmOps.h can't be found:
2163 ./Source/JavaScriptCore/wasm/WasmFormat.h:34:10: fatal error: 'WasmOps.h' file not found
2165 It's weird since the file is auto-generated and has been for a while. #164724 merely includes it in WasmFormat.h.
2168 (const._normalizeFunctionSignature):
2169 * wasm/Builder_WebAssemblyBinary.js:
2170 (const.emitters.Type):
2171 (const.emitters.Code):
2172 * wasm/LowLevelBinary.js:
2173 (export.default.LowLevelBinary.prototype.inline_signature_type):
2174 (export.default.LowLevelBinary.prototype.block_type): Deleted.
2176 * wasm/js-api/test_basic_api.js:
2177 * wasm/self-test/test_BuilderWebAssembly.js:
2180 * wasm/self-test/test_WASM.js:
2183 2016-12-01 Ryan Haddad <ryanhaddad@apple.com>
2185 Skip flaky test ChakraCore/test/fieldopts/objtypespec-newobj-invalidation.1.js
2186 https://bugs.webkit.org/show_bug.cgi?id=162567
2188 Reviewed by Saam Barati.
2192 2016-12-01 Keith Miller <keith_miller@apple.com>
2194 Add wasm int to floating point opcodes
2195 https://bugs.webkit.org/show_bug.cgi?id=165252
2197 Reviewed by Geoffrey Garen.
2199 Add tests for Wasm integral to floating point conversion opcodes.
2201 * wasm/function-tests/int-to-floating-point.js: Added.
2204 2016-12-01 Geoffrey Garen <ggaren@apple.com>
2206 Land a test case for <rdar://problem/27889416>
2207 https://bugs.webkit.org/show_bug.cgi?id=165272
2209 Reviewed by Saam Barati.
2211 * stress/marked-argument-buffer.js: Added.
2216 2016-11-29 Per Arne Vollan <pvollan@apple.com>
2218 [Win] Skip failing JSC tests.
2219 https://bugs.webkit.org/show_bug.cgi?id=165140
2221 Reviewed by Mark Lam.
2224 * microbenchmarks/tan.js:
2226 2016-11-30 JF Bastien <jfbastien@apple.com>
2228 WebAssembly builder: don't throw when checker not implemented
2229 https://bugs.webkit.org/show_bug.cgi?id=165219
2231 Reviewed by Mark Lam.
2233 We should perform whichever checks we've implemented, and assume the rest are OK until bug #163421 is fixed.
2237 * wasm/function-tests/add-12.js:
2238 * wasm/function-tests/br-if-loop-less-than.js:
2239 * wasm/function-tests/brTableAsIf.js:
2240 * wasm/function-tests/brTableManyValues.js:
2241 * wasm/function-tests/brTableWithLoop.js:
2242 * wasm/function-tests/dumb-eq-if-then-else.js:
2243 * wasm/function-tests/dumb-less-than-fallthrough.js:
2244 * wasm/function-tests/dumb-less-than-ite.js:
2245 * wasm/function-tests/eqz.js:
2246 * wasm/function-tests/factorial.js:
2247 * wasm/function-tests/float-sub.js:
2248 * wasm/function-tests/i32-load.js:
2249 * wasm/function-tests/i32-load8-s.js:
2250 * wasm/function-tests/if-then-else-fallthrough.js:
2251 * wasm/function-tests/if-then-fallthrough.js:
2252 * wasm/function-tests/loop-mult.js:
2253 * wasm/function-tests/loop-sum.js:
2254 * wasm/function-tests/max.js:
2255 * wasm/function-tests/min.js:
2256 * wasm/function-tests/ret5.js:
2257 * wasm/function-tests/select.js:
2258 * wasm/self-test/test_BuilderJSON.js:
2260 2016-11-29 JF Bastien <jfbastien@apple.com>
2262 WebAssembly JS API: improve Instance
2263 https://bugs.webkit.org/show_bug.cgi?id=164757
2265 Reviewed by Keith Miller.
2267 An Instance's `exports` property wasn't populated with exports.
2269 A follow-up patch will do imports.
2271 A few things of note:
2273 - LowLevelBinary: support 3-byte integers.
2274 - LowLevelBinary: support proper UTF-8 2003 code points (instead of UTF-16).
2277 * wasm/Builder_WebAssemblyBinary.js: wire up exports, stub other things out some more
2278 (const.emitters.Export):
2279 * wasm/LowLevelBinary.js:
2280 (export.default.LowLevelBinary.prototype.uint24): add, used for UTF-8
2281 (export.default.LowLevelBinary.prototype.string): support UTF-8
2282 (export.default.LowLevelBinary.prototype.getUint24): add, used for UTF-8
2283 (export.default.LowLevelBinary.prototype.getVaruint1): was missing
2284 (export.default.LowLevelBinary.prototype.getString): support UTF-8
2285 (export.default.LowLevelBinary):
2286 * wasm/js-api/test_Instance.js: instance.exports.answer() // <-- this is where the magic of this entire patch is
2287 (ExportedAnswerI32):
2288 * wasm/js-api/test_basic_api.js: punt test to later
2289 (const.c.in.constructorProperties.switch):
2290 * wasm/self-test/test_BuilderWebAssembly.js: UTF-8
2292 * wasm/self-test/test_LowLevelBinary_string.js: UTF-8 now works
2293 * wasm/self-test/test_LowLevelBinary_uint16.js: was missing one value
2294 * wasm/self-test/test_LowLevelBinary_uint24.js: Copied from JSTests/wasm/self-test/test_LowLevelBinary_uint8.js.
2295 * wasm/self-test/test_LowLevelBinary_uint8.js: was missing one value
2296 * wasm/self-test/test_LowLevelBinary_varuint1.js: Added.
2297 * wasm/utilities.js: this `dump` thing was useful
2300 2016-11-29 Saam Barati <sbarati@apple.com>
2302 We should be able optimize the pattern where we spread a function's rest parameter to another call
2303 https://bugs.webkit.org/show_bug.cgi?id=163865
2305 Reviewed by Filip Pizlo.
2307 * microbenchmarks/default-derived-constructor.js: Added.
2308 (createClassHierarchy.let.currentClass):
2309 (createClassHierarchy):
2310 * stress/call-varargs-spread.js: Added.
2314 * stress/load-varargs-on-new-array-with-spread-convert-to-static-loads.js: Added.
2319 * stress/new-array-with-spread-with-normal-spread-and-phantom-spread.js: Added.
2324 * stress/phantom-new-array-with-spread-osr-exit.js: Added.
2330 * stress/phantom-spread-forward-varargs.js: Added.
2346 * stress/phantom-spread-osr-exit.js: Added.
2352 * stress/spread-call-convert-to-static-call.js: Added.
2357 * stress/spread-forward-call-varargs-stack-overflow.js: Added.
2362 * stress/spread-forward-varargs-rest-parameter-change-iterator-protocol-2.js: Added.
2364 (baz.Array.prototype.Symbol.iterator):
2369 * stress/spread-forward-varargs-rest-parameter-change-iterator-protocol.js: Added.
2371 (baz.Array.prototype.Symbol.iterator):
2375 * stress/spread-forward-varargs-stack-overflow.js: Added.
2380 2016-11-29 Caitlin Potter <caitp@igalia.com>
2382 [JSC] always wrap AwaitExpression operand in a new Promise
2383 https://bugs.webkit.org/show_bug.cgi?id=165181
2385 Reviewed by Yusuke Suzuki.
2387 * stress/async-await-basic.js:
2388 (async.awaitedPromisesAreWrapped):
2390 2016-11-29 Keith Miller <keith_miller@apple.com>
2392 Add simple way to implement Wasm ops that require more than one B3 opcode
2393 https://bugs.webkit.org/show_bug.cgi?id=165129
2395 Reviewed by Geoffrey Garen.
2397 * wasm/function-tests/eqz.js: Added.
2398 * wasm/function-tests/max.js: Added.
2399 * wasm/function-tests/min.js: Added.
2402 2016-11-21 Yusuke Suzuki <utatane.tea@gmail.com>
2404 Crash in com.apple.JavaScriptCore: WTF::ThreadSpecific<WTF::WTFThreadData, + 142
2405 https://bugs.webkit.org/show_bug.cgi?id=164898
2407 Reviewed by Darin Adler.
2409 * stress/tagged-template-registry-key-collect.js: Added.
2413 * stress/tagged-template-registry-key.js: Added.
2419 2016-11-20 Caitlin Potter <caitp@igalia.com>
2421 [JSC] speed up parsing of async functions
2422 https://bugs.webkit.org/show_bug.cgi?id=164808
2424 Reviewed by Yusuke Suzuki.
2426 Add tests for line terminator following "async" keyword in async
2429 * stress/async-await-syntax.js:
2432 2016-11-19 Mark Lam <mark.lam@apple.com>
2434 op_mod-* JSC tests needs a longer timeout too.
2435 https://bugs.webkit.org/show_bug.cgi?id=164994
2437 Reviewed by Yusuke Suzuki.
2439 * stress/op_mod-ConstVar.js:
2440 * stress/op_mod-VarConst.js:
2441 * stress/op_mod-VarVar.js:
2443 2016-11-19 Mark Lam <mark.lam@apple.com>
2445 Add --timeoutMultiplier option to allow some tests more time to run.
2446 https://bugs.webkit.org/show_bug.cgi?id=164951
2448 Reviewed by Yusuke Suzuki.
2450 Extended the timeout for these tests by 50% more because they run quite slow on
2453 * stress/op_div-ConstVar.js:
2454 * stress/op_div-VarConst.js:
2455 * stress/op_div-VarVar.js:
2457 2016-11-18 Yusuke Suzuki <utatane.tea@gmail.com>
2459 REGRESSION(r208867): JSC test failure: ChakraCore.yaml/ChakraCore/test/strict/05.arguments_sm.js.default
2460 https://bugs.webkit.org/show_bug.cgi?id=164929
2462 Reviewed by Mark Lam.
2464 ES2017 drops arguments.caller and JavaScriptCore is updated to meet the spec.
2465 This patch rebaselines the result of ChakraCore test for JSC.
2467 * ChakraCore/test/strict/05.arguments_sm.baseline-jsc:
2469 2016-11-18 Joseph Pecoraro <pecoraro@apple.com>
2471 Web Inspector: Generator functions should have a displayable name when shown in stack traces
2472 https://bugs.webkit.org/show_bug.cgi?id=164844
2473 <rdar://problem/29300697>
2475 Reviewed by Yusuke Suzuki.
2477 * stress/generator-function-name.js:
2478 Add another test now that we name the inner generator function
2479 that we do not break the lexical resolution of names.
2481 2016-11-17 Yusuke Suzuki <utatane.tea@gmail.com>
2483 [JSC] Drop arguments.caller
2484 https://bugs.webkit.org/show_bug.cgi?id=164859
2486 Reviewed by Saam Barati.
2488 * stress/strict-mode-arguments-caller.js: Added.
2492 2016-11-17 Keith Miller <keith_miller@apple.com>
2495 https://bugs.webkit.org/show_bug.cgi?id=164871
2497 Reviewed by Filip Pizlo.
2501 2016-11-17 Keith Miller <keith_miller@apple.com>
2504 https://bugs.webkit.org/show_bug.cgi?id=164877
2506 Reviewed by Mark Lam.
2508 B3 already has a Sqrt opcode we just need to map Wasm to it.
2512 2016-11-17 Saam Barati <sbarati@apple.com>
2514 Remove async/await compile time flag and enable tests
2515 https://bugs.webkit.org/show_bug.cgi?id=164828
2516 <rdar://problem/28639334>
2518 Reviewed by Yusuke Suzuki.
2520 * stress/async-arrow-functions-lexical-arguments-binding.js:
2521 * stress/async-arrow-functions-lexical-new.target-binding.js:
2522 * stress/async-arrow-functions-lexical-super-binding.js:
2523 * stress/async-arrow-functions-lexical-this-binding.js:
2524 * stress/async-await-basic.js:
2525 * stress/async-await-long-loop.js:
2526 * stress/async-await-module-reserved-word.js:
2527 * stress/async-await-mozilla.js:
2529 * stress/async-await-reserved-word.js:
2530 * stress/async-await-syntax.js:
2531 * stress/async-await-throw-loop.js:
2532 * stress/async-function-create-nobaseline.js:
2533 * stress/async-function-create-optimized.js:
2534 * stress/async-function-declaration-sinking-no-double-allocate.js:
2535 * stress/async-function-declaration-sinking-osrexit.js:
2536 * stress/async-function-declaration-sinking-put.js:
2537 * stress/async-function-expression-sinking-no-double-allocate.js:
2538 * stress/async-function-expression-sinking-osrexit.js:
2539 * stress/async-function-expression-sinking-put.js:
2542 2016-11-15 Mark Lam <mark.lam@apple.com>
2544 Make JSC test functions more robust.
2545 https://bugs.webkit.org/show_bug.cgi?id=164807
2547 Reviewed by Keith Miller.
2549 * stress/jsc-test-functions-should-be-more-robust.js: Added.
2551 2016-11-15 Keith Miller <keith_miller@apple.com>
2553 B3 should support UDiv/UMod
2554 https://bugs.webkit.org/show_bug.cgi?id=164811
2556 Reviewed by Filip Pizlo.
2558 Link new instructions to wasm.
2562 2016-11-15 Saam Barati <sbarati@apple.com>
2564 Debug JSC test timeout: stress/has-own-property-name-cache-symbols-and-strings.js.ftl-no-cjit-small-pool
2565 https://bugs.webkit.org/show_bug.cgi?id=163012
2567 Unreviewed. This patch makes a test run for less time because it's timing out on the bots.
2569 * stress/has-own-property-name-cache-symbols-and-strings.js:
2571 2016-11-15 Mark Lam <mark.lam@apple.com>
2573 The jsc shell's setImpureGetterDelegate() should ensure that the set value is an ImpureGetter.
2574 https://bugs.webkit.org/show_bug.cgi?id=164781
2575 <rdar://problem/28418590>
2577 Reviewed by Geoffrey Garen and Michael Saboff.
2579 * stress/jsc-setImpureGetterDelegate-on-bad-type.js: Added.
2581 2016-11-15 Yusuke Suzuki <utatane.tea@gmail.com>
2583 [DOMJIT] Allow using macro assembler scratches in FTL CheckDOM
2584 https://bugs.webkit.org/show_bug.cgi?id=164727
2586 Reviewed by Filip Pizlo.
2588 * stress/check-dom-with-signature.js: Added.
2593 2016-11-14 Caitlin Potter <caitp@igalia.com>
2595 [JSC] do not reference AwaitExpression Promises in async function Promise chain
2596 https://bugs.webkit.org/show_bug.cgi?id=164753
2598 Reviewed by Yusuke Suzuki.
2600 * asyncFunctionTests.yaml:
2601 * stress/async-await-long-loop.js: Added.
2604 * stress/async-await-throw-loop.js: Added.
2609 2016-11-14 Keith Miller <keith_miller@apple.com>
2612 https://bugs.webkit.org/show_bug.cgi?id=164743
2614 Reviewed by Saam Barati.
2616 * wasm/function-tests/select.js: Added.
2618 2016-11-14 Caitlin Potter <caitp@igalia.com>
2620 [JSC] Handle new_async_func / new_async_func_exp in DFG / FTL
2621 https://bugs.webkit.org/show_bug.cgi?id=164037
2623 Reviewed by Yusuke Suzuki.
2625 Add tests based on tests from https://trac.webkit.org/changeset/194216.
2627 * asyncFunctionTests.yaml:
2628 * stress/async-function-create-nobaseline.js: Added.
2629 * stress/async-function-create-optimized.js: Added.
2630 * stress/async-function-declaration-sinking-no-double-allocate.js: Added.
2631 * stress/async-function-declaration-sinking-osrexit.js: Added.
2632 * stress/async-function-declaration-sinking-put.js: Added.
2633 * stress/async-function-expression-sinking-no-double-allocate.js: Added.
2634 * stress/async-function-expression-sinking-osrexit.js: Added.
2635 * stress/async-function-expression-sinking-put.js: Added.
2637 2016-11-14 Mark Lam <mark.lam@apple.com>
2639 Some of JSStringView::SafeView methods are not idiomatically safe for JSString to StringView conversions.
2640 https://bugs.webkit.org/show_bug.cgi?id=164701
2641 <rdar://problem/27462104>
2643 Reviewed by Darin Adler.
2645 * stress/string-prototype-charCodeAt-on-too-long-rope.js: Added.
2647 2016-11-14 Mark Lam <mark.lam@apple.com>
2649 RegExpObject::exec/match should handle errors gracefully.
2650 https://bugs.webkit.org/show_bug.cgi?id=155145
2651 <rdar://problem/27435934>
2653 Reviewed by Keith Miller.
2655 * stress/regexp-prototype-exec-on-too-long-rope.js: Added.
2656 * stress/regexp-prototype-match-on-too-long-rope.js: Added.
2657 * stress/regexp-prototype-test-on-too-long-rope.js: Added.
2659 2016-11-14 Mark Lam <mark.lam@apple.com>
2661 Enhance run-jsc-stress-test script to allow optional test specific options to be added for all test run configurations.
2662 https://bugs.webkit.org/show_bug.cgi?id=164695
2664 Reviewed by Keith Miller.
2666 Replace use of runMisc* test run configurations with equivalents.
2668 * stress/licm-no-pre-header-nested.js:
2669 * stress/licm-no-pre-header.js:
2670 * stress/licm-pre-header-cannot-exit-nested.js:
2671 * stress/licm-pre-header-cannot-exit.js:
2672 * stress/make-dictionary-repatch.js:
2673 * stress/retry-cache-later.js:
2674 * stress/shadow-chicken-reading-from-scope-after-ftl-osr-exit-bytecode-liveness.js:
2675 * stress/slow-path-generator-updating-current-node-dfg.js:
2676 * stress/unshift-array-storage.js:
2678 2016-11-11 Joseph Pecoraro <pecoraro@apple.com>
2680 test262: DataView with explicit undefined byteLength should be the same as it not being present
2681 https://bugs.webkit.org/show_bug.cgi?id=164453
2683 Reviewed by Darin Adler.
2685 * stress/dataview-construct.js: Added.
2690 2016-11-11 Joseph Pecoraro <pecoraro@apple.com>
2692 test262: DataView get methods should allow for missing offset, set methods should allow for missing value
2693 https://bugs.webkit.org/show_bug.cgi?id=164451
2695 Reviewed by Darin Adler.
2699 2016-11-11 Saam Barati <sbarati@apple.com>
2701 We should have a more concise way of determining when we're varargs calling a function using rest parameters
2702 https://bugs.webkit.org/show_bug.cgi?id=164258
2704 Reviewed by Yusuke Suzuki.
2706 * microbenchmarks/call-using-spread.js: Added.
2709 * microbenchmarks/spread-large-array.js: Added.
2712 * microbenchmarks/spread-small-array.js: Added.
2714 * stress/spread-array-iterator-watchpoint-2.js: Added.
2716 (arrayIterator.next):
2717 * stress/spread-array-iterator-watchpoint.js: Added.
2719 (Array.prototype.Symbol.iterator):
2720 * stress/spread-non-array.js: Added.
2723 (let.customIterator.Symbol.iterator):
2726 2016-11-11 Keith Miller <keith_miller@apple.com>
2728 Relocate wasm tests and actually add them to the test runner
2729 https://bugs.webkit.org/show_bug.cgi?id=164668
2731 Reviewed by Yusuke Suzuki.
2733 This moves the Wasm tests from their current location down a level.
2734 Without relocating, the tests cannot properly be run by the wasm test runner.
2737 * wasm/Builder.js: Fix typos, yay lazy synatx checking!
2738 * wasm/LowLevelBinary.js: Fix typos, yay lazy synatx checking!
2739 (export.default.LowLevelBinary.prototype.get return):
2740 * wasm/function-tests/add-12.js: Renamed from JSTests/wasm/js-api/function-tests/add-12.js.
2741 * wasm/function-tests/br-if-loop-less-than.js: Renamed from JSTests/wasm/js-api/function-tests/br-if-loop-less-than.js.
2742 * wasm/function-tests/brTableAsIf.js: Renamed from JSTests/wasm/js-api/function-tests/brTableAsIf.js.
2743 * wasm/function-tests/brTableManyValues.js: Renamed from JSTests/wasm/js-api/function-tests/brTableManyValues.js.
2744 * wasm/function-tests/brTableWithLoop.js: Renamed from JSTests/wasm/js-api/function-tests/brTableWithLoop.js.
2745 * wasm/function-tests/dumb-eq-if-then-else.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-eq-if-then-else.js.
2746 * wasm/function-tests/dumb-less-than-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-less-than-fallthrough.js.
2747 * wasm/function-tests/dumb-less-than-ite.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-less-than-ite.js.
2748 * wasm/function-tests/factorial.js: Renamed from JSTests/wasm/js-api/function-tests/factorial.js.
2749 * wasm/function-tests/float-sub.js: Renamed from JSTests/wasm/js-api/function-tests/float-sub.js.
2750 * wasm/function-tests/i32-load.js: Renamed from JSTests/wasm/js-api/function-tests/i32-load.js.
2751 * wasm/function-tests/i32-load8-s.js: Renamed from JSTests/wasm/js-api/function-tests/i32-load8-s.js.
2752 * wasm/function-tests/if-then-else-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/if-then-else-fallthrough.js.
2753 * wasm/function-tests/if-then-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/if-then-fallthrough.js.
2754 * wasm/function-tests/loop-mult.js: Renamed from JSTests/wasm/js-api/function-tests/loop-mult.js.
2755 * wasm/function-tests/loop-sum.js: Renamed from JSTests/wasm/js-api/function-tests/loop-sum.js.
2756 * wasm/function-tests/ret5.js: Renamed from JSTests/wasm/js-api/function-tests/ret5.js.
2757 * wasm/self-test/test_BuilderJSON.js: Rebasline
2759 2016-11-11 Keith Miller <keith_miller@apple.com>
2761 Move Wasm tests to JS
2762 https://bugs.webkit.org/show_bug.cgi?id=164611
2764 Reviewed by Geoffrey Garen.
2766 This patch translates most of the tests from testWasm.cpp to the JS testing api. Most of the
2767 ommited tests were earliest tests, which tested trivial things, like adding two
2768 constants. Some tests are ommited for other reasons, however. These are:
2770 1) Tests using I64 since the testing api does not yet know how to handle 64-bit numbers. 2)
2771 Tests that would validate the memory of the module once wasm was done with it since that's
2772 not really possible in JS.
2774 In order to make such a translation easier this patch also adds some features to the JS
2777 1) Blocks can now be done lexically by adding a lambda as the last argument of the block
2778 opcode. For example one can do:
2780 .Block("i32", b => b.I32Const(1) )
2782 and the nested lambda will automatically have an end attached.
2784 2) The JS testing api can now handle inline signature types.
2786 3) Relocate some code to make it easier to follow and prevent 44 space indentation.
2788 4) Rename varuint/varint to varuint32/varint32, this lets them be directly called from the
2789 wasm.json without being remapped.
2791 5) Add support for Memory and Function sections to the Builder.
2793 6) Add support for local variables.
2795 On the JSC side, we needed to expose a new function to validate the compiled wasm code
2796 behaves the way we expect. At least until the JS Wasm API is finished. The new validation
2797 function, testWasmModuleFunctions, takes an array buffer containing the wasm binary, the
2798 number of functions in the blob and tests for each of those functions.
2801 (const._maybeRegisterType):
2803 (switch.typeof): Deleted.
2804 * wasm/Builder_WebAssemblyBinary.js:
2805 (const.emitters.Type):
2806 (const.emitters.Import):
2807 (const.emitters.Function):
2808 (const.emitters.Memory):
2809 (const.emitters.Code):
2810 (export.const.Binary):
2811 * wasm/LowLevelBinary.js:
2812 (export.default.LowLevelBinary.prototype.get return):
2813 (export.default.LowLevelBinary.prototype.varuint32):
2814 (export.default.LowLevelBinary.prototype.varint32):
2815 (export.default.LowLevelBinary.prototype.varuint1):
2816 (export.default.LowLevelBinary.prototype.varint7):
2817 (export.default.LowLevelBinary.prototype.varuint7):
2818 (export.default.LowLevelBinary.prototype.inline_signature_type):
2819 (export.default.LowLevelBinary.prototype.string):
2820 (export.default.LowLevelBinary.prototype.getVaruint32):
2821 (export.default.LowLevelBinary.prototype.getVarint32):
2822 (export.default.LowLevelBinary.prototype.getVaruint7):
2823 (export.default.LowLevelBinary.prototype.getString):
2824 (export.default.LowLevelBinary):
2825 (export.default.LowLevelBinary.prototype.varuint): Deleted.
2826 (export.default.LowLevelBinary.prototype.varint): Deleted.
2827 (export.default.LowLevelBinary.prototype.getVaruint): Deleted.
2828 (export.default.LowLevelBinary.prototype.getVarint): Deleted.
2829 * wasm/js-api/test_old_tests.js: Added.
2832 (brTableManyValues):
2833 (run.brTableManyValues.brTableAsIf):
2834 (ifThenFallthrough):
2835 (ifThenElseFallthrough):
2836 (dumbLessThanFallthrough):
2837 (run.dumbLessThanFallthrough.floatSub):
2838 (run.floatSub.add12):
2839 (run.add12.factorial):
2841 (run.i32load.i32load8s):
2842 (run.i32load8s.dumbEqIfThenElse):
2843 (run.dumbEqIfThenElse.dumbEqIfThenElse):
2844 (run.dumbEqIfThenElse.dumbLessThanIfThenElse):
2845 (run.dumbLessThanIfThenElse.loopSum):
2846 (run.loopSum.loopMult):
2848 (run.brIfLoopLessThan.run):
2849 * wasm/self-test/test_LowLevelBinary_varint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varint.js.
2850 * wasm/self-test/test_LowLevelBinary_varuint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varuint.js.
2853 (const._maybeRegisterType):
2855 (switch.typeof): Deleted.
2856 * wasm/Builder_WebAssemblyBinary.js:
2857 (const.emitters.Type):
2858 (const.emitters.Import):
2859 (const.emitters.Function):
2860 (const.emitters.Memory):
2861 (const.emitters.Code):
2862 (export.const.Binary):
2863 * wasm/LowLevelBinary.js:
2864 (export.default.LowLevelBinary.prototype.get return):
2865 (export.default.LowLevelBinary.prototype.varuint32):
2866 (export.default.LowLevelBinary.prototype.varint32):
2867 (export.default.LowLevelBinary.prototype.varuint1):
2868 (export.default.LowLevelBinary.prototype.varint7):
2869 (export.default.LowLevelBinary.prototype.varuint7):
2870 (export.default.LowLevelBinary.prototype.inline_signature_type):
2871 (export.default.LowLevelBinary.prototype.string):
2872 (export.default.LowLevelBinary.prototype.getVaruint32):
2873 (export.default.LowLevelBinary.prototype.getVarint32):
2874 (export.default.LowLevelBinary.prototype.getVaruint7):
2875 (export.default.LowLevelBinary.prototype.getString):
2876 (export.default.LowLevelBinary):
2877 (export.default.LowLevelBinary.prototype.varuint): Deleted.
2878 (export.default.LowLevelBinary.prototype.varint): Deleted.
2879 (export.default.LowLevelBinary.prototype.getVaruint): Deleted.
2880 (export.default.LowLevelBinary.prototype.getVarint): Deleted.
2881 * wasm/js-api/function-tests/add-12.js: Added.
2882 * wasm/js-api/function-tests/br-if-loop-less-than.js: Added.
2883 * wasm/js-api/function-tests/brTableAsIf.js: Added.
2884 * wasm/js-api/function-tests/brTableManyValues.js: Added.
2885 * wasm/js-api/function-tests/brTableWithLoop.js: Added.
2886 * wasm/js-api/function-tests/dumb-eq-if-then-else.js: Added.
2887 * wasm/js-api/function-tests/dumb-less-than-fallthrough.js: Added.
2888 * wasm/js-api/function-tests/dumb-less-than-ite.js: Added.
2889 * wasm/js-api/function-tests/factorial.js: Added.
2890 * wasm/js-api/function-tests/float-sub.js: Added.
2891 * wasm/js-api/function-tests/i32-load.js: Added.
2892 * wasm/js-api/function-tests/i32-load8-s.js: Added.
2893 * wasm/js-api/function-tests/if-then-else-fallthrough.js: Added.
2894 * wasm/js-api/function-tests/if-then-fallthrough.js: Added.
2895 * wasm/js-api/function-tests/loop-mult.js: Added.
2896 * wasm/js-api/function-tests/loop-sum.js: Added.
2897 * wasm/js-api/function-tests/ret5.js: Added.
2898 * wasm/self-test/test_LowLevelBinary_varint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varint.js.
2899 * wasm/self-test/test_LowLevelBinary_varuint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varuint.js.
2901 2016-11-11 Saam Barati <sbarati@apple.com>
2903 We recursively grab a lock in the DFGBytecodeParser causing us to deadlock
2904 https://bugs.webkit.org/show_bug.cgi?id=164650
2906 Reviewed by Geoffrey Garen.
2908 * stress/dont-dead-lock-put-by-val-as-put-by-id.js: Added.
2913 2016-11-11 Chris Dumez <cdumez@apple.com>
2915 Unreviewed, rolling out r208584.
2917 Seems to have regressed Speedometer by 1% on Mac
2921 "We should have a more concise way of determining when we're
2922 varargs calling a function using rest parameters"
2923 https://bugs.webkit.org/show_bug.cgi?id=164258
2924 http://trac.webkit.org/changeset/208584
2926 2016-11-11 Chris Dumez <cdumez@apple.com>
2928 Unreviewed, rolling out r208117 and r208160.
2930 Regressed Speedometer by >1.5%
2932 Reverted changesets:
2934 "We should have a way of profiling when a get_by_id is pure
2935 and to emit a PureGetById in the DFG/FTL"
2936 https://bugs.webkit.org/show_bug.cgi?id=163305
2937 http://trac.webkit.org/changeset/208117
2939 "Debug JSC test microbenchmarks/pure-get-by-id-cse-2.js timing
2941 https://bugs.webkit.org/show_bug.cgi?id=164227
2942 http://trac.webkit.org/changeset/208160
2944 2016-11-11 Saam Barati <sbarati@apple.com>
2946 We should have a more concise way of determining when we're varargs calling a function using rest parameters
2947 https://bugs.webkit.org/show_bug.cgi?id=164258
2949 Reviewed by Yusuke Suzuki.
2951 * microbenchmarks/call-using-spread.js: Added.
2954 * microbenchmarks/spread-large-array.js: Added.
2957 * microbenchmarks/spread-small-array.js: Added.
2959 * stress/spread-array-iterator-watchpoint-2.js: Added.
2961 (arrayIterator.next):
2962 * stress/spread-array-iterator-watchpoint.js: Added.
2964 (Array.prototype.Symbol.iterator):
2965 * stress/spread-non-array.js: Added.
2968 (let.customIterator.Symbol.iterator):
2971 2016-11-10 Mark Lam <mark.lam@apple.com>
2973 Fix broken have-a-bad-time-with-arguments.js test.
2974 https://bugs.webkit.org/show_bug.cgi?id=164626
2976 Reviewed by Filip Pizlo.
2978 But also saved a copy of the broken one as broken-have-a-bad-time-with-arguments-for-gc-testing.js
2979 because coincidentally, it stresses the GC in ways that help reveal bugs.
2981 * stress/broken-have-a-bad-time-with-arguments-for-gc-testing.js: Added.
2984 (let.argsDeclIndex.in.argumentsDecls.let.indexToReturnIndex.in.indicesToReturn.let.insertElementActionIndex.in.insertElementActions.let.tierWarmupCountIndex.in.tierWarmupCounts.let.testArgsIndex.in.testArgsList.catch):
2985 * stress/have-a-bad-time-with-arguments.js:
2987 2016-11-10 JF Bastien <jfbastien@apple.com>
2989 ASSERTION FAILED: length > offset encountered with wasm.yaml/wasm/js-api/test_Module.js.default-wasm
2990 https://bugs.webkit.org/show_bug.cgi?id=164597
2992 Reviewed by Keith Miller.
2994 Trim the array buffer before returning it: it's optimistically
2995 over-allocated to avoid growing all the time, but when parsed it
2996 can't have extra content.
2998 * wasm/Builder_WebAssemblyBinary.js:
2999 (export.const.Binary):
3000 * wasm/LowLevelBinary.js:
3001 (export.default.LowLevelBinary.prototype.get return):
3003 2016-11-10 Joseph Pecoraro <pecoraro@apple.com>
3005 test262: DataView / TypedArray methods should throw RangeErrors for negative numbers (ToIndex)
3006 https://bugs.webkit.org/show_bug.cgi?id=164450
3008 Reviewed by Darin Adler.
3010 * stress/dataview-typedarray-toindex.js: Added.
3011 Tests for all cases where ToIndex should be used.
3016 2016-11-10 Mark Lam <mark.lam@apple.com>
3018 Graph::methodOfGettingAValueProfileFor() should be returning the profile for the operand node.
3019 https://bugs.webkit.org/show_bug.cgi?id=164600
3020 <rdar://problem/28828676>
3022 Reviewed by Filip Pizlo.
3024 * stress/osr-exit-on-op-negate-should-no-fail-assertions.js: Added.
3026 2016-11-08 Yusuke Suzuki <utatane.tea@gmail.com>
3028 [JSC] Avoid cloned arguments allocation in ArrayPrototype methods
3029 https://bugs.webkit.org/show_bug.cgi?id=164502
3031 Reviewed by Saam Barati.
3033 * stress/argument-intrinsic-basic.js: Added.
3035 (builtin.createBuiltin):
3036 * stress/argument-intrinsic-inlining-with-result-escape.js: Added.
3038 (builtin.createBuiltin):
3040 * stress/argument-intrinsic-nested-inlining.js: Added.
3042 (builtin.createBuiltin):
3046 * stress/argument-intrinsic-not-convert-to-get-argument.js: Added.
3048 (builtin.createBuiltin):
3049 * stress/argument-intrinsic-with-stack-write.js: Added.
3051 (builtin.createBuiltin):
3053 2016-11-09 Saam Barati <sbarati@apple.com>
3055 Math.min()/Math.max() with no arguments is lowered incorrectly in the BytecodeParser
3056 https://bugs.webkit.org/show_bug.cgi?id=164464
3057 <rdar://problem/29131452>
3059 Reviewed by Darin Adler.
3061 * stress/math-max-min-no-arguments.js: Added.
3067 2016-11-09 Saam Barati <sbarati@apple.com>
3069 TypeProfiler and running GC collection on another thread don't play nicely with each other
3070 https://bugs.webkit.org/show_bug.cgi?id=164441
3071 <rdar://problem/29132174>
3073 Reviewed by Geoffrey Garen.
3075 * typeProfiler/type-profiler-gc.js: Added.
3079 2016-11-04 Mark Lam <mark.lam@apple.com>
3081 Error description code should be able to handle Symbol values.
3082 https://bugs.webkit.org/show_bug.cgi?id=164436
3083 <rdar://problem/29115583>
3085 Reviewed by Filip Pizlo and Saam Barati.
3087 * stress/error-description-on-symbols-should-not-crash.js: Added.
3089 2016-11-03 Geoffrey Garen <ggaren@apple.com>
3091 EvalCodeCache should not give up in strict mode and other cases
3092 https://bugs.webkit.org/show_bug.cgi?id=164357
3094 Reviewed by Michael Saboff.
3096 * microbenchmarks/eval-cached.js: Added. 45x faster now.
3097 * stress/eval-cached.js: Added. Try running the same eval text in a bunch
3098 of different scopes and verify that we access the right scope.
3100 2016-11-04 JF Bastien <jfbastien@apple.com>
3102 WebAssembly JS API: implement more sections
3103 https://bugs.webkit.org/show_bug.cgi?id=164023
3105 Reviewed by Keith Miller.
3109 - Put in parser stubs for all WebAssembly sections.
3110 - Parse Import, Export sections.
3111 - Use tryReserveCapacity instead of reserve, and bail out of the parser if it fails. This prevents the parser from bringing everything down when faced with a malicious input.
3112 - Encapsulate all parsed module information into its own structure, making it easier to pass around (from parser to Plan to Module to Instance).
3113 - Create WasmFormat.cpp to hold parsed module information's dtor to avoid including WasmMemory.h needlessly.
3114 - parseCode: avoid overflow through function size.
3115 - Remove all remainders of polyfill-prototype-1, and update license.
3116 - Add missing WasmOps.h and WasmValidateInlines.h auto-generation for cmake build.
3118 On the Builder.js testing side:
3120 - Implement Type, Import (function only), Export (function only) sections.
3121 - Check section order and uniqueness.
3122 - Optionally auto-generate the Type section from subsequent Export / Import / Code entries.
3123 - Allow re-exporting an import.
3125 * wasm/Builder.js: build type, import, and export sections
3126 (const._normalizeFunctionSignature):
3127 * wasm/Builder_WebAssemblyBinary.js: Added. Forked from Builder.js
3128 (const.emitters.Type):
3129 (const.emitters.Import):
3130 (const.emitters.Function):
3131 (const.emitters.Table):
3132 (const.emitters.Memory):
3133 (const.emitters.Global):
3134 (const.emitters.Export):
3135 (const.emitters.Start):
3136 (const.emitters.Element):
3137 (const.emitters.Code):
3138 (const.emitters.Data):
3139 (export.const.Binary):
3140 * wasm/LowLevelBinary.js: Add a few useful outputs
3141 (export.default.LowLevelBinary.prototype.varuint1):
3142 (export.default.LowLevelBinary.prototype.varint7):
3143 * wasm/WASM.js: value type and external kind helpers
3144 * wasm/assert.js: array element-wise equality comparison
3146 * wasm/js-api/test_Module.js:
3147 (ModuleWithImports):
3148 * wasm/self-test/test_BuilderJSON.js: many more tests for all the new Builder APIs, and update to some older tests which now require a Type section or rejiggered Function signature
3149 (const.assertOpThrows):
3150 (SectionsWithSameCustomName):
3152 (EmptyImportSection):
3153 (ImportBeforeTypeSections):
3154 * wasm/self-test/test_BuilderWebAssembly.js: remove a test which wasn't helpful and is now obsolete
3157 2016-11-03 Mark Lam <mark.lam@apple.com>
3159 ClonedArguments need to also support haveABadTime mode.
3160 https://bugs.webkit.org/show_bug.cgi?id=164200
3161 <rdar://problem/27211336>
3163 Reviewed by Geoffrey Garen.
3165 * stress/have-a-bad-time-with-arguments.js: Added.
3167 2016-11-03 Filip Pizlo <fpizlo@apple.com>
3169 DFG plays fast and loose with the shadow values of a Phi
3170 https://bugs.webkit.org/show_bug.cgi?id=164309
3172 Reviewed by Saam Barati.
3174 This test demonstrates why the DFG needs to recognize the shadow value of a Phi.
3176 * stress/dfg-ssa-swap.js: Added.
3179 2016-11-03 Commit Queue <commit-queue@webkit.org>
3181 Unreviewed, rolling out r208364.
3182 https://bugs.webkit.org/show_bug.cgi?id=164402
3184 broke the build (Requested by smfr on #webkit).
3188 "DFG plays fast and loose with the shadow values of a Phi"
3189 https://bugs.webkit.org/show_bug.cgi?id=164309
3190 http://trac.webkit.org/changeset/208364
3192 2016-11-03 Filip Pizlo <fpizlo@apple.com>
3194 DFG plays fast and loose with the shadow values of a Phi
3195 https://bugs.webkit.org/show_bug.cgi?id=164309
3197 Reviewed by Saam Barati.
3199 This test demonstrates why the DFG needs to recognize the shadow value of a Phi.
3201 * stress/dfg-ssa-swap.js: Added.
3204 2016-11-03 Saam Barati <sbarati@apple.com>
3206 Asking for a value profile prediction should be defensive against not finding a value profile
3207 https://bugs.webkit.org/show_bug.cgi?id=164306
3209 Reviewed by Mark Lam.
3211 * stress/inlined-tail-call-in-inlined-setter-should-not-crash-when-getting-value-profile.js: Added.
3215 2016-11-02 Saam Barati <sbarati@apple.com>
3217 Allocation elimination of rest parameter doesn't take into account indexed properties on Array.prototype/Object.prototype
3218 https://bugs.webkit.org/show_bug.cgi?id=164301
3220 Reviewed by Geoffrey Garen.
3222 * stress/rest-parameter-allocation-elimination-watchpoints-2.js: Added.
3225 * stress/rest-parameter-allocation-elimination-watchpoints-3.js: Added.
3228 * stress/rest-parameter-allocation-elimination-watchpoints-4.js: Added.
3231 * stress/rest-parameter-allocation-elimination-watchpoints-5.js: Added.
3234 * stress/rest-parameter-allocation-elimination-watchpoints-6.js: Added.
3237 * stress/rest-parameter-allocation-elimination-watchpoints.js: Added.
3241 2016-11-01 Saam Barati <sbarati@apple.com>
3243 We should be able to eliminate rest parameter allocations
3244 https://bugs.webkit.org/show_bug.cgi?id=163925
3246 Reviewed by Filip Pizlo.
3248 * microbenchmarks/rest-parameter-allocation-elimination.js: Added.
3286 (test11.makeArguments):
3291 (test12.makeArguments):
3296 (test13.makeArguments):
3302 (test14.makeArguments):
3308 (test15.makeArguments):
3312 2016-11-01 Commit Queue <commit-queue@webkit.org>
3314 Unreviewed, rolling out r208208 and r208210.
3315 https://bugs.webkit.org/show_bug.cgi?id=164276
3317 This change caused 28 JSC test failures. (Requested by
3318 ryanhaddad on #webkit).
3320 Reverted changesets:
3322 "We should be able to eliminate rest parameter allocations"
3323 https://bugs.webkit.org/show_bug.cgi?id=163925
3324 http://trac.webkit.org/changeset/208208
3326 "Fix the EFL build."
3327 http://trac.webkit.org/changeset/208210
3329 2016-10-31 Filip Pizlo <fpizlo@apple.com>
3331 JSC should support SharedArrayBuffer
3332 https://bugs.webkit.org/show_bug.cgi?id=163986
3334 Reviewed by Keith Miller.
3336 This adds our own test for the various corner cases of SharedArrayBuffer. This test is meant to
3337 check all of the things that don't require concurrency.
3339 * stress/SharedArrayBuffer.js: Added.
3345 2016-10-31 Saam Barati <sbarati@apple.com>
3347 We should be able to eliminate rest parameter allocations
3348 https://bugs.webkit.org/show_bug.cgi?id=163925
3350 Reviewed by Filip Pizlo.
3352 * microbenchmarks/rest-parameter-allocation-elimination.js: Added.
3390 (test11.makeArguments):
3395 (test12.makeArguments):
3400 (test13.makeArguments):
3406 (test14.makeArguments):
3412 (test15.makeArguments):
3416 2016-10-31 Saam Barati <sbarati@apple.com>
3418 Debug JSC test microbenchmarks/pure-get-by-id-cse-2.js timing out
3419 https://bugs.webkit.org/show_bug.cgi?id=164227
3421 Unreviewed timeout fix.
3423 * microbenchmarks/pure-get-by-id-cse-2.js:
3425 2016-10-31 Keith Miller <keith_miller@apple.com>
3427 autogenerated files from wasm.json should be in derived sources.
3428 https://bugs.webkit.org/show_bug.cgi?id=164152
3430 Reviewed by Filip Pizlo.
3432 Delete generation script since it is no longer used.
3434 * wasm/generate-wasmops-header.js: Removed.
3436 2016-10-29 Yusuke Suzuki <utatane.tea@gmail.com>
3438 [JSC] JSON.stringify should handle Proxy which is non JSArray but isArray is true
3439 https://bugs.webkit.org/show_bug.cgi?id=164123
3441 Reviewed by Mark Lam.
3443 * stress/json-stringify-with-non-jsarray-array.js: Added.
3445 (shouldBe.JSON.stringify.new.Proxy):
3447 2016-10-29 Saam Barati <sbarati@apple.com>
3449 We should have a way of profiling when a get_by_id is pure and to emit a PureGetById in the DFG/FTL
3450 https://bugs.webkit.org/show_bug.cgi?id=163305
3452 Reviewed by Keith Miller.
3454 * microbenchmarks/pure-get-by-id-cse-2.js: Added.
3456 * microbenchmarks/pure-get-by-id-cse.js: Added.
3458 * stress/pure-get-by-id-cse-correctness.js: Added.
3461 * stress/pure-get-by-id-on-non-object.js: Added.
3465 2016-10-28 Csaba Osztrogonác <ossy@webkit.org>
3467 Skip JSTests/microbenchmarks/dense-set.js on memory limited devices
3468 https://bugs.webkit.org/show_bug.cgi?id=164128
3470 Reviewed by Mark Lam.
3472 * microbenchmarks/dense-set.js:
3474 2016-10-20 Caitlin Potter <caitp@igalia.com>
3476 [JSC] implement runtime for async functions
3477 https://bugs.webkit.org/show_bug.cgi?id=163760
3479 Reviewed by Yusuke Suzuki.
3481 * stress/async-await-basic.js: Added.
3486 (shouldThrowSyntaxError):
3487 (let.AsyncFunction.async):
3488 (async.asyncFunctionForProto):
3489 (Object.getPrototypeOf.async):
3490 (Object.getPrototypeOf.async.method):
3493 (async.asyncNonConstructorDecl):
3494 (shouldThrow.new.async):
3495 (shouldThrow.new.async.nonConstructor):
3499 (async.asyncDeclThrower):
3500 (shouldThrowAsync.async):
3503 (async.resumeAfterNormal):
3504 (O.async.resumeAfterNormal):
3505 (resumeAfterNormalArrow.async):
3506 (async.resumeAfterThrow):
3507 (O.async.resumeAfterThrow):
3508 (resumeAfterThrowArrow.async):
3510 * stress/async-await-module-reserved-word.js: Added.
3512 (SyntaxError.Canstring_appeared_hereawait.checkModuleSyntaxError.String.raw.await):
3513 (checkModuleSyntaxError.String.raw.await):
3514 (checkModuleSyntaxError.String.raw.async.await):
3515 (SyntaxError.Cannot.declare.named):
3516 * stress/async-await-mozilla.js: Added.
3522 (shouldThrowSyntaxError):
3523 (mozSemantics.async.empty):
3524 (mozSemantics.async.simpleReturn):
3525 (mozSemantics.async.simpleAwait):
3526 (mozSemantics.async.simpleAwaitAsync):
3527 (mozSemantics.async.returnOtherAsync):
3528 (mozSemantics.async.simpleThrower):
3529 (mozSemantics.async.delegatedThrower):
3530 (mozSemantics.async.tryCatch):
3531 (mozSemantics.async.tryCatchThrow):
3532 (mozSemantics.async.wellFinally):
3533 (mozSemantics.async.finallyMayFail):
3534 (mozSemantics.async.embedded.async.inner):
3535 (mozSemantics.async.embedded):
3536 (mozSemantics.async.fib):
3537 (mozSemantics.async.isOdd.async.isEven):
3538 (mozSemantics.async.isOdd):
3539 (mozSemantics.hardcoreFib.async.fib2):
3540 (mozSemantics.namedAsyncExpr.async.simple):
3541 (mozSemantics.async.executionOrder.async.first):
3542 (mozSemantics.async.executionOrder.async.second):
3543 (mozSemantics.async.executionOrder.async.third):
3544 (mozSemantics.async.executionOrder):
3545 (mozSemantics.async.miscellaneous):
3546 (mozSemantics.thrower):
3547 (mozSemantics.async.defaultArgs):
3548 (mozSemantics.shouldThrow):
3551 (mozMethods.X.prototype.async.getValue):
3552 (mozMethods.X.prototype.setValue):
3553 (mozMethods.X.prototype.async.increment):
3554 (mozMethods.X.prototype.async.getBaseClassName):
3555 (mozMethods.X.async.getStaticValue):
3556 (mozMethods.Y.prototype.async.getBaseClassName):
3558 (mozFunctionNameInferrence.async.test):
3560 * stress/async-await-reserved-word.js: Added.
3562 (shouldThrowSyntaxError):
3563 (AsyncFunction.async):
3564 * stress/async_arrow_functions_lexical_arguments_binding.js: Added.
3568 (noArgumentsArrow2.async):
3569 * stress/async_arrow_functions_lexical_new.target_binding.js: Added.
3575 (shouldThrowAsync.async):
3576 * stress/async_arrow_functions_lexical_super_binding.js: Added.
3579 (BaseClass.prototype.baseClassValue):
3580 (BaseClass.prototype.get property):
3582 (ChildClass.prototype.asyncSuperProp):
3583 (ChildClass.prototype.asyncSuperProp2):
3586 * stress/async_arrow_functions_lexical_this_binding.js: Added.
3591 2016-10-28 Csaba Osztrogonác <ossy@webkit.org>
3593 Skip 2 JS stress tests on memory limited devices
3594 https://bugs.webkit.org/show_bug.cgi?id=164125
3596 Unreviewed quick fix to unbreak JSCOnly ARM bots as soon as possible.
3598 * stress/joined-strings-should-not-exceed-max-string-length.js:
3599 * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
3601 2016-10-27 Caitlin Potter <caitp@igalia.com>
3603 [JSC] forbid lexical redeclaration of generator formal parameters
3604 https://bugs.webkit.org/show_bug.cgi?id=163930
3606 Reviewed by Yusuke Suzuki.
3608 * stress/async-await-syntax.js:
3609 * stress/generator-syntax.js:
3610 (testSyntaxError.gen):
3611 (testSyntaxError.arguments):
3612 (testSyntaxError.eval):
3615 2016-10-26 JF Bastien <jfbastien@apple.com>
3617 WebAssembly API: implement Instance
3619 As described in: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblyinstance-objects
3621 - Take ownership of Wasm::Plan's compilation result when successfully creating a JSWebAssemblyModule object.
3622 - Construct a basic Instance with a Module.
3623 - Handle second argument (importObject) of WebAssembly.Instance.
3624 - Add reference text from the spec to WebAssembly.Module's code.
3625 - Expose and test an empty 'exports' ModuleNamespaceObject on WebAssembly.Instance.
3627 The implementation isn't complete yet: it relies on further work for which I've filed bugs.
3629 WebAssembly API: implement Instance
3630 https://bugs.webkit.org/show_bug.cgi?id=163998
3632 Reviewed by Keith Miller.
3634 * wasm/js-api/test_Instance.js: Added.
3635 (EmptyModule): use the Builder, create the simplest Module possible, and create an Instance from it
3636 * wasm/js-api/test_basic_api.js:
3637 (const.c.in.constructorProperties.switch): basic tests of the API
3639 2016-10-26 Mark Lam <mark.lam@apple.com>
3641 JSGenericTypedArrayView::set() should check for exceptions.
3642 https://bugs.webkit.org/show_bug.cgi?id=164007
3643 <rdar://problem/28853775>
3645 Reviewed by Filip Pizlo.
3647 * stress/typed-array-view-set-should-not-crash-on-exception.js: Added.
3649 2016-10-25 Mark Lam <mark.lam@apple.com>
3651 String.prototype.replace() should throw an OutOfMemoryError when using too much memory.
3652 https://bugs.webkit.org/show_bug.cgi?id=163996
3653 <rdar://problem/28263117>
3655 Reviewed by Geoffrey Garen.
3657 * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js: Added.
3659 2016-10-25 Mark Lam <mark.lam@apple.com>
3661 JSStringJoiner::joinedLength() should limit joined string lengths to INT_MAX.
3662 https://bugs.webkit.org/show_bug.cgi?id=163937
3663 <rdar://problem/28642990>
3665 Reviewed by Geoffrey Garen.
3667 * stress/joined-strings-should-not-exceed-max-string-length.js: Added.
3669 2016-10-25 JF Bastien <jfbastien@apple.com>
3671 WebAssembly JS API: simple Module test
3672 https://bugs.webkit.org/show_bug.cgi?id=163963
3674 Reviewed by Filip Pizlo.
3676 * wasm/LowLevelBinary.js:
3677 (export.default.LowLevelBinary.prototype.get return): get the ArrayBuffer
3678 (export.default.LowLevelBinary.prototype.hexdump): Deleted.
3679 (export.default.LowLevelBinary.prototype._maybeGrow): Deleted.
3680 * wasm/js-api/test_Module.js: Added.
3681 (EmptyModule): The most basic module possible
3683 2016-10-25 JF Bastien <jfbastien@apple.com>
3685 WebAssembly JS API: implement Module
3687 This implementation allows us to:
3688 - Syncrhonously create a WebAssembly.Module with a typed array.
3689 - Creates a compilation plan.
3690 - Parse the Module and creates corresponding code.
3691 - Throw WebAssembly.CompileError with mildly helpful [*] error messages on
3694 Consult the API documentation for expected behavior: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymodule-constructor
3696 For now the implementation discards the generated code.
3698 The next steps will be:
3699 - Expose a Module's exports.
3700 - Implement WebAssembly.Instance, which allows instantiating and running a
3702 - Beef up the testing infrastructure under JSTests/wasm so that more complex
3703 modules can be created and tested (instead of writing the bits by hand).
3706 - Adds assert.instanceof in assert.js.
3707 - Refactors Wasm::Parser and friends to accept const uint8_t* as well as a
3708 Vector, to avoid copying when invoked synchronously.
3709 - Remove useless Structure from some of the wasm constructors: they're already
3710 on the JSGlobalObject, visited properly and all.
3711 - Fix off-by-one error in parsing: Parser::parseUInt32 failed if the integer
3712 was exactly at end of file.
3714 [*] On error messages while parsing: I filed https://bugs.webkit.org/show_bug.cgi?id=163919
3716 WebAssembly JS API: implement Module
3717 https://bugs.webkit.org/show_bug.cgi?id=163903
3719 Reviewed by Keith Miller.
3721 * wasm/assert.js: use underscore in name, and remove when exporting to avoid clasing with builtin names