2017-04-18 Mark Lam r211670 broke double to int conversion. https://bugs.webkit.org/show_bug.cgi?id=170961 Reviewed by Yusuke Suzuki. * microbenchmarks/double-to-int32.js: Added. * stress/to-int32-sensible2.js: Added. 2017-04-03 Mark Lam Fix incorrect capacity delta calculation reported in SparseArrayValueMap::add(). https://bugs.webkit.org/show_bug.cgi?id=170412 Reviewed by Filip Pizlo. * stress/regress-170412.js: Added. 2017-04-01 Oleksandr Skachkov Object with numerical keys with gaps gets filled by NaN values https://bugs.webkit.org/show_bug.cgi?id=164412 Reviewed by Merk Lam. * stress/object-number-properties.js: Added. (assert): (boo): 2017-03-23 Yusuke Suzuki [JSC] Use jsNontrivialString agressively for ToString(Int52) https://bugs.webkit.org/show_bug.cgi?id=170002 Reviewed by Sam Weinig. * stress/to-string-int52.js: Added. (shouldBe): (toString10): (expected): 2017-03-23 Yusuke Suzuki [JSC][DFG] Make addShouldSpeculateAnyInt more conservative to avoid regression caused by Double <-> Int52 conversions https://bugs.webkit.org/show_bug.cgi?id=169998 Reviewed by Saam Barati. * microbenchmarks/int52-back-and-forth.js: Added. (shouldBe): (num): 2017-03-23 Mark Lam Clients of JSArray::tryCreateForInitializationPrivate() should do their own null checks. https://bugs.webkit.org/show_bug.cgi?id=169783 Reviewed by Saam Barati. * stress/regress-169783.js: Added. 2017-03-22 Yusuke Suzuki [JSC][DFG] Propagate AnyIntAsDouble information carefully to utilize it in fixup https://bugs.webkit.org/show_bug.cgi?id=169914 Reviewed by Saam Barati. * stress/any-int-as-double-add.js: Added. (shouldBe): (test): * stress/to-this-numbers.js: Added. (shouldBe): (Number.prototype.toThis): 2017-03-22 Yusuke Suzuki [JSC] Use jsNontrivialString for Number toString operations https://bugs.webkit.org/show_bug.cgi?id=169965 Reviewed by Mark Lam. * stress/to-string-int32.js: Added. (shouldBe): (toString10): (expected): 2017-03-21 Yusuke Suzuki [JSC] Optimize Number.prototype.toString on Int32 / Int52 / Double https://bugs.webkit.org/show_bug.cgi?id=167454 Reviewed by Saam Barati. * stress/number-to-string-abstract-operation.js: Added. (shouldBe): (int32ToString): (shouldBe.int32ToString.new.Number.int52ToString): (shouldBe.int32ToString.new.Number): (shouldBe.doubleToString): * stress/number-to-string-radix.js: Added. (shouldBe): (int32ToString): (shouldBe.int32ToString.new.Number.int52ToString): (shouldBe.int32ToString.new.Number): (shouldBe.doubleToString): * stress/number-to-string.js: Added. (shouldBe): (int32ToString): (shouldBe.int32ToString.new.Number.int52ToString): (shouldBe.int32ToString.new.Number): (shouldBe.doubleToString): 2017-02-23 Saam Barati Intrinsicify parseInt https://bugs.webkit.org/show_bug.cgi?id=168627 Reviewed by Filip Pizlo. * stress/parse-int-intrinsic.js: Added. (assert): (testIntrinsic.let.s): (testIntrinsic): (testIntrinsic2.baz): (testIntrinsic2): (testIntrinsic3.foo): (testIntrinsic3): (testIntrinsic4.foo): (testIntrinsic4): (testIntrinsic5.foo): (testIntrinsic5): (testIntrinsic6.foo): (testIntrinsic6): (testIntrinsic7.foo): (testIntrinsic7): 2017-03-19 Chris Dumez `const location = "foo"` throws in a worker https://bugs.webkit.org/show_bug.cgi?id=169839 Reviewed by Mark Lam. * ChakraCore/test/es6/letconst_global_shadow_builtins_nonconfigurable.baseline-jsc: Update expected jsc result now that we throw a SyntaxError when trying to shadow undefined with a let variable. We used not to throw because the value is undefined but this was not as per EcmaScript. Both Firefox and Chrome throw in this case. * stress/global-lexical-redeclare-variable.js: (catch): Update test that defines a non-configurable 'zoo' property on the global object and then expected shadowing it with a 'let zoo' variable to work because its value was undefined. This was not as per EcmaScript spec and both Firefox and Chrome throw in this case. 2017-03-19 Yusuke Suzuki import(arg) crashes when ToString(arg) throws https://bugs.webkit.org/show_bug.cgi?id=169778 Reviewed by Saam Barati. * stress/import-reject-with-exception.js: Added. (shouldBe): (let.x.get toString): 2017-03-15 Yusuke Suzuki [JSC] Default parameter part should be retrieved by op_get_argument opcode instead of changing arity https://bugs.webkit.org/show_bug.cgi?id=164582 Reviewed by Saam Barati. * stress/function-with-defaults-inlining.js: Added. (shouldBe): (ok): (a): * stress/function-with-defaults-non-inlining.js: Added. (shouldBe): (ok): (a): 2017-03-15 Yusuke Suzuki [DFG] ToString operation should have fixup for primitives to say this node does not have side effects https://bugs.webkit.org/show_bug.cgi?id=169544 Reviewed by Saam Barati. * microbenchmarks/template-string-array.js: Added. (test): * stress/to-string-non-cell-use.js: Added. (shouldBe): (shouldThrow): 2017-03-13 Caio Lima [JSC] It should be possible create a label named let when parsing Statement in non strict mode https://bugs.webkit.org/show_bug.cgi?id=168684 Reviewed by Saam Barati. * ChakraCore/test/LetConst/DeclOutofBlock.baseline-jsc: 2017-03-10 Mark Lam JSC: BindingNode::bindValue doesn't increase the scope's reference count. https://bugs.webkit.org/show_bug.cgi?id=168546 Reviewed by Saam Barati. * stress/regress-168546.js: Added. 2017-03-06 Yusuke Suzuki Null pointer crash when loading module with unresolved import also as a script file https://bugs.webkit.org/show_bug.cgi?id=168971 Reviewed by Saam Barati. * stress/re-execute-error-module.js: Added. (shouldBe): (async): * stress/resources/error-module.js: Added. 2017-02-28 Oleksandr Skachkov Use of arguments in arrow function is slow https://bugs.webkit.org/show_bug.cgi?id=168829 Reviewed by Saam Barati. * microbenchmarks/arrowfunciton-direct-arguments.js: Added. (fn): * microbenchmarks/arrowfunciton-reference-arguments.js: Added. (fn): 2017-03-08 Yusuke Suzuki [GTK] JSC test stress/arity-check-ftl-throw.js.ftl-no-cjit-validate-sampling-profiler crashing on GTK bot https://bugs.webkit.org/show_bug.cgi?id=160124 Reviewed by Mark Lam. * stress/spread-forward-call-varargs-stack-overflow.js: 2017-02-22 Yusuke Suzuki JSModuleNamespace object should have IC https://bugs.webkit.org/show_bug.cgi?id=160590 Reviewed by Saam Barati. * modules/module-assert-access-binding.js: Added. * modules/module-assert-access-namespace.js: Added. * modules/namespace-empty.js: Added. (from.string_appeared_here.access): (i.shouldThrow): * stress/module-namespace-access-change.js: Added. (shouldBe): (access): (import.string_appeared_here.then): * stress/module-namespace-access-non-constant.js: Added. (shouldBe): (import.string_appeared_here.then): * stress/module-namespace-access-poly.js: Added. (shouldBe): (access): (import.string_appeared_here.then): * stress/module-namespace-access-transitive-exports.js: Added. (shouldBe): (import.string_appeared_here.then): * stress/module-namespace-access.js: Added. (shouldBe): (import.string_appeared_here.then): * stress/resources/module-namespace-access-transitive-exports-2.js: Added. (export.cocoa): (export.change): * stress/resources/module-namespace-access-transitive-exports.js: Added. * stress/resources/module-namespace-access.js: Added. (export.cocoa): (export.change): 2017-02-20 Filip Pizlo The collector thread should only start when the mutator doesn't have heap access https://bugs.webkit.org/show_bug.cgi?id=167737 Reviewed by Keith Miller. Add versions of splay that flash heap access, to simulate what might happen if a third-party app was running concurrent GC. In this case, we might actually start the collector thread. * stress/splay-flash-access-1ms.js: Added. (performance.now): (this.Setup.setup.setup): (this.TearDown.tearDown.tearDown): (Benchmark): (BenchmarkResult): (BenchmarkResult.prototype.valueOf): (BenchmarkSuite): (alert): (Math.random): (BenchmarkSuite.ResetRNG): (RunStep): (BenchmarkSuite.RunSuites): (BenchmarkSuite.CountBenchmarks): (BenchmarkSuite.GeometricMean): (BenchmarkSuite.GeometricMeanTime): (BenchmarkSuite.AverageAbovePercentile): (BenchmarkSuite.GeometricMeanLatency): (BenchmarkSuite.FormatScore): (BenchmarkSuite.prototype.NotifyStep): (BenchmarkSuite.prototype.NotifyResult): (BenchmarkSuite.prototype.NotifyError): (BenchmarkSuite.prototype.RunSingleBenchmark): (RunNextSetup): (RunNextBenchmark): (RunNextTearDown): (BenchmarkSuite.prototype.RunStep): (GeneratePayloadTree): (GenerateKey): (SplayUpdateStats): (InsertNewNode): (SplaySetup): (SplayTearDown): (SplayRun): (SplayTree): (SplayTree.prototype.isEmpty): (SplayTree.prototype.insert): (SplayTree.prototype.remove): (SplayTree.prototype.find): (SplayTree.prototype.findMax): (SplayTree.prototype.findGreatestLessThan): (SplayTree.prototype.exportKeys): (SplayTree.prototype.splay_): (SplayTree.Node): (SplayTree.Node.prototype.traverse_): (jscSetUp): (jscTearDown): (jscRun): (averageAbovePercentile): (printPercentile): * stress/splay-flash-access.js: Added. (performance.now): (this.Setup.setup.setup): (this.TearDown.tearDown.tearDown): (Benchmark): (BenchmarkResult): (BenchmarkResult.prototype.valueOf): (BenchmarkSuite): (alert): (Math.random): (BenchmarkSuite.ResetRNG): (RunStep): (BenchmarkSuite.RunSuites): (BenchmarkSuite.CountBenchmarks): (BenchmarkSuite.GeometricMean): (BenchmarkSuite.GeometricMeanTime): (BenchmarkSuite.AverageAbovePercentile): (BenchmarkSuite.GeometricMeanLatency): (BenchmarkSuite.FormatScore): (BenchmarkSuite.prototype.NotifyStep): (BenchmarkSuite.prototype.NotifyResult): (BenchmarkSuite.prototype.NotifyError): (BenchmarkSuite.prototype.RunSingleBenchmark): (RunNextSetup): (RunNextBenchmark): (RunNextTearDown): (BenchmarkSuite.prototype.RunStep): (GeneratePayloadTree): (GenerateKey): (SplayUpdateStats): (InsertNewNode): (SplaySetup): (SplayTearDown): (SplayRun): (SplayTree): (SplayTree.prototype.isEmpty): (SplayTree.prototype.insert): (SplayTree.prototype.remove): (SplayTree.prototype.find): (SplayTree.prototype.findMax): (SplayTree.prototype.findGreatestLessThan): (SplayTree.prototype.exportKeys): (SplayTree.prototype.splay_): (SplayTree.Node): (SplayTree.Node.prototype.traverse_): (jscSetUp): (jscTearDown): (jscRun): (averageAbovePercentile): (printPercentile): 2017-02-21 Yusuke Suzuki ASSERTION FAILED: "!scope.exception()" with Object.isSealed/isFrozen and uninitialized module bindings https://bugs.webkit.org/show_bug.cgi?id=168605 Reviewed by Saam Barati. * modules/module-namespace-is-frozen.js: Added. (from.string_appeared_here.shouldThrow): (export.b): * modules/module-namespace-is-sealed.js: Added. (from.string_appeared_here.shouldThrow): (export.b): 2017-02-19 Commit Queue Unreviewed, rolling out r212466. https://bugs.webkit.org/show_bug.cgi?id=168577 causes crashes on AArch64 on linux, maybe it's causing crashes on iOS too (Requested by pizlo on #webkit). Reverted changeset: "The collector thread should only start when the mutator doesn't have heap access" https://bugs.webkit.org/show_bug.cgi?id=167737 http://trac.webkit.org/changeset/212466 2017-02-10 Filip Pizlo The collector thread should only start when the mutator doesn't have heap access https://bugs.webkit.org/show_bug.cgi?id=167737 Reviewed by Keith Miller. Add versions of splay that flash heap access, to simulate what might happen if a third-party app was running concurrent GC. In this case, we might actually start the collector thread. * stress/splay-flash-access-1ms.js: Added. (performance.now): (this.Setup.setup.setup): (this.TearDown.tearDown.tearDown): (Benchmark): (BenchmarkResult): (BenchmarkResult.prototype.valueOf): (BenchmarkSuite): (alert): (Math.random): (BenchmarkSuite.ResetRNG): (RunStep): (BenchmarkSuite.RunSuites): (BenchmarkSuite.CountBenchmarks): (BenchmarkSuite.GeometricMean): (BenchmarkSuite.GeometricMeanTime): (BenchmarkSuite.AverageAbovePercentile): (BenchmarkSuite.GeometricMeanLatency): (BenchmarkSuite.FormatScore): (BenchmarkSuite.prototype.NotifyStep): (BenchmarkSuite.prototype.NotifyResult): (BenchmarkSuite.prototype.NotifyError): (BenchmarkSuite.prototype.RunSingleBenchmark): (RunNextSetup): (RunNextBenchmark): (RunNextTearDown): (BenchmarkSuite.prototype.RunStep): (GeneratePayloadTree): (GenerateKey): (SplayUpdateStats): (InsertNewNode): (SplaySetup): (SplayTearDown): (SplayRun): (SplayTree): (SplayTree.prototype.isEmpty): (SplayTree.prototype.insert): (SplayTree.prototype.remove): (SplayTree.prototype.find): (SplayTree.prototype.findMax): (SplayTree.prototype.findGreatestLessThan): (SplayTree.prototype.exportKeys): (SplayTree.prototype.splay_): (SplayTree.Node): (SplayTree.Node.prototype.traverse_): (jscSetUp): (jscTearDown): (jscRun): (averageAbovePercentile): (printPercentile): * stress/splay-flash-access.js: Added. (performance.now): (this.Setup.setup.setup): (this.TearDown.tearDown.tearDown): (Benchmark): (BenchmarkResult): (BenchmarkResult.prototype.valueOf): (BenchmarkSuite): (alert): (Math.random): (BenchmarkSuite.ResetRNG): (RunStep): (BenchmarkSuite.RunSuites): (BenchmarkSuite.CountBenchmarks): (BenchmarkSuite.GeometricMean): (BenchmarkSuite.GeometricMeanTime): (BenchmarkSuite.AverageAbovePercentile): (BenchmarkSuite.GeometricMeanLatency): (BenchmarkSuite.FormatScore): (BenchmarkSuite.prototype.NotifyStep): (BenchmarkSuite.prototype.NotifyResult): (BenchmarkSuite.prototype.NotifyError): (BenchmarkSuite.prototype.RunSingleBenchmark): (RunNextSetup): (RunNextBenchmark): (RunNextTearDown): (BenchmarkSuite.prototype.RunStep): (GeneratePayloadTree): (GenerateKey): (SplayUpdateStats): (InsertNewNode): (SplaySetup): (SplayTearDown): (SplayRun): (SplayTree): (SplayTree.prototype.isEmpty): (SplayTree.prototype.insert): (SplayTree.prototype.remove): (SplayTree.prototype.find): (SplayTree.prototype.findMax): (SplayTree.prototype.findGreatestLessThan): (SplayTree.prototype.exportKeys): (SplayTree.prototype.splay_): (SplayTree.Node): (SplayTree.Node.prototype.traverse_): (jscSetUp): (jscTearDown): (jscRun): (averageAbovePercentile): (printPercentile): 2017-02-16 Yusuke Suzuki [JSC] Update module namespace object according to the latest ECMA262 https://bugs.webkit.org/show_bug.cgi?id=168280 Reviewed by Saam Barati. * modules/namespace-object-symbol-iterator-name.js: * modules/namespace-object-typed-array-fast-path.js: * modules/namespace.js: (shouldBe.JSON.stringify.Reflect.getOwnPropertyDescriptor): (shouldThrow): 2017-02-11 Yusuke Suzuki [JSC] Implement (Shared)ArrayBuffer.prototype.byteLength https://bugs.webkit.org/show_bug.cgi?id=166476 Reviewed by Saam Barati. * ChakraCore/test/typedarray/arraybufferType.baseline-jsc: * stress/array-buffer-byte-length.js: Added. (shouldBe): (shouldThrow): (Symbol): * stress/reflect-set.js: 2017-02-10 Saam Barati Object allocation sinking phase doesn't properly handle control flow when emitting a PutHint of a materialized object into a PromotedHeapLocation of a still sunken object https://bugs.webkit.org/show_bug.cgi?id=168140 Reviewed by Filip Pizlo. * stress/allocation-sinking-puthint-control-flow.js: Added. (e): (bar): (let.y): (else.let.y): (baz): (foo): (catch): 2017-02-09 Mark Lam B3::Procedure::deleteOrphans() should neutralize upsilons with dead phis. https://bugs.webkit.org/show_bug.cgi?id=167437 Reviewed by Filip Pizlo. * stress/b3-delete-orphans-should-neutralize-upsilons-with-dead-phis.js: Added. 2017-02-09 Saam Barati Sloppy mode: We don't properly hoist functions names "arguments" when we have a non-simple parameter list https://bugs.webkit.org/show_bug.cgi?id=167319 Reviewed by Mark Lam. * stress/sloppy-mode-hoist-arguments-function-non-simple-parameter-list.js: Added. (assert): (assert.arguments): (assert.b): (x.arguments): (x.b): (x): 2017-02-09 Mark Lam Fix max length check in ArrayPrototype.js' concatSlowPath(). https://bugs.webkit.org/show_bug.cgi?id=167270 Reviewed by Filip Pizlo. * stress/array-prototype-concat-of-long-spliced-arrays.js: Added. * stress/array-prototype-concat-of-long-spliced-arrays2.js: Added. 2017-02-09 Keith Miller We should not allow Function.caller to be used on native functions https://bugs.webkit.org/show_bug.cgi?id=165628 Reviewed by Mark Lam. * stress/caller-native-code.js: Added. (f): 2017-02-04 Yusuke Suzuki [JSC] Add operationToInt32SensibleSlow to optimize kraken pbkdf2 and sha256 https://bugs.webkit.org/show_bug.cgi?id=167736 Reviewed by Saam Barati. * stress/to-int32-sensible.js: Added. (shouldBe): (toInt32): (test): 2017-02-01 Yusuke Suzuki Unreviewed, remove loop https://bugs.webkit.org/show_bug.cgi?id=167694 It causes timeout. Original bug can be tested even without this loop. * stress/arity-fixup-should-not-touch-stack-area-below-sp.js: 2017-02-01 Yusuke Suzuki ArityFixup should adjust SP first https://bugs.webkit.org/show_bug.cgi?id=167239 Reviewed by Michael Saboff. Significantly large arity fixup reliably causes this crash. * stress/arity-fixup-should-not-touch-stack-area-below-sp.js: Added. 2017-01-31 Filip Pizlo Move slow-running microbenchmarks out of JSTests/microbenchmarks https://bugs.webkit.org/show_bug.cgi?id=167676 Reviewed by Saam Barati. The microbenchmarks directory is profitable when it's cheap to run. This change moves very slow tests (>=200ms running time on my machine) and puts them in JSTests/slowMicrobenchmarks instead. That directory is run only through `slow!; defaultQuickRun` and is not run by run-jsc-benchmarks. This is a big progression in test running time. But because it frontloads more slow tests, the tests will seem to run more slowly when you first start the test runner. * microbenchmarks/default-derived-constructor.js: Removed. * microbenchmarks/dense-set.js: Removed. * microbenchmarks/ftl-polymorphic-div.js: Removed. * microbenchmarks/ftl-polymorphic-mul.js: Removed. * microbenchmarks/function-bind-inlining.js: Removed. * microbenchmarks/function-bind-no-inlining.js: Removed. * microbenchmarks/large-map-iteration-with-additions.js: Removed. * microbenchmarks/large-map-iteration-with-mutation.js: Removed. * microbenchmarks/map-get-get-cse.js: Removed. * microbenchmarks/misc-bugs-847389-jpeg2000.js: Removed. * microbenchmarks/spread-small-array.js: Removed. * microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Removed. * slowMicrobenchmarks: Added. * slowMicrobenchmarks.yaml: Added. * slowMicrobenchmarks/README: Added. * slowMicrobenchmarks/default-derived-constructor.js: Copied from JSTests/microbenchmarks/default-derived-constructor.js. * slowMicrobenchmarks/dense-set.js: Copied from JSTests/microbenchmarks/dense-set.js. * slowMicrobenchmarks/ftl-polymorphic-div.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-div.js. * slowMicrobenchmarks/ftl-polymorphic-mul.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-mul.js. * slowMicrobenchmarks/function-bind-inlining.js: Copied from JSTests/microbenchmarks/function-bind-inlining.js. * slowMicrobenchmarks/function-bind-no-inlining.js: Copied from JSTests/microbenchmarks/function-bind-no-inlining.js. * slowMicrobenchmarks/large-map-iteration-with-additions.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-additions.js. * slowMicrobenchmarks/large-map-iteration-with-mutation.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-mutation.js. * slowMicrobenchmarks/map-get-get-cse.js: Copied from JSTests/microbenchmarks/map-get-get-cse.js. * slowMicrobenchmarks/misc-bugs-847389-jpeg2000.js: Copied from JSTests/microbenchmarks/misc-bugs-847389-jpeg2000.js. * slowMicrobenchmarks/spread-small-array.js: Copied from JSTests/microbenchmarks/spread-small-array.js. * slowMicrobenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Copied from JSTests/microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js. 2017-01-30 Yusuke Suzuki [JSC] Do not reject WebAssembly.compile() with Exception https://bugs.webkit.org/show_bug.cgi?id=167585 Reviewed by Mark Lam. * wasm/js-api/Module-compile.js: (async.testPromiseAPI): 2017-01-27 Yusuke Suzuki Lift template escape sequence restrictions in tagged templates https://bugs.webkit.org/show_bug.cgi?id=166871 Reviewed by Saam Barati. Update the error messages and add new tests. * ChakraCore/test/es6/unicode_6_identifier_Blue524737.baseline-jsc: * stress/lift-template-literal.js: Added. (dump): (testTag.return.tag): (testTag): * stress/template-literal-syntax.js: 2017-01-26 Mark Lam Fix missing exception check in genericTypedArrayViewProtoFuncSet(). https://bugs.webkit.org/show_bug.cgi?id=166812 Reviewed by Saam Barati. * stress/regress-166812.js: Added. 2017-01-26 Commit Queue Unreviewed, rolling out r211224. https://bugs.webkit.org/show_bug.cgi?id=167479 "It was a Kraken performance regression" (Requested by saamyjoon on #webkit). Reverted changeset: "OSR entry: delay outer-loop compilation when at inner-loop" https://bugs.webkit.org/show_bug.cgi?id=167149 http://trac.webkit.org/changeset/211224 2017-01-26 JF Bastien OSR entry: delay outer-loop compilation when at inner-loop https://bugs.webkit.org/show_bug.cgi?id=167149 Reviewed by Filip Pizlo. Try to be mean to OSR entry by using nested loops, and having non-int32 types or truly varying types. Mandelbrot currently never tiers up to FTL because it exits too many times before this. That shouldn't happen because it's just numbers and int32s. I'll file a bug to fix this. * microbenchmarks/mandelbrot.js: Added. (mandelbrot): (printable): * microbenchmarks/nonude.js: Added. (Array.prototype.remove): (const.u): (const.load): (const.scan): (const.main): 2017-01-25 Saam Barati WebAssembly JS API: coerce return values from imports https://bugs.webkit.org/show_bug.cgi?id=165480 Reviewed by Yusuke Suzuki. * wasm/function-tests/function-import-return-value.js: Added. (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.x.assert.eq): (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.Math.fround): (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.let.type.of.Reflect.ownKeys): (test.1): (assert.truthy): (assert.throws): 2017-01-25 Filip Pizlo jsc.cpp should have the $.agent stuff for testing SAB https://bugs.webkit.org/show_bug.cgi?id=167431 Reviewed by Saam Barati. Add a very basic test of Atomics using $.agent. This is based on LayoutTests/workers/sab/simple.html. * stress/lars-sab-workers.js: Added. (startWorker): (resources): (wake): (else): 2017-01-24 Filip Pizlo Atomics.store should return the int-converted value according to toInteger https://bugs.webkit.org/show_bug.cgi?id=167399 Reviewed by Saam Barati. * stress/atomics-add-uint32.js: Added. * stress/atomics-store-return.js: Fix the test to match what the spec wants. 2017-01-24 Yusuke Suzuki [JSC] Optimize Number#toString with Int52 https://bugs.webkit.org/show_bug.cgi?id=167303 Reviewed by Sam Weinig. * stress/to-string-with-int52.js: Added. (shouldBe): 2017-01-24 Filip Pizlo Atomics.store should return the int-converted value, not the value that it stored https://bugs.webkit.org/show_bug.cgi?id=167395 Reviewed by Saam Barati. * stress/atomics-store-return.js: Added. 2017-01-24 Filip Pizlo -0 is a valid array index and AtomicsObject should know this https://bugs.webkit.org/show_bug.cgi?id=167386 Reviewed by Mark Lam. * stress/atomics-neg-zero.js: Added. 2017-01-23 Saam Barati https://bugs.webkit.org/show_bug.cgi?id=167247 JSC: operationSpreadGeneric uses the wrong global object for the builtin function and slow_path_spread consults the wrong global object to prove if the iterator protocol is unobservable Reviewed by Filip Pizlo. * stress/spread-consults-correct-global-object.js: Added. (assert): (spread): * stress/spread-correct-global-object-on-exception.js: Added. (assert): (spread): (const.objectText.let.o.Symbol.iterator): (catch): 2017-01-21 Yusuke Suzuki dynamic import is ambiguous with import declaration at module code https://bugs.webkit.org/show_bug.cgi?id=167098 Reviewed by Darin Adler. * modules/import-call.js: Added. (from.string_appeared_here.import.string_appeared_here.then): * modules/import-call/main.js: Added. * stress/import-syntax.js: (async): 2017-01-19 Skachkov Oleksandr "this" missing after await in async arrow function https://bugs.webkit.org/show_bug.cgi?id=166919 Reviewed by Saam Barati. * stress/async-arrow-functions-lexical-binding-in-class.js: (ChildClass.prototype.asyncThisPropWithAwaitBody): (ChildClass.prototype.asyncThisPropInEvalWithAwaitBody): (ChildClass.prototype.asyncThisValueBodyWithAwait): (ChildClass.prototype.asyncThisValueInEvalWithAwaitBody): (ChildClass): (ChildClass3): (ChildClass3.prototype.classValue): (ChildClass3.prototype.get classProperty): * stress/async-arrow-functions-lexical-new.target-binding.js: (C2WithAwait): 2017-01-16 Filip Pizlo Make opaque root scanning truly constraint-based https://bugs.webkit.org/show_bug.cgi?id=165760 Reviewed by Geoffrey Garen. Added this test, which demonstrates the benefit of having a dedicated string subspace. * microbenchmarks/stringalloc.js: Added. 2017-01-17 Michael Saboff Nested parenthesized regular expressions with non-zero minimum counts appear to hang and use lots of memory https://bugs.webkit.org/show_bug.cgi?id=167125 Reviewed by Filip Pizlo. * microbenchmarks/regexp-nested-nonzero-min-counted-parens.js: Added. New test with limits that run slow and take a reasonable amount of memory before the change and run fast, using little memory with the change. 2017-01-14 Yusuke Suzuki Annotate large string tests with largeHeap https://bugs.webkit.org/show_bug.cgi?id=167054 Reviewed by Filip Pizlo. * microbenchmarks/dense-set.js: * microbenchmarks/lots-of-fields.js: * stress/joined-strings-should-not-exceed-max-string-length.js: * stress/make-large-string-jit-strcat.js: * stress/make-large-string-jit.js: * stress/make-large-string-strcat.js: * stress/make-large-string.js: * stress/string-joining-long-strings-should-not-crash.js: * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js: 2017-01-14 Yusuke Suzuki Reserve capacity for StringBuilder in unescape https://bugs.webkit.org/show_bug.cgi?id=167008 Reviewed by Sam Weinig. * stress/unescape.js: Added. (shouldBe): 2017-01-12 Saam Barati Add a slice intrinsic to the DFG/FTL https://bugs.webkit.org/show_bug.cgi?id=166707 Reviewed by Filip Pizlo. * stress/array-slice-intrinsic.js: Added. (assert): (shallowEq): (runTest1): (runTest2): * stress/array-slice-jettison-on-constructor-change.js: Added. (assert): (runTest1): (runTest2): (addRandomProperties): (runTests): * stress/array-slice-osr-exit-2.js: Added. (assert): (Foo): (shallowEq): (runTest1): (runTest2): (addRandomProperties): (runTests): * stress/array-slice-osr-exit.js: Added. (assert): (Foo): (shallowEq): (runTest1): (runTest2): (addRandomProperties): (runTests): 2017-01-11 Ryan Haddad Mark es6/typed_arrays_correct_prototype_chains.js as failing after r210570. https://bugs.webkit.org/show_bug.cgi?id=166931i Unreviewed test gardening. * es6.yaml: 2017-01-10 Commit Queue Unreviewed, rolling out r210052. https://bugs.webkit.org/show_bug.cgi?id=166915 "breaks web compatability" (Requested by keith_miller on #webkit). Reverted changeset: "Add support for global" https://bugs.webkit.org/show_bug.cgi?id=165171 http://trac.webkit.org/changeset/210052 2017-01-10 Mark Lam Property setters should not be called for bound arguments list entries. https://bugs.webkit.org/show_bug.cgi?id=165631 Reviewed by Filip Pizlo. * stress/property-setters-should-not-be-called-for-bound-arguments-list-entries.js: Added. 2017-01-10 Skachkov Oleksandr Calling async arrow function which is in a class's member function will cause error https://bugs.webkit.org/show_bug.cgi?id=166879 Reviewed by Saam Barati. * stress/async-arrow-functions-lexical-binding-in-class.js: Added. (shouldBe): (shouldBeAsync): (BaseClass.prototype.baseClassValue): (BaseClass.prototype.get property): (BaseClass): (runSomething): (ChildClass.prototype.classValue): (ChildClass.prototype.get classProperty): (ChildClass.prototype.asyncValueExp): (ChildClass.prototype.asyncValueBody): (ChildClass.prototype.asyncThisPropExp): (ChildClass.prototype.asyncThisPropBody): (ChildClass.prototype.asyncThisPropInEvalExp): (ChildClass.prototype.asyncThisPropInEvalBody): (ChildClass.prototype.asyncThisValueExp): (ChildClass.prototype.asyncThisValueBody): (ChildClass.prototype.asyncThisValueInEvalExp): (ChildClass.prototype.asyncThisValueInEvalBody): (ChildClass): (ChildClass2): (ChildClass2.prototype.classValue): (ChildClass2.prototype.get classProperty): * stress/async-arrow-functions-lexical-super-binding.js: 2017-01-09 Yusuke Suzuki [JSC] Prototype dynamic-import https://bugs.webkit.org/show_bug.cgi?id=165724 Reviewed by Saam Barati. * stress/import-basic.js: Added. (async.async.load): (async): (catch): * stress/import-from-eval.js: Added. (async): (catch): * stress/import-syntax.js: Added. (testSyntaxError): * stress/import-tests/cocoa.js: Added. (export.Cocoa): (export.hello): * stress/import-tests/multiple.js: Added. (export.result): * stress/import-tests/multiple2.js: Added. (export.ok): * stress/import-tests/should.js: Added. (export.shouldBe): (export.shouldThrow): * stress/modules-syntax-error.js: 2017-01-09 Commit Queue Unreviewed, rolling out r210476. https://bugs.webkit.org/show_bug.cgi?id=166859 "4% JSBench regression" (Requested by keith_mi_ on #webkit). Reverted changeset: "Add a slice intrinsic to the DFG/FTL" https://bugs.webkit.org/show_bug.cgi?id=166707 http://trac.webkit.org/changeset/210476 2017-01-06 Saam Barati Add a slice intrinsic to the DFG/FTL https://bugs.webkit.org/show_bug.cgi?id=166707 Reviewed by Filip Pizlo. * stress/array-slice-intrinsic.js: Added. (assert): (shallowEq): (runTest1): (runTest2): * stress/array-slice-jettison-on-constructor-change.js: Added. (assert): (runTest1): (runTest2): (addRandomProperties): (runTests): * stress/array-slice-osr-exit-2.js: Added. (assert): (Foo): (shallowEq): (runTest1): (runTest2): (addRandomProperties): (runTests): * stress/array-slice-osr-exit.js: Added. (assert): (Foo): (shallowEq): (runTest1): (runTest2): (addRandomProperties): (runTests): 2017-01-06 Michael Saboff @putByValDirect in Array.of and Array.from overwrites non-writable/configurable properties https://bugs.webkit.org/show_bug.cgi?id=153486 Reviewed by Saam Barati. New regression test. * stress/regress-153486.js: Added. (shouldEqual): (makeUnwriteableUnconfigurableObject): (testArrayOf): (testArrayFrom): (runTest): 2016-12-30 Filip Pizlo DeferGC::~DeferGC should be super cheap https://bugs.webkit.org/show_bug.cgi?id=166626 Reviewed by Saam Barati. * stress/slow-path-generator-updating-current-node-dfg.js: * stress/unshift-array-storage.js: 2017-01-04 JF Bastien WebAssembly: sections with the same name are allowed https://bugs.webkit.org/show_bug.cgi?id=166708 Reviewed by Saam Barati. * wasm/self-test/test_BuilderJSON.js: (SectionsWithSameCustomName): 2017-01-04 Saam Barati stress/spread-calling.js timing out on the bots https://bugs.webkit.org/show_bug.cgi?id=166689 Reviewed by Mark Lam. * stress/spread-calling.js: 2017-01-04 JF Bastien WebAssembly JS API: add Module.sections https://bugs.webkit.org/show_bug.cgi?id=165159 Reviewed by Mark Lam. As described here: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymodulecustomsections * wasm/Builder.js: allow custom sections to be duplicated * wasm/js-api/Module.customSection.js: Added. (assert.throws.WebAssembly.Module.prototype.customSections): (assert.eq): 2017-01-04 Saam Barati We don't properly handle exceptions inside the nativeCallTrampoline macro in the LLInt https://bugs.webkit.org/show_bug.cgi?id=163720 Reviewed by Mark Lam. * stress/bound-function-tail-call-with-exception.js: Added. (bar): (foo): (catch): 2017-01-03 JF Bastien WebAssembly JS API: check and test in-call / out-call values https://bugs.webkit.org/show_bug.cgi?id=164876 Reviewed by Saam Barati. * wasm.yaml: * wasm/assert.js: add an assert for NaN comparison * wasm/fuzz/export-function.js: Added. Generate random wasm export signatures, and call them with random parameters. (const.paramExporter): (const.setBuffer): (const.types.generate): (generate): * wasm/js-api/export-arity.js: Added. (const.paramExporter): Test that mismatched arities when JS calls wasm follow the defined semantics: i32 is 0, f32 / f64 are NaN. https://github.com/WebAssembly/design/blob/master/JS.md#exported-function-exotic-objects * wasm/js-api/export-void-is-undef.js: Added. Test that "void" wasm functions return "undefined" in JS. 2017-01-02 JF Bastien WebAssembly: handle and optimize wasm export → wasm import calls https://bugs.webkit.org/show_bug.cgi?id=165282 Reviewed by Saam Barati. * wasm/Builder.js: Add a Proxy to Builder.js, which intercepts unknown property lookups. This creates way better error messages on typos than 'undefined is not a function', which happens semi-frequently as I typo opcode names (and which one is a typo is hard to find because we chain builders). (const._isValidValue): (get target): (const._importFunctionContinuation): (const._importMemoryContinuation): (const._importTableContinuation): (const._exportFunctionContinuation): (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section): (export.default.Builder.prototype._registerSectionBuilders.this.Unknown): * wasm/LowLevelBinary.js: Add limited support for var{u}int64 (only the 32-bit values) (export.default.LowLevelBinary.prototype.varint32): (export.default.LowLevelBinary.prototype.varuint64): (export.default.LowLevelBinary.prototype.varint64): * wasm/function-tests/exceptions.js: update error message * wasm/function-tests/trap-load.js: update error message * wasm/function-tests/trap-store.js: update error message * wasm/js-api/wasm-to-wasm-bad-signature.js: Added. Test a bunch of bad wasm->wasm import signatures (const.makeImportee.signature.switch): (BadSignatureDropStartParams): * wasm/js-api/wasm-to-wasm.js: Added. Test 64-bit wasm->wasm import calls (const.callerModule): (const.calleeModule): (WasmToWasm): 2017-01-02 Saam Barati WebAssembly: Some loads don't take into account the offset https://bugs.webkit.org/show_bug.cgi?id=166616 Reviewed by Keith Miller. * wasm/function-tests/load-offset.js: Added. 2016-12-29 Saam Barati WebAssembly: Rebase spec-tests now that wabt has been updated to produce certain kinds of invalid modules https://bugs.webkit.org/show_bug.cgi?id=166491 Reviewed by Yusuke Suzuki. Based off these revisions: - spec: b055d01ea1dfdd7a5231ae779095435f836de97f - wabt: d0d44702c753f851b094615298a2f4d4e3c21035 The reason for the rebase is that wabt was updated to stop silently rejecting invalid modules. This was needed because some of the spec tests check to make sure that the module is invalid, but wabt was silently ignoring the errors and generating valid modules: https://github.com/WebAssembly/wabt/issues/256 * wasm.yaml: * wasm/spec-tests/address.wast.js: * wasm/spec-tests/binary.wast.js: * wasm/spec-tests/block.wast.js: * wasm/spec-tests/br.wast.js: * wasm/spec-tests/br_if.wast.js: * wasm/spec-tests/br_table.wast.js: * wasm/spec-tests/break-drop.wast.js: * wasm/spec-tests/call.wast.js: * wasm/spec-tests/call_indirect.wast.js: * wasm/spec-tests/comments.wast.js: * wasm/spec-tests/conversions.wast.js: * wasm/spec-tests/custom_section.wast.js: * wasm/spec-tests/endianness.wast.js: * wasm/spec-tests/exports.wast.js: * wasm/spec-tests/f32.wast.js: * wasm/spec-tests/f32_cmp.wast.js: * wasm/spec-tests/f64.wast.js: * wasm/spec-tests/f64_cmp.wast.js: * wasm/spec-tests/fac.wast.js: * wasm/spec-tests/float_exprs.wast.js: * wasm/spec-tests/float_literals.wast.js: * wasm/spec-tests/float_memory.wast.js: * wasm/spec-tests/float_misc.wast.js: * wasm/spec-tests/forward.wast.js: * wasm/spec-tests/func.wast.js: * wasm/spec-tests/func_ptrs.wast.js: * wasm/spec-tests/get_local.wast.js: * wasm/spec-tests/globals.wast.js: * wasm/spec-tests/i32.wast.js: * wasm/spec-tests/i64.wast.js: * wasm/spec-tests/imports.wast.js: * wasm/spec-tests/int_exprs.wast.js: * wasm/spec-tests/int_literals.wast.js: * wasm/spec-tests/left-to-right.wast.js: * wasm/spec-tests/linking.wast.js: * wasm/spec-tests/loop.wast.js: * wasm/spec-tests/memory.wast.js: * wasm/spec-tests/memory_redundancy.wast.js: * wasm/spec-tests/memory_trap.wast.js: * wasm/spec-tests/names.wast.js: * wasm/spec-tests/nop.wast.js: * wasm/spec-tests/resizing.wast.js: * wasm/spec-tests/return.wast.js: * wasm/spec-tests/select.wast.js: * wasm/spec-tests/set_local.wast.js: * wasm/spec-tests/skip-stack-guard-page.wast.js: * wasm/spec-tests/stack.wast.js: * wasm/spec-tests/start.wast.js: * wasm/spec-tests/store_retval.wast.js: * wasm/spec-tests/switch.wast.js: * wasm/spec-tests/tee_local.wast.js: * wasm/spec-tests/traps.wast.js: * wasm/spec-tests/typecheck.wast.js: * wasm/spec-tests/unreachable.wast.js: * wasm/spec-tests/unwind.wast.js: 2016-12-28 Saam Barati WebAssembly: Don't allow duplicate export names https://bugs.webkit.org/show_bug.cgi?id=166490 Reviewed by Keith Miller. * wasm.yaml: * wasm/function-tests/invalid-duplicate-export.js: Added. 2016-12-28 Saam Barati WebAssembly: Implement grow_memory and current_memory https://bugs.webkit.org/show_bug.cgi?id=166448 Reviewed by Keith Miller. I rewrote some of the testWasmModuleFunctions that used Memory to use the JS API since the jsc.cpp version can no longer use memory. * wasm.yaml: * wasm/function-tests/add-12.js: (testWasmModuleFunctions): * wasm/function-tests/br-if-loop-less-than.js: (testWasmModuleFunctions): * wasm/function-tests/brTableAsIf.js: (testWasmModuleFunctions): * wasm/function-tests/brTableManyValues.js: (testWasmModuleFunctions): * wasm/function-tests/brTableWithLoop.js: (testWasmModuleFunctions): * wasm/function-tests/dumb-eq-if-then-else.js: * wasm/function-tests/eqz.js: * wasm/function-tests/grow-memory-2.js: Added. (const.func): (assert.eq.instance.exports.foo): * wasm/function-tests/grow-memory-3.js: Added. * wasm/function-tests/grow-memory-4.js: Added. (const.func): * wasm/function-tests/grow-memory.js: Added. (binaryShouldNotParse): (assert.truthy): (assert.eq): (memory.grow): * wasm/function-tests/i32-load.js: (testWasmModuleFunctions): * wasm/function-tests/i32-load8-s.js: * wasm/function-tests/max.js: * wasm/function-tests/min.js: * wasm/js-api/memory-grow.js: Added. (i.i): (assertEq): * wasm/js-api/test_memory.js: * wasm/wasm.json: 2016-12-25 Yusuke Suzuki Propagate the source origin as much as possible https://bugs.webkit.org/show_bug.cgi?id=166348 Reviewed by Darin Adler. * stress/source-origin.js: Added. (shouldBe): 2016-12-24 Caio Lima [test262] Fixing mapped arguments object property test case https://bugs.webkit.org/show_bug.cgi?id=159398 Reviewed by Saam Barati. * stress/arguments-bizarre-behaviour-disable-enumerability.js: * stress/arguments-define-property.js: Added. (assert): (testProperties): * stress/arguments-non-configurable.js: Added. (assert): (tryChangeNonConfigurableDescriptor): (set tryChangeNonConfigurableDescriptor): (tryChangeWritableOfNonConfigurableDescriptor): * test262.yaml: 016-12-20 Caio Lima [test262] Fixing mapped arguments object property test case https://bugs.webkit.org/show_bug.cgi?id=159398 Reviewed by . * stress/arguments-bizarre-behaviour-disable-enumerability.js: * stress/arguments-define-property.js: Added. (assert): (testProperties): * stress/arguments-non-configurable.js: Added. (assert): (tryChangeNonConfigurableDescriptor): (set tryChangeNonConfigurableDescriptor): (tryChangeWritableOfNonConfigurableDescriptor): * test262.yaml: 2016-12-23 Keith Miller WebAssembly: trap on bad division. https://bugs.webkit.org/show_bug.cgi?id=164786 Reviewed by Mark Lam. Also, mark conversions as passing. * wasm.yaml: * wasm/wasm.json: 2016-12-22 Keith Miller WebAssembly: Make spec-tests/f32.wast.js and spec-tests/f64.wast.js pass https://bugs.webkit.org/show_bug.cgi?id=166447 Reviewed by Saam Barati. * wasm.yaml: * wasm/wasm.json: 2016-12-22 Saam Barati WebAssembly: Make calling Wasm functions that returns or takes an i64 as a parameter an early exception https://bugs.webkit.org/show_bug.cgi?id=166437 Reviewed by Keith Miller. * wasm.yaml: * wasm/function-tests/i64-from-js-exceptions.js: Added. (const.imp.import.sideEffects): (assert.throws.instance.exports.foo.valueOf): 2016-12-22 Mark Lam De-duplicate finally blocks. https://bugs.webkit.org/show_bug.cgi?id=160168 Reviewed by Saam Barati. Re-landing r209952 with a few new tests added in test-finally.js. * stress/deeply-nested-finallys.js: Copied from JSTests/stress/deeply-nested-finallys.js. - Tests many levels of finally nesting. This causes the old code to hang (and crashes eventually) while trying to generate bytecode for the exponentially duplicated finally blocks. The new code completes this test almost instantly. * stress/test-finally.js: Copied from JSTests/stress/test-finally.js. - Tests control flow through various permutations of finally blocks. 2016-12-22 Saam Barati WebAssembly: Make the spec-tests/address.wast.js test pass https://bugs.webkit.org/show_bug.cgi?id=166429 Reviewed by Keith Miller. * wasm.yaml: 2016-12-22 Keith Miller WebAssembly: The validator should not allow unused stack entries at the end of a block https://bugs.webkit.org/show_bug.cgi?id=166411 Reviewed by Saam Barati. Test cleanup and enable new passing tests. * wasm.yaml: * wasm/function-tests/br-if-as-return.js: 2016-12-22 Saam Barati WebAssembly: Make the spec-tests/start.wast.js test pass https://bugs.webkit.org/show_bug.cgi?id=166416 Reviewed by Yusuke Suzuki. * wasm.yaml: 2016-12-21 Keith Miller WebAssembly: Fix decode floating point constants in unreachable code https://bugs.webkit.org/show_bug.cgi?id=166400 Reviewed by Saam Barati. * wasm.yaml: 2016-12-21 Keith Miller WebAssembly: Allow br, br_if, and br_table to act as a return https://bugs.webkit.org/show_bug.cgi?id=166393 Reviewed by Saam Barati. Add tests for breaks acting as returns and fix tests that validate error messages. * wasm/function-tests/br-as-return.js: Added. * wasm/function-tests/br-if-as-return.js: Added. * wasm/function-tests/br-table-as-return.js: Added. * wasm/function-tests/if-no-else-non-void.js: * wasm/function-tests/struct.js: Added. * wasm/js-api/global-error.js: (assert.throws): * wasm/js-api/table.js: (assert.throws): 2016-12-21 Saam Barati WebAssembly: Import spec tests https://bugs.webkit.org/show_bug.cgi?id=166395 Rubber stamped by Keith Miller. This patch implements the Wasm spec's tests found here: https://github.com/WebAssembly/spec/tree/master/interpreter/test These tests are in .wast s-epxression format. To convert them to JS, I use a script from the wabt library, found here: https://github.com/WebAssembly/wabt/blob/master/test/run-gen-spec-js.py I also added a script that automatically imports the tests as JS files. The inputs to the script is the path to the Wasm spec git repo and the path to the wabt git repo. This will make importing new tests easy in the future. The wasm spec imported is at commit: b055d01ea1dfdd7a5231ae779095435f836de97f The wabt used to do the import is at commit: 622b42dced6d793e9d49e9b1fd1d1524defd1387 * wasm.yaml: * wasm/import-spec-tests.rb: Added. * wasm/spec-tests: Added. * wasm/spec-tests/address.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/binary.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/block.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/br.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/br_if.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/br_table.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/break-drop.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/call.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/call_indirect.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/comments.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/conversions.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/custom_section.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/endianness.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/exports.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/f32.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/f32_cmp.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/f64.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/f64_cmp.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/fac.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/float_exprs.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/float_literals.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/float_memory.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/float_misc.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/forward.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/func.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/func_ptrs.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/get_local.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/globals.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/i32.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/i64.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/imports.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/int_exprs.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/int_literals.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/left-to-right.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/linking.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/loop.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/memory.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/memory_redundancy.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/memory_trap.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/names.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/nop.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/resizing.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/return.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/select.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/set_local.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/skip-stack-guard-page.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/stack.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/start.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/store_retval.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/switch.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/tee_local.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/traps.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/typecheck.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/unreachable.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): * wasm/spec-tests/unwind.wast.js: Added. (register): (module): (instance): (assert_malformed): (assert_invalid): (assert_soft_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (assert_return): (assert_return_nan): 2016-12-20 Keith Miller Add support for global https://bugs.webkit.org/show_bug.cgi?id=165171 Reviewed by Filip Pizlo. * stress/global.js: Added. 2016-12-20 JF Bastien WebAssembly API: implement WebAssembly.LinkError https://bugs.webkit.org/show_bug.cgi?id=165805 Reviewed by Mark lam. Update all exception sites which now throw WebAssembly.LinkError. * wasm/js-api/element-data.js: * wasm/js-api/element.js: (assert.throws): * wasm/js-api/global-error.js: (new.Number): * wasm/js-api/table.js: (assert.throws): (new.WebAssembly.Table): * wasm/js-api/test_Data.js: * wasm/js-api/test_basic_api.js: (const.c.in.constructorProperties.switch): * wasm/js-api/test_memory.js: (test): (test.testMemImportError): Deleted. 2016-12-20 JF Bastien WebAssembly: unique function signatures https://bugs.webkit.org/show_bug.cgi?id=165957 Reviewed by Saam Barati. * wasm/function-tests/table-basic.js: FIXME is now addressed, though instance to instance calls still need work which bug #165282 will address (i.assert.eq.foo): * wasm/js-api/unique-signature.js: Added. (CallIndirectWithDuplicateSignatures): 2016-12-19 Mark Lam Rolling out r209974 and r209952. They break some websites in mysterious ways. Step 2: Rollout r209952. https://bugs.webkit.org/show_bug.cgi?id=166049 Not reviewed. * stress/deeply-nested-finallys.js: Removed. * stress/test-finally.js: Removed. 2016-12-19 Saam Barati WebAssembly: Make running Wasm tests take less time by reducing some tests' iteration count and by splitting some tests into different files https://bugs.webkit.org/show_bug.cgi?id=166017 Reviewed by Yusuke Suzuki. * wasm/function-tests/trap-load-2.js: Added. (assert): (wasmFrameCountFromError): (continuation): (i.catch): * wasm/function-tests/trap-load.js: (assert.continuation): Deleted. * wasm/function-tests/trap-store-2.js: Added. (import.Builder.from.string_appeared_here.assert): (continuation): (i.catch): * wasm/function-tests/trap-store.js: (assert.continuation): Deleted. (assert): Deleted. * wasm/js-api/test_memory.js: (test): 2016-12-18 Saam Barati WebAssembly: Implement the WebAssembly.compile and WebAssembly.validate https://bugs.webkit.org/show_bug.cgi?id=165936 Reviewed by Mark Lam. * wasm/js-api/Module-compile.js: Added. (async.testPromiseAPI): * wasm/js-api/test_basic_api.js: (const.c.in.constructorProperties.switch): * wasm/js-api/validate.js: Added. (assert.truthy.WebAssembly.validate.builder.WebAssembly): 2016-12-16 Mark Lam De-duplicate finally blocks. https://bugs.webkit.org/show_bug.cgi?id=160168 Reviewed by Keith Miller. * stress/deeply-nested-finallys.js: Added. - Tests many levels of finally nesting. This causes the old code to hang (and crashes eventually) while trying to generate bytecode for the exponentially duplicated finally blocks. The new code completes this test almost instantly. * stress/test-finally.js: Added. - Tests control flow through various permutations of finally blocks. 2016-12-16 Saam Barati WebAssembly: WasmB3IRGenerator should throw exceptions instead of crash https://bugs.webkit.org/show_bug.cgi?id=165834 Reviewed by Keith Miller. * wasm/function-tests/exceptions.js: Added. (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance): * wasm/function-tests/table-basic.js: (i.i.42.throw.new.Error): 2016-12-16 Keith Miller i64.eqz should use an Int64 zero https://bugs.webkit.org/show_bug.cgi?id=165942 Reviewed by Mark Lam. * wasm/wasm.json: 2016-12-15 Keith Miller Fix validation of non-void if blocks with no else https://bugs.webkit.org/show_bug.cgi?id=165938 Reviewed by Saam Barati. Add a new failing test and a fix an existing one. * wasm/function-tests/dead-call.js: * wasm/function-tests/if-no-else-non-void.js: Added. 2016-12-15 Keith Miller Wasm should not create empty unlinked callsites https://bugs.webkit.org/show_bug.cgi?id=165933 Reviewed by Mark Lam. * wasm/function-tests/dead-call.js: Added. 2016-12-15 JF Bastien WebAssembly: improve compilation error messages https://bugs.webkit.org/show_bug.cgi?id=163919 Reviewed by Saam Barati. Update error messages in these tests. Use the assert.throws facility in many of them which weren't already. * wasm/js-api/element.js: (assert.throws.new.WebAssembly.Module.builder.WebAssembly): (assert.throws): * wasm/js-api/global-error.js: (assert.throws.new.WebAssembly.Module.bin): (assert.throws): (new.Number): * wasm/js-api/table.js: (assert.throws.new.WebAssembly.Module.builder.WebAssembly): (assert.throws): (assertBadTableImport): * wasm/js-api/test_Data.js: (DataSectionWithoutMemory): * wasm/js-api/test_Start.js: (InvalidStartFunctionIndex): * wasm/js-api/test_basic_api.js: (const.c.in.constructorProperties.switch): 2016-12-15 JF Bastien WebAssembly API: improve data section errors https://bugs.webkit.org/show_bug.cgi?id=165733 Reviewed by Keith Miller. * wasm/js-api/element-data.js: Added. (ElementBeforeData.set const): (ElementBeforeData): check the order of initialization, which is observable on failure * wasm/js-api/test_Data.js: (DataSectionWithoutMemory): (DataSectionOffTheEnd): Deleted. (DataSectionPartlyOffTheEnd): Deleted. (DataSectionEmptyOffTheEnd): Deleted. (DataSectionSeenByStart): Deleted. 2016-12-15 Keith Miller Fix 64-bit shift family Wasm opcodes https://bugs.webkit.org/show_bug.cgi?id=165902 Reviewed by Geoffrey Garen. Add tests for shift family of instructions. Since we can't generate i64 values to pass to wasm we only compile the code for those functions. Attempting to generate any i64 code using these instructions would have been enough to cause the B3 Validation error anyway. * wasm/assert.js: * wasm/function-tests/rotl.js: Added. * wasm/function-tests/rotr.js: Added. * wasm/function-tests/shl.js: Added. * wasm/function-tests/shr-s.js: Added. * wasm/function-tests/shr-u.js: Added. * wasm/wasm.json: 2016-12-14 Keith Miller WebAssembly: test_BuilderJSON.js is broken https://bugs.webkit.org/show_bug.cgi?id=165893 Reviewed by Michael Saboff. * wasm/Builder.js: (const._isValidValue): * wasm/self-test/test_BuilderJSON.js: 2016-12-14 Keith Miller Unreviewed, fix test. * wasm/function-tests/i32-const.js: 2016-12-14 Keith Miller Wasm should decode constants correctly https://bugs.webkit.org/show_bug.cgi?id=165886 Reviewed by Saam Barati. * wasm/Builder.js: (const._isValidValue): * wasm/Builder_WebAssemblyBinary.js: (const.putOp): * wasm/LowLevelBinary.js: (export.default.LowLevelBinary.prototype.float): (export.default.LowLevelBinary.prototype.double): * wasm/function-tests/f32-const.js: Added. * wasm/function-tests/f64-const.js: Added. * wasm/function-tests/i32-const.js: Added. * wasm/wasm.json: 2016-12-14 Saam Barati WebAssembly: Add various low hanging fruit that will allow us to run the LLVM torture tests in Wasm https://bugs.webkit.org/show_bug.cgi?id=165883 Reviewed by Keith Miller. * wasm/Builder.js: (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section): * wasm/Builder_WebAssemblyBinary.js: (const.emitters.Export): * wasm/js-api/table.js: (assertBadBinary): (assertBadTable): (assert.truthy): * wasm/js-api/test_memory.js: (binaryShouldNotParse): (test): (test.testMemImportError): (assert.truthy): (assert): Deleted. 2016-12-14 Filip Pizlo DirectTailCall implementation needs to tell the shuffler what to put into the ArgumentCount explicitly https://bugs.webkit.org/show_bug.cgi?id=165882 Reviewed by Mark Lam. * stress/direct-tail-call-arity-mismatch-count-args.js: Added. (foo): (bar): 2016-12-14 Keith Miller WebAssembly JS API: implement Global https://bugs.webkit.org/show_bug.cgi?id=164133 Reviewed by Saam Barati. * wasm/Builder.js: (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section): * wasm/Builder_WebAssemblyBinary.js: (const.valueType.WASM.description.type.i32.type.const.putGlobalType): (const.putOp): (const.putInitExpr): (const.emitters.Import): (const.emitters.Global): (const.emitters.Export): (const.emitters.Code): * wasm/LowLevelBinary.js: (export.default.LowLevelBinary.prototype.varuint32): (export.default.LowLevelBinary.prototype.varint32): * wasm/js-api/global-error.js: Added. (catch): (assert.truthy): * wasm/js-api/global-external-init-from-import.js: Added. * wasm/js-api/global-internal-init-from-import.js: Added. * wasm/js-api/global-mutate.js: Added. (createInternalGlobalModule): * wasm/js-api/globals-export.js: Added. * wasm/js-api/globals-import.js: Added. * wasm/wasm.json: 2016-12-13 Saam Barati WebAssembly: implement the elements section https://bugs.webkit.org/show_bug.cgi?id=165715 Reviewed by Keith Miller. * wasm/Builder.js: (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section): (export.default.Builder.prototype._registerSectionBuilders.switch): * wasm/Builder_WebAssemblyBinary.js: (const.emitters.Element): * wasm/function-tests/basic-element.js: Added. * wasm/js-api/element.js: Added. (assertBadBinary): (assertBadBinary.badInstantiation): 2016-12-13 Saam Barati WebAssembly: implement the table section and table import https://bugs.webkit.org/show_bug.cgi?id=165716 Reviewed by Keith Miller. * wasm/Builder.js: (const._importMemoryContinuation): (const._importTableContinuation): (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section): (const._importMemoryContinuation.section): Deleted. (const): Deleted. (const._importMemoryContinuation.assert): Deleted. * wasm/Builder_WebAssemblyBinary.js: (const.putResizableLimits): (const.putTable): (const.emitters.Import): (const.emitters.Table): * wasm/function-tests/call-indirect-params.js: * wasm/function-tests/call-indirect.js: * wasm/function-tests/table-basic-2.js: Added. (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance): (func): * wasm/function-tests/table-basic.js: Added. (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance): * wasm/js-api/call-indirect-results.js: (const.wasmModuleWhichImportJS): Deleted. (MonomorphicImport): Deleted. * wasm/js-api/call-indirect.js: (const.wasmModuleWhichImportJS): (const.makeTable): (Polyphic2Import): (VirtualImport): (MonomorphicImport): Deleted. * wasm/js-api/table.js: Added. (assertBadBinary): (assert.truthy): (assertBadTable): (assertBadTableImport): (assertBadBinary.assertBadTableInstance): (assertBadTableInstance): (new.WebAssembly.Table): * wasm/js-api/test_basic_api.js: (const.c.in.constructorProperties.switch): 2016-12-13 Commit Queue Unreviewed, rolling out r209725. https://bugs.webkit.org/show_bug.cgi?id=165811 "Broke ARMv7 builds" (Requested by msaboff on #webkit). Reverted changeset: "REGRESSION(r209653): speedometer crashes making virtual slow path tailcalls" https://bugs.webkit.org/show_bug.cgi?id=165748 http://trac.webkit.org/changeset/209725 2016-12-12 Michael Saboff REGRESSION(r209653): speedometer crashes making virtual slow path tailcalls https://bugs.webkit.org/show_bug.cgi?id=165748 Reviewed by Filip Pizlo. New regression test. * stress/regress-165748.js: Added. (sum1): (sum2): (sum3): (sum4): (sum5): (sum6): (tailCaller): (test): 2016-12-12 Mark Lam Debug JSC test timeout: stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js.ftl-no-cjit. https://bugs.webkit.org/show_bug.cgi?id=164630 Reviewed by Keith Miller. Speculative fix for timeout issue. It looks like this test just runs a bit slower on debug builds. So, we'll give it a little more time to run. * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js: 2016-12-11 Saam Barati We should be able to throw exceptions from Wasm code and when Wasm frames are on the stack https://bugs.webkit.org/show_bug.cgi?id=165429 Reviewed by Keith Miller. * wasm/function-tests/trap-load.js: Added. (assert): (wasmFrameCountFromError): (i.catch): (assert.continuation): * wasm/function-tests/trap-store.js: Added. (import.Builder.from.string_appeared_here.assert): (i.catch): (assert.continuation): (assert): * wasm/js-api/test_memory_constructor.js: (assert): 2016-12-10 Commit Queue Unreviewed, rolling out r209653, r209654, r209663, and r209673. https://bugs.webkit.org/show_bug.cgi?id=165739 speedometer crashes (Requested by pizlo on #webkit). Reverted changesets: "JSVALUE64: Pass arguments in platform argument registers when making JavaScript calls" https://bugs.webkit.org/show_bug.cgi?id=160355 http://trac.webkit.org/changeset/209653 "Unreviewed build fix for 32 bit builds." http://trac.webkit.org/changeset/209654 "Unreviewed build fix for the CLOOP after r209653" http://trac.webkit.org/changeset/209663 "REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()" https://bugs.webkit.org/show_bug.cgi?id=165728 http://trac.webkit.org/changeset/209673 2016-12-10 Michael Saboff REGRESSION(r209653) Crash in CallFrameShuffler::snapshot() https://bugs.webkit.org/show_bug.cgi?id=165728 Reviewed by Filip Pizlo. New regression test. * stress/regress-165728.js: Added. (sum1): (sum2): (tailCaller): (test): 2016-12-10 Keith Miller Fix indirect_call if the result type is used. https://bugs.webkit.org/show_bug.cgi?id=165727 Reviewed by Michael Saboff. * wasm/js-api/call-indirect-results.js: Added. (const.wasmModuleWhichImportJS): (MonomorphicImport): 2016-12-10 Yusuke Suzuki [JSC] Module namespace object behaves like immutable prototype exotic object https://bugs.webkit.org/show_bug.cgi?id=165598 Reviewed by Mark Lam. * modules/namespace-prototype-assignment.js: Added. (else): (reportError): (shouldEqual): (shouldThrow): (stringify): (makeTestID): (doInternalSetPrototypeOf): (ordinarySetPrototypeOf): (setImmutablePrototype): (windowProxySetPrototypeOf): (initSetterExpectation): (throwIfNoExceptionPending): (objectSetPrototypeOf): (setUnderscoreProto): (reflectSetPrototypeOf): (setPrototypeOf): (newObjectProto.toString): (Symbol): (test): (runTests): * modules/namespace-set-prototype-of.js: Added. (shouldThrow): (TypeError.Cannot.set prototype): 2016-12-09 Michael Saboff JSVALUE64: Pass arguments in platform argument registers when making JavaScript calls https://bugs.webkit.org/show_bug.cgi?id=160355 Reviewed by Filip Pizlo. New microbenchmarks to measure call type performance. * microbenchmarks/calling-computed-args.js: Added. * microbenchmarks/calling-many-callees.js: Added. * microbenchmarks/calling-one-callee-fixed.js: Added. * microbenchmarks/calling-one-callee.js: Added. * microbenchmarks/calling-poly-callees.js: Added. * microbenchmarks/calling-poly-extra-arity-callees.js: Added. * microbenchmarks/calling-tailcall.js: Added. * microbenchmarks/calling-virtual-arity-fixup-callees.js: Added. * microbenchmarks/calling-virtual-arity-fixup-stackargs.js: Added. * microbenchmarks/calling-virtual-callees.js: Added. * microbenchmarks/calling-virtual-extra-arity-callees.js: Added. 2016-12-09 Keith Miller Wasm should support call_indirect https://bugs.webkit.org/show_bug.cgi?id=165718 Reviewed by Filip Pizlo. * wasm/Builder.js: * wasm/function-tests/call-indirect-params.js: Added. * wasm/function-tests/call-indirect.js: Added. * wasm/js-api/call-indirect.js: Added. (const.wasmModuleWhichImportJS): (MonomorphicImport): (Polyphic2Import): (VirtualImport): * wasm/wasm.json: 2016-12-09 JF Bastien WebAssembly: implement data section https://bugs.webkit.org/show_bug.cgi?id=165696 Reviewed by Keith Miller. As specified in https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#data-section Note that some of the interesting corner cases are ill-defined by the spec: https://github.com/WebAssembly/design/issues/897 * wasm/Builder.js: create a data section from JavaScript * wasm/Builder_WebAssemblyBinary.js: assemble the data section into the proper binary encoding (const.emitters.Data): * wasm/js-api/test_Data.js: Added. (DataSection): (DataSectionOffTheEnd): (DataSectionPartlyOffTheEnd): (DataSectionEmptyOffTheEnd): (DataSectionSeenByStart): * wasm/self-test/test_BuilderJSON.js: make sure the JSON structure is fine (this sanity checks before going to binary) 2016-12-09 JF Bastien WebAssembly JS API: implement start function https://bugs.webkit.org/show_bug.cgi?id=165150 Reviewed by Saam Barati. * wasm/Builder.js: allow building a .Start() * wasm/Builder_WebAssemblyBinary.js: * wasm/js-api/test_Start.js: Added. (const.emitters.Start): serialize a start section * wasm/self-test/test_BuilderJSON.js: validate the start section's content 2016-12-09 Saam Barati WebAssembly JS API: implement importing and defining Memory https://bugs.webkit.org/show_bug.cgi?id=164134 Reviewed by Keith Miller. * wasm/Builder.js: (const._importMemoryContinuation.section): (const._importMemoryContinuation.assert): (const._importMemoryContinuation): (const._exportFunctionContinuation.const): Deleted. (const._exportFunctionContinuation): Deleted. * wasm/Builder_WebAssemblyBinary.js: (const.emitters.Import): * wasm/js-api/test_basic_api.js: (const.c.in.constructorProperties.switch): * wasm/js-api/test_memory.js: Added. (assert): (binaryShouldNotParse): (test): (test.testMemImportError): * wasm/js-api/test_memory_constructor.js: Added. (assert): (throw.new.Error): (testInvalidSize): (assert.testInvalidInitial): (testInvalidInitial.testInvalidMaximum): (testInvalidInitial): (testInvalidMaximum): * wasm/self-test/test_BuilderJSON.js: 2016-12-08 JF Bastien WebAssembly: JSC::link* shouldn't need a CodeBlock https://bugs.webkit.org/show_bug.cgi?id=165591 Reviewed by Keith Miller. test that wasm -> JS works, including the IC * wasm/js-api/test_Instance.js: (const.wasmModuleWhichImportJS): (MonomorphicImport): (Polyphic2Import): (Polyphic3Import): (VirtualImport): 2016-12-08 Filip Pizlo Green the cloop bot by raising this threshold. * mozilla/js1_5/Array/regress-101964.js: 2016-12-08 JF Bastien WebAssembly JS API: wire up Instance imports https://bugs.webkit.org/show_bug.cgi?id=165118 Reviewed by Saam Barati. * wasm/js-api/test_Instance.js: add the test, disabled for now 2016-12-07 Keith Miller Add more missing trivial wasm ops. https://bugs.webkit.org/show_bug.cgi?id=165564 Add tests for drop and tee_local. Reviewed by Geoffrey Garen. * wasm/function-tests/drop.js: Added. * wasm/function-tests/nop.js: Added. * wasm/function-tests/tee-local.js: Added. 2016-12-06 Keith Miller Add support for truncation operators https://bugs.webkit.org/show_bug.cgi?id=165519 Reviewed by Geoffrey Garen. * wasm/function-tests/i32-trunc-s-f32.js: Added. * wasm/function-tests/i32-trunc-s-f64.js: Added. * wasm/function-tests/i32-trunc-u-f32.js: Added. * wasm/function-tests/i32-trunc-u-f64.js: Added. * wasm/function-tests/i64-trunc-s-f32.js: Added. * wasm/function-tests/i64-trunc-s-f64.js: Added. * wasm/function-tests/i64-trunc-u-f32.js: Added. * wasm/function-tests/i64-trunc-u-f64.js: Added. 2016-12-06 Mark Lam Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec. https://bugs.webkit.org/show_bug.cgi?id=165227 Reviewed by Saam Barati. * stress/get-from-scope-dynamic-onto-proxy.js: - Updated error message. * stress/proxy-dont-infinite-loop.js: Removed. * stress/proxy-json-path.js: Removed. * stress/rest-parameter-allocation-elimination-watchpoints-6.js: Removed. - Removed these tests because the issue they are testing relies on being able to set Object.prototype.__proto__ to something else (which is now not possible). 2016-12-05 Caitlin Potter [JSC] report unexpected token when "async" is followed by identifier https://bugs.webkit.org/show_bug.cgi?id=165091 Reviewed by Mark Lam. * stress/bug-165091.js: 2016-12-05 Keith Miller Add Wasm i64 to i32 conversion. https://bugs.webkit.org/show_bug.cgi?id=165378 Reviewed by Filip Pizlo. It turns out the wrap operation is just B3's Trunc. * wasm/wasm.json: 2016-12-04 Keith Miller Add support for Wasm ctz and popcnt https://bugs.webkit.org/show_bug.cgi?id=165369 Reviewed by Saam Barati. * wasm/function-tests/ctz.js: Added. * wasm/function-tests/popcnt.js: Added. 2016-12-03 JF Bastien WebAssembly: update binary format to 0xD version https://bugs.webkit.org/show_bug.cgi?id=165345 Reviewed by Keith Miller. As described in the following PR: https://github.com/WebAssembly/design/pull/836 Originally committed in r209175, reverted in r209242, and fixed in r209284. * wasm/Builder.js: (const._normalizeFunctionSignature): * wasm/Builder_WebAssemblyBinary.js: (const.emitters.Type): (const.emitters.Code): * wasm/LowLevelBinary.js: (export.default.LowLevelBinary.prototype.block_type): (export.default.LowLevelBinary.prototype.inline_signature_type): Deleted. * wasm/WASM.js: * wasm/js-api/test_basic_api.js: * wasm/self-test/test_BuilderWebAssembly.js: (EmptyModule): (CustomSection): * wasm/self-test/test_WASM.js: * wasm/wasm.json: 2016-12-02 Keith Miller Add Wasm copysign https://bugs.webkit.org/show_bug.cgi?id=165355 Reviewed by Filip Pizlo. * wasm/function-tests/copysign.js: Added. 2016-12-03 Commit Queue Unreviewed, rolling out r209298. https://bugs.webkit.org/show_bug.cgi?id=165359 broke the build (Requested by smfr on #webkit). Reverted changeset: "Add Wasm copysign" https://bugs.webkit.org/show_bug.cgi?id=165355 http://trac.webkit.org/changeset/209298 2016-12-02 Keith Miller Add Wasm copysign https://bugs.webkit.org/show_bug.cgi?id=165355 Reviewed by Filip Pizlo. * wasm/function-tests/copysign.js: Added. 2016-12-02 Keith Miller Unreviewed, fix git having a breakdown over trying to reland a rollout. 2016-12-02 Keith Miller Add Wasm floating point nearest and trunc https://bugs.webkit.org/show_bug.cgi?id=165339 Reviewed by Saam Barati. * wasm/function-tests/nearest.js: Added. * wasm/function-tests/trunc.js: Added. 2016-12-02 Caitlin Potter [JSC] add additional bit to JSTokenType bitfield https://bugs.webkit.org/show_bug.cgi?id=165091 Reviewed by Geoffrey Garen. * stress/bug-165091.js: Added. (shouldThrowSyntaxError): 2016-12-02 Commit Queue Unreviewed, rolling out r209275 and r209276. https://bugs.webkit.org/show_bug.cgi?id=165348 "broke the arm build" (Requested by keith_miller on #webkit). Reverted changesets: "Add Wasm floating point nearest and trunc" https://bugs.webkit.org/show_bug.cgi?id=165339 http://trac.webkit.org/changeset/209275 "Unreviewed, forgot to change instruction after renaming." http://trac.webkit.org/changeset/209276 2016-12-02 Keith Miller Add Wasm floating point nearest and trunc https://bugs.webkit.org/show_bug.cgi?id=165339 Reviewed by Filip Pizlo. * wasm/function-tests/nearest.js: Added. * wasm/function-tests/trunc.js: Added. 2016-12-02 JF Bastien WebAssembly: revert patch causing odd breakage https://bugs.webkit.org/show_bug.cgi?id=165308 Unreviewed. Bug #164724 seems to cause build issues which I haven't tracked down yet. WasmOps.h can't be found: ./Source/JavaScriptCore/wasm/WasmFormat.h:34:10: fatal error: 'WasmOps.h' file not found It's weird since the file is auto-generated and has been for a while. #164724 merely includes it in WasmFormat.h. * wasm/Builder.js: (const._normalizeFunctionSignature): * wasm/Builder_WebAssemblyBinary.js: (const.emitters.Type): (const.emitters.Code): * wasm/LowLevelBinary.js: (export.default.LowLevelBinary.prototype.inline_signature_type): (export.default.LowLevelBinary.prototype.block_type): Deleted. * wasm/WASM.js: * wasm/js-api/test_basic_api.js: * wasm/self-test/test_BuilderWebAssembly.js: (EmptyModule): (CustomSection): * wasm/self-test/test_WASM.js: * wasm/wasm.json: 2016-12-01 Ryan Haddad Skip flaky test ChakraCore/test/fieldopts/objtypespec-newobj-invalidation.1.js https://bugs.webkit.org/show_bug.cgi?id=162567 Reviewed by Saam Barati. * ChakraCore.yaml: 2016-12-01 Keith Miller Add wasm int to floating point opcodes https://bugs.webkit.org/show_bug.cgi?id=165252 Reviewed by Geoffrey Garen. Add tests for Wasm integral to floating point conversion opcodes. * wasm/function-tests/int-to-floating-point.js: Added. * wasm/wasm.json: 2016-12-01 Geoffrey Garen Land a test case for https://bugs.webkit.org/show_bug.cgi?id=165272 Reviewed by Saam Barati. * stress/marked-argument-buffer.js: Added. (allocate): (test.o.toString): (test): 2016-11-29 Per Arne Vollan [Win] Skip failing JSC tests. https://bugs.webkit.org/show_bug.cgi?id=165140 Reviewed by Mark Lam. * ChakraCore.yaml: * microbenchmarks/tan.js: 2016-11-30 JF Bastien WebAssembly builder: don't throw when checker not implemented https://bugs.webkit.org/show_bug.cgi?id=165219 Reviewed by Mark Lam. We should perform whichever checks we've implemented, and assume the rest are OK until bug #163421 is fixed. * wasm/Builder.js: * wasm/README.md: * wasm/function-tests/add-12.js: * wasm/function-tests/br-if-loop-less-than.js: * wasm/function-tests/brTableAsIf.js: * wasm/function-tests/brTableManyValues.js: * wasm/function-tests/brTableWithLoop.js: * wasm/function-tests/dumb-eq-if-then-else.js: * wasm/function-tests/dumb-less-than-fallthrough.js: * wasm/function-tests/dumb-less-than-ite.js: * wasm/function-tests/eqz.js: * wasm/function-tests/factorial.js: * wasm/function-tests/float-sub.js: * wasm/function-tests/i32-load.js: * wasm/function-tests/i32-load8-s.js: * wasm/function-tests/if-then-else-fallthrough.js: * wasm/function-tests/if-then-fallthrough.js: * wasm/function-tests/loop-mult.js: * wasm/function-tests/loop-sum.js: * wasm/function-tests/max.js: * wasm/function-tests/min.js: * wasm/function-tests/ret5.js: * wasm/function-tests/select.js: * wasm/self-test/test_BuilderJSON.js: 2016-11-29 JF Bastien WebAssembly JS API: improve Instance https://bugs.webkit.org/show_bug.cgi?id=164757 Reviewed by Keith Miller. An Instance's `exports` property wasn't populated with exports. A follow-up patch will do imports. A few things of note: - LowLevelBinary: support 3-byte integers. - LowLevelBinary: support proper UTF-8 2003 code points (instead of UTF-16). * wasm/Builder.js: * wasm/Builder_WebAssemblyBinary.js: wire up exports, stub other things out some more (const.emitters.Export): * wasm/LowLevelBinary.js: (export.default.LowLevelBinary.prototype.uint24): add, used for UTF-8 (export.default.LowLevelBinary.prototype.string): support UTF-8 (export.default.LowLevelBinary.prototype.getUint24): add, used for UTF-8 (export.default.LowLevelBinary.prototype.getVaruint1): was missing (export.default.LowLevelBinary.prototype.getString): support UTF-8 (export.default.LowLevelBinary): * wasm/js-api/test_Instance.js: instance.exports.answer() // <-- this is where the magic of this entire patch is (ExportedAnswerI32): * wasm/js-api/test_basic_api.js: punt test to later (const.c.in.constructorProperties.switch): * wasm/self-test/test_BuilderWebAssembly.js: UTF-8 (CustomSection): * wasm/self-test/test_LowLevelBinary_string.js: UTF-8 now works * wasm/self-test/test_LowLevelBinary_uint16.js: was missing one value * wasm/self-test/test_LowLevelBinary_uint24.js: Copied from JSTests/wasm/self-test/test_LowLevelBinary_uint8.js. * wasm/self-test/test_LowLevelBinary_uint8.js: was missing one value * wasm/self-test/test_LowLevelBinary_varuint1.js: Added. * wasm/utilities.js: this `dump` thing was useful (const._dump): 2016-11-29 Saam Barati We should be able optimize the pattern where we spread a function's rest parameter to another call https://bugs.webkit.org/show_bug.cgi?id=163865 Reviewed by Filip Pizlo. * microbenchmarks/default-derived-constructor.js: Added. (createClassHierarchy.let.currentClass): (createClassHierarchy): * stress/call-varargs-spread.js: Added. (assert): (bar): (foo): * stress/load-varargs-on-new-array-with-spread-convert-to-static-loads.js: Added. (assert): (baz): (bar): (foo): * stress/new-array-with-spread-with-normal-spread-and-phantom-spread.js: Added. (assert): (foo): (escape): (bar): * stress/phantom-new-array-with-spread-osr-exit.js: Added. (assert): (baz): (bar): (effects): (foo): * stress/phantom-spread-forward-varargs.js: Added. (assert): (test1.bar): (test1.foo): (test1): (test2.bar): (test2.foo): (test3.baz): (test3.bar): (test3.foo): (test4.baz): (test4.bar): (test4.foo): (test5.baz): (test5.bar): (test5.foo): * stress/phantom-spread-osr-exit.js: Added. (assert): (baz): (bar): (effects): (foo): * stress/spread-call-convert-to-static-call.js: Added. (assert): (baz): (bar): (foo): * stress/spread-forward-call-varargs-stack-overflow.js: Added. (assert): (identity): (bar): (foo): * stress/spread-forward-varargs-rest-parameter-change-iterator-protocol-2.js: Added. (assert): (baz.Array.prototype.Symbol.iterator): (baz): (bar): (foo): (test): * stress/spread-forward-varargs-rest-parameter-change-iterator-protocol.js: Added. (assert): (baz.Array.prototype.Symbol.iterator): (baz): (bar): (foo): * stress/spread-forward-varargs-stack-overflow.js: Added. (assert): (bar): (foo): 2016-11-29 Caitlin Potter [JSC] always wrap AwaitExpression operand in a new Promise https://bugs.webkit.org/show_bug.cgi?id=165181 Reviewed by Yusuke Suzuki. * stress/async-await-basic.js: (async.awaitedPromisesAreWrapped): 2016-11-29 Keith Miller Add simple way to implement Wasm ops that require more than one B3 opcode https://bugs.webkit.org/show_bug.cgi?id=165129 Reviewed by Geoffrey Garen. * wasm/function-tests/eqz.js: Added. * wasm/function-tests/max.js: Added. * wasm/function-tests/min.js: Added. * wasm/wasm.json: 2016-11-21 Yusuke Suzuki Crash in com.apple.JavaScriptCore: WTF::ThreadSpecific [JSC] speed up parsing of async functions https://bugs.webkit.org/show_bug.cgi?id=164808 Reviewed by Yusuke Suzuki. Add tests for line terminator following "async" keyword in async function syntax. * stress/async-await-syntax.js: (shouldBe): 2016-11-19 Mark Lam op_mod-* JSC tests needs a longer timeout too. https://bugs.webkit.org/show_bug.cgi?id=164994 Reviewed by Yusuke Suzuki. * stress/op_mod-ConstVar.js: * stress/op_mod-VarConst.js: * stress/op_mod-VarVar.js: 2016-11-19 Mark Lam Add --timeoutMultiplier option to allow some tests more time to run. https://bugs.webkit.org/show_bug.cgi?id=164951 Reviewed by Yusuke Suzuki. Extended the timeout for these tests by 50% more because they run quite slow on low-end machines. * stress/op_div-ConstVar.js: * stress/op_div-VarConst.js: * stress/op_div-VarVar.js: 2016-11-18 Yusuke Suzuki REGRESSION(r208867): JSC test failure: ChakraCore.yaml/ChakraCore/test/strict/05.arguments_sm.js.default https://bugs.webkit.org/show_bug.cgi?id=164929 Reviewed by Mark Lam. ES2017 drops arguments.caller and JavaScriptCore is updated to meet the spec. This patch rebaselines the result of ChakraCore test for JSC. * ChakraCore/test/strict/05.arguments_sm.baseline-jsc: 2016-11-18 Joseph Pecoraro Web Inspector: Generator functions should have a displayable name when shown in stack traces https://bugs.webkit.org/show_bug.cgi?id=164844 Reviewed by Yusuke Suzuki. * stress/generator-function-name.js: Add another test now that we name the inner generator function that we do not break the lexical resolution of names. 2016-11-17 Yusuke Suzuki [JSC] Drop arguments.caller https://bugs.webkit.org/show_bug.cgi?id=164859 Reviewed by Saam Barati. * stress/strict-mode-arguments-caller.js: Added. (strictArguments): (shouldBe): 2016-11-17 Keith Miller Add rotate to Wasm https://bugs.webkit.org/show_bug.cgi?id=164871 Reviewed by Filip Pizlo. * wasm/wasm.json: 2016-11-17 Keith Miller Add sqrt to Wasm https://bugs.webkit.org/show_bug.cgi?id=164877 Reviewed by Mark Lam. B3 already has a Sqrt opcode we just need to map Wasm to it. * wasm/wasm.json: 2016-11-17 Saam Barati Remove async/await compile time flag and enable tests https://bugs.webkit.org/show_bug.cgi?id=164828 Reviewed by Yusuke Suzuki. * stress/async-arrow-functions-lexical-arguments-binding.js: * stress/async-arrow-functions-lexical-new.target-binding.js: * stress/async-arrow-functions-lexical-super-binding.js: * stress/async-arrow-functions-lexical-this-binding.js: * stress/async-await-basic.js: * stress/async-await-long-loop.js: * stress/async-await-module-reserved-word.js: * stress/async-await-mozilla.js: (mozSyntaxErrors): * stress/async-await-reserved-word.js: * stress/async-await-syntax.js: * stress/async-await-throw-loop.js: * stress/async-function-create-nobaseline.js: * stress/async-function-create-optimized.js: * stress/async-function-declaration-sinking-no-double-allocate.js: * stress/async-function-declaration-sinking-osrexit.js: * stress/async-function-declaration-sinking-put.js: * stress/async-function-expression-sinking-no-double-allocate.js: * stress/async-function-expression-sinking-osrexit.js: * stress/async-function-expression-sinking-put.js: * test262.yaml: 2016-11-15 Mark Lam Make JSC test functions more robust. https://bugs.webkit.org/show_bug.cgi?id=164807 Reviewed by Keith Miller. * stress/jsc-test-functions-should-be-more-robust.js: Added. 2016-11-15 Keith Miller B3 should support UDiv/UMod https://bugs.webkit.org/show_bug.cgi?id=164811 Reviewed by Filip Pizlo. Link new instructions to wasm. * wasm/wasm.json: 2016-11-15 Saam Barati Debug JSC test timeout: stress/has-own-property-name-cache-symbols-and-strings.js.ftl-no-cjit-small-pool https://bugs.webkit.org/show_bug.cgi?id=163012 Unreviewed. This patch makes a test run for less time because it's timing out on the bots. * stress/has-own-property-name-cache-symbols-and-strings.js: 2016-11-15 Mark Lam The jsc shell's setImpureGetterDelegate() should ensure that the set value is an ImpureGetter. https://bugs.webkit.org/show_bug.cgi?id=164781 Reviewed by Geoffrey Garen and Michael Saboff. * stress/jsc-setImpureGetterDelegate-on-bad-type.js: Added. 2016-11-15 Yusuke Suzuki [DOMJIT] Allow using macro assembler scratches in FTL CheckDOM https://bugs.webkit.org/show_bug.cgi?id=164727 Reviewed by Filip Pizlo. * stress/check-dom-with-signature.js: Added. (shouldBe): (calling): (i.array.forEach): 2016-11-14 Caitlin Potter [JSC] do not reference AwaitExpression Promises in async function Promise chain https://bugs.webkit.org/show_bug.cgi?id=164753 Reviewed by Yusuke Suzuki. * asyncFunctionTests.yaml: * stress/async-await-long-loop.js: Added. (shouldBe): (async.longLoop): * stress/async-await-throw-loop.js: Added. (shouldBe): (async.thrower): (async.throwLoop): 2016-11-14 Keith Miller Add Wasm select https://bugs.webkit.org/show_bug.cgi?id=164743 Reviewed by Saam Barati. * wasm/function-tests/select.js: Added. 2016-11-14 Caitlin Potter [JSC] Handle new_async_func / new_async_func_exp in DFG / FTL https://bugs.webkit.org/show_bug.cgi?id=164037 Reviewed by Yusuke Suzuki. Add tests based on tests from https://trac.webkit.org/changeset/194216. * asyncFunctionTests.yaml: * stress/async-function-create-nobaseline.js: Added. * stress/async-function-create-optimized.js: Added. * stress/async-function-declaration-sinking-no-double-allocate.js: Added. * stress/async-function-declaration-sinking-osrexit.js: Added. * stress/async-function-declaration-sinking-put.js: Added. * stress/async-function-expression-sinking-no-double-allocate.js: Added. * stress/async-function-expression-sinking-osrexit.js: Added. * stress/async-function-expression-sinking-put.js: Added. 2016-11-14 Mark Lam Some of JSStringView::SafeView methods are not idiomatically safe for JSString to StringView conversions. https://bugs.webkit.org/show_bug.cgi?id=164701 Reviewed by Darin Adler. * stress/string-prototype-charCodeAt-on-too-long-rope.js: Added. 2016-11-14 Mark Lam RegExpObject::exec/match should handle errors gracefully. https://bugs.webkit.org/show_bug.cgi?id=155145 Reviewed by Keith Miller. * stress/regexp-prototype-exec-on-too-long-rope.js: Added. * stress/regexp-prototype-match-on-too-long-rope.js: Added. * stress/regexp-prototype-test-on-too-long-rope.js: Added. 2016-11-14 Mark Lam Enhance run-jsc-stress-test script to allow optional test specific options to be added for all test run configurations. https://bugs.webkit.org/show_bug.cgi?id=164695 Reviewed by Keith Miller. Replace use of runMisc* test run configurations with equivalents. * stress/licm-no-pre-header-nested.js: * stress/licm-no-pre-header.js: * stress/licm-pre-header-cannot-exit-nested.js: * stress/licm-pre-header-cannot-exit.js: * stress/make-dictionary-repatch.js: * stress/retry-cache-later.js: * stress/shadow-chicken-reading-from-scope-after-ftl-osr-exit-bytecode-liveness.js: * stress/slow-path-generator-updating-current-node-dfg.js: * stress/unshift-array-storage.js: 2016-11-11 Joseph Pecoraro test262: DataView with explicit undefined byteLength should be the same as it not being present https://bugs.webkit.org/show_bug.cgi?id=164453 Reviewed by Darin Adler. * stress/dataview-construct.js: Added. (assert): (shouldThrow): * test262.yaml: 2016-11-11 Joseph Pecoraro test262: DataView get methods should allow for missing offset, set methods should allow for missing value https://bugs.webkit.org/show_bug.cgi?id=164451 Reviewed by Darin Adler. * test262.yaml: 2016-11-11 Saam Barati We should have a more concise way of determining when we're varargs calling a function using rest parameters https://bugs.webkit.org/show_bug.cgi?id=164258 Reviewed by Yusuke Suzuki. * microbenchmarks/call-using-spread.js: Added. (bar): (foo): * microbenchmarks/spread-large-array.js: Added. (foo): (arrays.push): * microbenchmarks/spread-small-array.js: Added. (foo): * stress/spread-array-iterator-watchpoint-2.js: Added. (foo): (arrayIterator.next): * stress/spread-array-iterator-watchpoint.js: Added. (foo): (Array.prototype.Symbol.iterator): * stress/spread-non-array.js: Added. (assert): (foo): (let.customIterator.Symbol.iterator): (bar): 2016-11-11 Keith Miller Relocate wasm tests and actually add them to the test runner https://bugs.webkit.org/show_bug.cgi?id=164668 Reviewed by Yusuke Suzuki. This moves the Wasm tests from their current location down a level. Without relocating, the tests cannot properly be run by the wasm test runner. * wasm.yaml: * wasm/Builder.js: Fix typos, yay lazy synatx checking! * wasm/LowLevelBinary.js: Fix typos, yay lazy synatx checking! (export.default.LowLevelBinary.prototype.get return): * wasm/function-tests/add-12.js: Renamed from JSTests/wasm/js-api/function-tests/add-12.js. * wasm/function-tests/br-if-loop-less-than.js: Renamed from JSTests/wasm/js-api/function-tests/br-if-loop-less-than.js. * wasm/function-tests/brTableAsIf.js: Renamed from JSTests/wasm/js-api/function-tests/brTableAsIf.js. * wasm/function-tests/brTableManyValues.js: Renamed from JSTests/wasm/js-api/function-tests/brTableManyValues.js. * wasm/function-tests/brTableWithLoop.js: Renamed from JSTests/wasm/js-api/function-tests/brTableWithLoop.js. * wasm/function-tests/dumb-eq-if-then-else.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-eq-if-then-else.js. * wasm/function-tests/dumb-less-than-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-less-than-fallthrough.js. * wasm/function-tests/dumb-less-than-ite.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-less-than-ite.js. * wasm/function-tests/factorial.js: Renamed from JSTests/wasm/js-api/function-tests/factorial.js. * wasm/function-tests/float-sub.js: Renamed from JSTests/wasm/js-api/function-tests/float-sub.js. * wasm/function-tests/i32-load.js: Renamed from JSTests/wasm/js-api/function-tests/i32-load.js. * wasm/function-tests/i32-load8-s.js: Renamed from JSTests/wasm/js-api/function-tests/i32-load8-s.js. * wasm/function-tests/if-then-else-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/if-then-else-fallthrough.js. * wasm/function-tests/if-then-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/if-then-fallthrough.js. * wasm/function-tests/loop-mult.js: Renamed from JSTests/wasm/js-api/function-tests/loop-mult.js. * wasm/function-tests/loop-sum.js: Renamed from JSTests/wasm/js-api/function-tests/loop-sum.js. * wasm/function-tests/ret5.js: Renamed from JSTests/wasm/js-api/function-tests/ret5.js. * wasm/self-test/test_BuilderJSON.js: Rebasline 2016-11-11 Keith Miller Move Wasm tests to JS https://bugs.webkit.org/show_bug.cgi?id=164611 Reviewed by Geoffrey Garen. This patch translates most of the tests from testWasm.cpp to the JS testing api. Most of the ommited tests were earliest tests, which tested trivial things, like adding two constants. Some tests are ommited for other reasons, however. These are: 1) Tests using I64 since the testing api does not yet know how to handle 64-bit numbers. 2) Tests that would validate the memory of the module once wasm was done with it since that's not really possible in JS. In order to make such a translation easier this patch also adds some features to the JS testing api: 1) Blocks can now be done lexically by adding a lambda as the last argument of the block opcode. For example one can do: ... .Block("i32", b => b.I32Const(1) ) and the nested lambda will automatically have an end attached. 2) The JS testing api can now handle inline signature types. 3) Relocate some code to make it easier to follow and prevent 44 space indentation. 4) Rename varuint/varint to varuint32/varint32, this lets them be directly called from the wasm.json without being remapped. 5) Add support for Memory and Function sections to the Builder. 6) Add support for local variables. On the JSC side, we needed to expose a new function to validate the compiled wasm code behaves the way we expect. At least until the JS Wasm API is finished. The new validation function, testWasmModuleFunctions, takes an array buffer containing the wasm binary, the number of functions in the blob and tests for each of those functions. * wasm/Builder.js: (const._maybeRegisterType): (const): Deleted. (switch.typeof): Deleted. * wasm/Builder_WebAssemblyBinary.js: (const.emitters.Type): (const.emitters.Import): (const.emitters.Function): (const.emitters.Memory): (const.emitters.Code): (export.const.Binary): * wasm/LowLevelBinary.js: (export.default.LowLevelBinary.prototype.get return): (export.default.LowLevelBinary.prototype.varuint32): (export.default.LowLevelBinary.prototype.varint32): (export.default.LowLevelBinary.prototype.varuint1): (export.default.LowLevelBinary.prototype.varint7): (export.default.LowLevelBinary.prototype.varuint7): (export.default.LowLevelBinary.prototype.inline_signature_type): (export.default.LowLevelBinary.prototype.string): (export.default.LowLevelBinary.prototype.getVaruint32): (export.default.LowLevelBinary.prototype.getVarint32): (export.default.LowLevelBinary.prototype.getVaruint7): (export.default.LowLevelBinary.prototype.getString): (export.default.LowLevelBinary): (export.default.LowLevelBinary.prototype.varuint): Deleted. (export.default.LowLevelBinary.prototype.varint): Deleted. (export.default.LowLevelBinary.prototype.getVaruint): Deleted. (export.default.LowLevelBinary.prototype.getVarint): Deleted. * wasm/js-api/test_old_tests.js: Added. (ret5): (brTableWithLoop): (brTableManyValues): (run.brTableManyValues.brTableAsIf): (ifThenFallthrough): (ifThenElseFallthrough): (dumbLessThanFallthrough): (run.dumbLessThanFallthrough.floatSub): (run.floatSub.add12): (run.add12.factorial): (i32load): (run.i32load.i32load8s): (run.i32load8s.dumbEqIfThenElse): (run.dumbEqIfThenElse.dumbEqIfThenElse): (run.dumbEqIfThenElse.dumbLessThanIfThenElse): (run.dumbLessThanIfThenElse.loopSum): (run.loopSum.loopMult): (brIfLoopLessThan): (run.brIfLoopLessThan.run): * wasm/self-test/test_LowLevelBinary_varint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varint.js. * wasm/self-test/test_LowLevelBinary_varuint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varuint.js. * wasm/Builder.js: (const._maybeRegisterType): (const): Deleted. (switch.typeof): Deleted. * wasm/Builder_WebAssemblyBinary.js: (const.emitters.Type): (const.emitters.Import): (const.emitters.Function): (const.emitters.Memory): (const.emitters.Code): (export.const.Binary): * wasm/LowLevelBinary.js: (export.default.LowLevelBinary.prototype.get return): (export.default.LowLevelBinary.prototype.varuint32): (export.default.LowLevelBinary.prototype.varint32): (export.default.LowLevelBinary.prototype.varuint1): (export.default.LowLevelBinary.prototype.varint7): (export.default.LowLevelBinary.prototype.varuint7): (export.default.LowLevelBinary.prototype.inline_signature_type): (export.default.LowLevelBinary.prototype.string): (export.default.LowLevelBinary.prototype.getVaruint32): (export.default.LowLevelBinary.prototype.getVarint32): (export.default.LowLevelBinary.prototype.getVaruint7): (export.default.LowLevelBinary.prototype.getString): (export.default.LowLevelBinary): (export.default.LowLevelBinary.prototype.varuint): Deleted. (export.default.LowLevelBinary.prototype.varint): Deleted. (export.default.LowLevelBinary.prototype.getVaruint): Deleted. (export.default.LowLevelBinary.prototype.getVarint): Deleted. * wasm/js-api/function-tests/add-12.js: Added. * wasm/js-api/function-tests/br-if-loop-less-than.js: Added. * wasm/js-api/function-tests/brTableAsIf.js: Added. * wasm/js-api/function-tests/brTableManyValues.js: Added. * wasm/js-api/function-tests/brTableWithLoop.js: Added. * wasm/js-api/function-tests/dumb-eq-if-then-else.js: Added. * wasm/js-api/function-tests/dumb-less-than-fallthrough.js: Added. * wasm/js-api/function-tests/dumb-less-than-ite.js: Added. * wasm/js-api/function-tests/factorial.js: Added. * wasm/js-api/function-tests/float-sub.js: Added. * wasm/js-api/function-tests/i32-load.js: Added. * wasm/js-api/function-tests/i32-load8-s.js: Added. * wasm/js-api/function-tests/if-then-else-fallthrough.js: Added. * wasm/js-api/function-tests/if-then-fallthrough.js: Added. * wasm/js-api/function-tests/loop-mult.js: Added. * wasm/js-api/function-tests/loop-sum.js: Added. * wasm/js-api/function-tests/ret5.js: Added. * wasm/self-test/test_LowLevelBinary_varint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varint.js. * wasm/self-test/test_LowLevelBinary_varuint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varuint.js. 2016-11-11 Saam Barati We recursively grab a lock in the DFGBytecodeParser causing us to deadlock https://bugs.webkit.org/show_bug.cgi?id=164650 Reviewed by Geoffrey Garen. * stress/dont-dead-lock-put-by-val-as-put-by-id.js: Added. (ident): (let.o.set foo): (foo): 2016-11-11 Chris Dumez Unreviewed, rolling out r208584. Seems to have regressed Speedometer by 1% on Mac Reverted changeset: "We should have a more concise way of determining when we're varargs calling a function using rest parameters" https://bugs.webkit.org/show_bug.cgi?id=164258 http://trac.webkit.org/changeset/208584 2016-11-11 Chris Dumez Unreviewed, rolling out r208117 and r208160. Regressed Speedometer by >1.5% Reverted changesets: "We should have a way of profiling when a get_by_id is pure and to emit a PureGetById in the DFG/FTL" https://bugs.webkit.org/show_bug.cgi?id=163305 http://trac.webkit.org/changeset/208117 "Debug JSC test microbenchmarks/pure-get-by-id-cse-2.js timing out" https://bugs.webkit.org/show_bug.cgi?id=164227 http://trac.webkit.org/changeset/208160 2016-11-11 Saam Barati We should have a more concise way of determining when we're varargs calling a function using rest parameters https://bugs.webkit.org/show_bug.cgi?id=164258 Reviewed by Yusuke Suzuki. * microbenchmarks/call-using-spread.js: Added. (bar): (foo): * microbenchmarks/spread-large-array.js: Added. (foo): (arrays.push): * microbenchmarks/spread-small-array.js: Added. (foo): * stress/spread-array-iterator-watchpoint-2.js: Added. (foo): (arrayIterator.next): * stress/spread-array-iterator-watchpoint.js: Added. (foo): (Array.prototype.Symbol.iterator): * stress/spread-non-array.js: Added. (assert): (foo): (let.customIterator.Symbol.iterator): (bar): 2016-11-10 Mark Lam Fix broken have-a-bad-time-with-arguments.js test. https://bugs.webkit.org/show_bug.cgi?id=164626 Reviewed by Filip Pizlo. But also saved a copy of the broken one as broken-have-a-bad-time-with-arguments-for-gc-testing.js because coincidentally, it stresses the GC in ways that help reveal bugs. * stress/broken-have-a-bad-time-with-arguments-for-gc-testing.js: Added. (testFunction): (warmupFunction): (let.argsDeclIndex.in.argumentsDecls.let.indexToReturnIndex.in.indicesToReturn.let.insertElementActionIndex.in.insertElementActions.let.tierWarmupCountIndex.in.tierWarmupCounts.let.testArgsIndex.in.testArgsList.catch): * stress/have-a-bad-time-with-arguments.js: 2016-11-10 JF Bastien ASSERTION FAILED: length > offset encountered with wasm.yaml/wasm/js-api/test_Module.js.default-wasm https://bugs.webkit.org/show_bug.cgi?id=164597 Reviewed by Keith Miller. Trim the array buffer before returning it: it's optimistically over-allocated to avoid growing all the time, but when parsed it can't have extra content. * wasm/Builder_WebAssemblyBinary.js: (export.const.Binary): * wasm/LowLevelBinary.js: (export.default.LowLevelBinary.prototype.get return): 2016-11-10 Joseph Pecoraro test262: DataView / TypedArray methods should throw RangeErrors for negative numbers (ToIndex) https://bugs.webkit.org/show_bug.cgi?id=164450 Reviewed by Darin Adler. * stress/dataview-typedarray-toindex.js: Added. Tests for all cases where ToIndex should be used. * test262.yaml: New passing tests. 2016-11-10 Mark Lam Graph::methodOfGettingAValueProfileFor() should be returning the profile for the operand node. https://bugs.webkit.org/show_bug.cgi?id=164600 Reviewed by Filip Pizlo. * stress/osr-exit-on-op-negate-should-no-fail-assertions.js: Added. 2016-11-08 Yusuke Suzuki [JSC] Avoid cloned arguments allocation in ArrayPrototype methods https://bugs.webkit.org/show_bug.cgi?id=164502 Reviewed by Saam Barati. * stress/argument-intrinsic-basic.js: Added. (shouldBe): (builtin.createBuiltin): * stress/argument-intrinsic-inlining-with-result-escape.js: Added. (shouldBe): (builtin.createBuiltin): (escape): * stress/argument-intrinsic-nested-inlining.js: Added. (shouldBe): (builtin.createBuiltin): (builtinCaller1): (builtinCaller2): (escape): * stress/argument-intrinsic-not-convert-to-get-argument.js: Added. (shouldBe): (builtin.createBuiltin): * stress/argument-intrinsic-with-stack-write.js: Added. (shouldBe): (builtin.createBuiltin): 2016-11-09 Saam Barati Math.min()/Math.max() with no arguments is lowered incorrectly in the BytecodeParser https://bugs.webkit.org/show_bug.cgi?id=164464 Reviewed by Darin Adler. * stress/math-max-min-no-arguments.js: Added. (assert): (min): (max): (test): 2016-11-09 Saam Barati TypeProfiler and running GC collection on another thread don't play nicely with each other https://bugs.webkit.org/show_bug.cgi?id=164441 Reviewed by Geoffrey Garen. * typeProfiler/type-profiler-gc.js: Added. (bar): (foo): 2016-11-04 Mark Lam Error description code should be able to handle Symbol values. https://bugs.webkit.org/show_bug.cgi?id=164436 Reviewed by Filip Pizlo and Saam Barati. * stress/error-description-on-symbols-should-not-crash.js: Added. 2016-11-03 Geoffrey Garen EvalCodeCache should not give up in strict mode and other cases https://bugs.webkit.org/show_bug.cgi?id=164357 Reviewed by Michael Saboff. * microbenchmarks/eval-cached.js: Added. 45x faster now. * stress/eval-cached.js: Added. Try running the same eval text in a bunch of different scopes and verify that we access the right scope. 2016-11-04 JF Bastien WebAssembly JS API: implement more sections https://bugs.webkit.org/show_bug.cgi?id=164023 Reviewed by Keith Miller. On the JSC side: - Put in parser stubs for all WebAssembly sections. - Parse Import, Export sections. - 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. - Encapsulate all parsed module information into its own structure, making it easier to pass around (from parser to Plan to Module to Instance). - Create WasmFormat.cpp to hold parsed module information's dtor to avoid including WasmMemory.h needlessly. - parseCode: avoid overflow through function size. - Remove all remainders of polyfill-prototype-1, and update license. - Add missing WasmOps.h and WasmValidateInlines.h auto-generation for cmake build. On the Builder.js testing side: - Implement Type, Import (function only), Export (function only) sections. - Check section order and uniqueness. - Optionally auto-generate the Type section from subsequent Export / Import / Code entries. - Allow re-exporting an import. * wasm/Builder.js: build type, import, and export sections (const._normalizeFunctionSignature): * wasm/Builder_WebAssemblyBinary.js: Added. Forked from Builder.js (const.emitters.Type): (const.emitters.Import): (const.emitters.Function): (const.emitters.Table): (const.emitters.Memory): (const.emitters.Global): (const.emitters.Export): (const.emitters.Start): (const.emitters.Element): (const.emitters.Code): (const.emitters.Data): (export.const.Binary): * wasm/LowLevelBinary.js: Add a few useful outputs (export.default.LowLevelBinary.prototype.varuint1): (export.default.LowLevelBinary.prototype.varint7): * wasm/WASM.js: value type and external kind helpers * wasm/assert.js: array element-wise equality comparison (const._eq): * wasm/js-api/test_Module.js: (ModuleWithImports): * 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 (const.assertOpThrows): (SectionsWithSameCustomName): (TwoTypeSections): (EmptyImportSection): (ImportBeforeTypeSections): * wasm/self-test/test_BuilderWebAssembly.js: remove a test which wasn't helpful and is now obsolete (CustomSection): 2016-11-03 Mark Lam ClonedArguments need to also support haveABadTime mode. https://bugs.webkit.org/show_bug.cgi?id=164200 Reviewed by Geoffrey Garen. * stress/have-a-bad-time-with-arguments.js: Added. 2016-11-03 Filip Pizlo DFG plays fast and loose with the shadow values of a Phi https://bugs.webkit.org/show_bug.cgi?id=164309 Reviewed by Saam Barati. This test demonstrates why the DFG needs to recognize the shadow value of a Phi. * stress/dfg-ssa-swap.js: Added. (foo): 2016-11-03 Commit Queue Unreviewed, rolling out r208364. https://bugs.webkit.org/show_bug.cgi?id=164402 broke the build (Requested by smfr on #webkit). Reverted changeset: "DFG plays fast and loose with the shadow values of a Phi" https://bugs.webkit.org/show_bug.cgi?id=164309 http://trac.webkit.org/changeset/208364 2016-11-03 Filip Pizlo DFG plays fast and loose with the shadow values of a Phi https://bugs.webkit.org/show_bug.cgi?id=164309 Reviewed by Saam Barati. This test demonstrates why the DFG needs to recognize the shadow value of a Phi. * stress/dfg-ssa-swap.js: Added. (foo): 2016-11-03 Saam Barati Asking for a value profile prediction should be defensive against not finding a value profile https://bugs.webkit.org/show_bug.cgi?id=164306 Reviewed by Mark Lam. * stress/inlined-tail-call-in-inlined-setter-should-not-crash-when-getting-value-profile.js: Added. (let.o.set foo): (bar): 2016-11-02 Saam Barati Allocation elimination of rest parameter doesn't take into account indexed properties on Array.prototype/Object.prototype https://bugs.webkit.org/show_bug.cgi?id=164301 Reviewed by Geoffrey Garen. * stress/rest-parameter-allocation-elimination-watchpoints-2.js: Added. (assert): (foo): * stress/rest-parameter-allocation-elimination-watchpoints-3.js: Added. (assert): (foo): * stress/rest-parameter-allocation-elimination-watchpoints-4.js: Added. (assert): (foo): * stress/rest-parameter-allocation-elimination-watchpoints-5.js: Added. (assert): (foo): * stress/rest-parameter-allocation-elimination-watchpoints-6.js: Added. (assert): (foo): * stress/rest-parameter-allocation-elimination-watchpoints.js: Added. (assert): (foo): 2016-11-01 Saam Barati We should be able to eliminate rest parameter allocations https://bugs.webkit.org/show_bug.cgi?id=163925 Reviewed by Filip Pizlo. * microbenchmarks/rest-parameter-allocation-elimination.js: Added. (assert): (test1.bar): (test1): (test2.jaz): (test2.jaz2.kaz): (test2.jaz2): (test2): (test3.foo): (test3.baz): (test3.jaz): (test3): (test4.baz): (test4.jaz): (test4): (test5.baz): (test5.jaz): (test5): (test6.baz): (test6.jaz): (test6): (test7.baz): (test7.jaz): (test7.check): (test7): (test8.baz): (test8.jaz): (test8.check): (test8): (test9.baz): (test9.jaz): (test9.check): (test9): (test10.baz): (test10.jaz): (test10): (test11.bar): (test11.foo): (test11.makeArguments): (test11.): (test12): (test12.bar): (test12.foo): (test12.makeArguments): (test12.): (test13.bar): (test13.top): (test13.foo): (test13.makeArguments): (test13.): (test13): (test14.bar): (test14.top): (test14.foo): (test14.makeArguments): (test14.): (test14): (test15.bar): (test15.top): (test15.foo): (test15.makeArguments): (test15.): (test15): 2016-11-01 Commit Queue Unreviewed, rolling out r208208 and r208210. https://bugs.webkit.org/show_bug.cgi?id=164276 This change caused 28 JSC test failures. (Requested by ryanhaddad on #webkit). Reverted changesets: "We should be able to eliminate rest parameter allocations" https://bugs.webkit.org/show_bug.cgi?id=163925 http://trac.webkit.org/changeset/208208 "Fix the EFL build." http://trac.webkit.org/changeset/208210 2016-10-31 Filip Pizlo JSC should support SharedArrayBuffer https://bugs.webkit.org/show_bug.cgi?id=163986 Reviewed by Keith Miller. This adds our own test for the various corner cases of SharedArrayBuffer. This test is meant to check all of the things that don't require concurrency. * stress/SharedArrayBuffer.js: Added. (checkAtomics): (shouldFail): (Symbol): (runAtomic): 2016-10-31 Saam Barati We should be able to eliminate rest parameter allocations https://bugs.webkit.org/show_bug.cgi?id=163925 Reviewed by Filip Pizlo. * microbenchmarks/rest-parameter-allocation-elimination.js: Added. (assert): (test1.bar): (test1): (test2.jaz): (test2.jaz2.kaz): (test2.jaz2): (test2): (test3.foo): (test3.baz): (test3.jaz): (test3): (test4.baz): (test4.jaz): (test4): (test5.baz): (test5.jaz): (test5): (test6.baz): (test6.jaz): (test6): (test7.baz): (test7.jaz): (test7.check): (test7): (test8.baz): (test8.jaz): (test8.check): (test8): (test9.baz): (test9.jaz): (test9.check): (test9): (test10.baz): (test10.jaz): (test10): (test11.bar): (test11.foo): (test11.makeArguments): (test11.): (test12): (test12.bar): (test12.foo): (test12.makeArguments): (test12.): (test13.bar): (test13.top): (test13.foo): (test13.makeArguments): (test13.): (test13): (test14.bar): (test14.top): (test14.foo): (test14.makeArguments): (test14.): (test14): (test15.bar): (test15.top): (test15.foo): (test15.makeArguments): (test15.): (test15): 2016-10-31 Saam Barati Debug JSC test microbenchmarks/pure-get-by-id-cse-2.js timing out https://bugs.webkit.org/show_bug.cgi?id=164227 Unreviewed timeout fix. * microbenchmarks/pure-get-by-id-cse-2.js: 2016-10-31 Keith Miller autogenerated files from wasm.json should be in derived sources. https://bugs.webkit.org/show_bug.cgi?id=164152 Reviewed by Filip Pizlo. Delete generation script since it is no longer used. * wasm/generate-wasmops-header.js: Removed. 2016-10-29 Yusuke Suzuki [JSC] JSON.stringify should handle Proxy which is non JSArray but isArray is true https://bugs.webkit.org/show_bug.cgi?id=164123 Reviewed by Mark Lam. * stress/json-stringify-with-non-jsarray-array.js: Added. (shouldBe): (shouldBe.JSON.stringify.new.Proxy): 2016-10-29 Saam Barati We should have a way of profiling when a get_by_id is pure and to emit a PureGetById in the DFG/FTL https://bugs.webkit.org/show_bug.cgi?id=163305 Reviewed by Keith Miller. * microbenchmarks/pure-get-by-id-cse-2.js: Added. (foo): * microbenchmarks/pure-get-by-id-cse.js: Added. (foo): * stress/pure-get-by-id-cse-correctness.js: Added. (assert): (foo): * stress/pure-get-by-id-on-non-object.js: Added. (assert): (foo): 2016-10-28 Csaba Osztrogonác Skip JSTests/microbenchmarks/dense-set.js on memory limited devices https://bugs.webkit.org/show_bug.cgi?id=164128 Reviewed by Mark Lam. * microbenchmarks/dense-set.js: 2016-10-20 Caitlin Potter [JSC] implement runtime for async functions https://bugs.webkit.org/show_bug.cgi?id=163760 Reviewed by Yusuke Suzuki. * stress/async-await-basic.js: Added. (shouldBe): (shouldBeAsync): (shouldThrow): (shouldThrowAsync): (shouldThrowSyntaxError): (let.AsyncFunction.async): (async.asyncFunctionForProto): (Object.getPrototypeOf.async): (Object.getPrototypeOf.async.method): (async): (async.method): (async.asyncNonConstructorDecl): (shouldThrow.new.async): (shouldThrow.new.async.nonConstructor): (async.asyncDecl): (async.f): (MyError): (async.asyncDeclThrower): (shouldThrowAsync.async): (resolveLater): (rejectLater): (async.resumeAfterNormal): (O.async.resumeAfterNormal): (resumeAfterNormalArrow.async): (async.resumeAfterThrow): (O.async.resumeAfterThrow): (resumeAfterThrowArrow.async): (catch): * stress/async-await-module-reserved-word.js: Added. (shouldThrow): (SyntaxError.Canstring_appeared_hereawait.checkModuleSyntaxError.String.raw.await): (checkModuleSyntaxError.String.raw.await): (checkModuleSyntaxError.String.raw.async.await): (SyntaxError.Cannot.declare.named): * stress/async-await-mozilla.js: Added. (shouldBe): (shouldBeAsync): (shouldThrow): (shouldThrowAsync): (assert): (shouldThrowSyntaxError): (mozSemantics.async.empty): (mozSemantics.async.simpleReturn): (mozSemantics.async.simpleAwait): (mozSemantics.async.simpleAwaitAsync): (mozSemantics.async.returnOtherAsync): (mozSemantics.async.simpleThrower): (mozSemantics.async.delegatedThrower): (mozSemantics.async.tryCatch): (mozSemantics.async.tryCatchThrow): (mozSemantics.async.wellFinally): (mozSemantics.async.finallyMayFail): (mozSemantics.async.embedded.async.inner): (mozSemantics.async.embedded): (mozSemantics.async.fib): (mozSemantics.async.isOdd.async.isEven): (mozSemantics.async.isOdd): (mozSemantics.hardcoreFib.async.fib2): (mozSemantics.namedAsyncExpr.async.simple): (mozSemantics.async.executionOrder.async.first): (mozSemantics.async.executionOrder.async.second): (mozSemantics.async.executionOrder.async.third): (mozSemantics.async.executionOrder): (mozSemantics.async.miscellaneous): (mozSemantics.thrower): (mozSemantics.async.defaultArgs): (mozSemantics.shouldThrow): (mozSemantics): (mozMethods.X): (mozMethods.X.prototype.async.getValue): (mozMethods.X.prototype.setValue): (mozMethods.X.prototype.async.increment): (mozMethods.X.prototype.async.getBaseClassName): (mozMethods.X.async.getStaticValue): (mozMethods.Y.prototype.async.getBaseClassName): (mozMethods.Y): (mozFunctionNameInferrence.async.test): (mozSyntaxErrors): * stress/async-await-reserved-word.js: Added. (assert): (shouldThrowSyntaxError): (AsyncFunction.async): * stress/async_arrow_functions_lexical_arguments_binding.js: Added. (shouldBe): (shouldBeAsync): (shouldThrowAsync): (noArgumentsArrow2.async): * stress/async_arrow_functions_lexical_new.target_binding.js: Added. (shouldBe): (shouldBeAsync): (shouldThrowAsync): (C1): (C2): (shouldThrowAsync.async): * stress/async_arrow_functions_lexical_super_binding.js: Added. (shouldBe): (shouldBeAsync): (BaseClass.prototype.baseClassValue): (BaseClass.prototype.get property): (BaseClass): (ChildClass.prototype.asyncSuperProp): (ChildClass.prototype.asyncSuperProp2): (ChildClass): (ChildClass2): * stress/async_arrow_functions_lexical_this_binding.js: Added. (shouldBe): (shouldBeAsync): (d.y): 2016-10-28 Csaba Osztrogonác Skip 2 JS stress tests on memory limited devices https://bugs.webkit.org/show_bug.cgi?id=164125 Unreviewed quick fix to unbreak JSCOnly ARM bots as soon as possible. * stress/joined-strings-should-not-exceed-max-string-length.js: * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js: 2016-10-27 Caitlin Potter [JSC] forbid lexical redeclaration of generator formal parameters https://bugs.webkit.org/show_bug.cgi?id=163930 Reviewed by Yusuke Suzuki. * stress/async-await-syntax.js: * stress/generator-syntax.js: (testSyntaxError.gen): (testSyntaxError.arguments): (testSyntaxError.eval): * test262.yaml: 2016-10-26 JF Bastien WebAssembly API: implement Instance As described in: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblyinstance-objects - Take ownership of Wasm::Plan's compilation result when successfully creating a JSWebAssemblyModule object. - Construct a basic Instance with a Module. - Handle second argument (importObject) of WebAssembly.Instance. - Add reference text from the spec to WebAssembly.Module's code. - Expose and test an empty 'exports' ModuleNamespaceObject on WebAssembly.Instance. The implementation isn't complete yet: it relies on further work for which I've filed bugs. WebAssembly API: implement Instance https://bugs.webkit.org/show_bug.cgi?id=163998 Reviewed by Keith Miller. * wasm/js-api/test_Instance.js: Added. (EmptyModule): use the Builder, create the simplest Module possible, and create an Instance from it * wasm/js-api/test_basic_api.js: (const.c.in.constructorProperties.switch): basic tests of the API 2016-10-26 Mark Lam JSGenericTypedArrayView::set() should check for exceptions. https://bugs.webkit.org/show_bug.cgi?id=164007 Reviewed by Filip Pizlo. * stress/typed-array-view-set-should-not-crash-on-exception.js: Added. 2016-10-25 Mark Lam String.prototype.replace() should throw an OutOfMemoryError when using too much memory. https://bugs.webkit.org/show_bug.cgi?id=163996 Reviewed by Geoffrey Garen. * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js: Added. 2016-10-25 Mark Lam JSStringJoiner::joinedLength() should limit joined string lengths to INT_MAX. https://bugs.webkit.org/show_bug.cgi?id=163937 Reviewed by Geoffrey Garen. * stress/joined-strings-should-not-exceed-max-string-length.js: Added. 2016-10-25 JF Bastien WebAssembly JS API: simple Module test https://bugs.webkit.org/show_bug.cgi?id=163963 Reviewed by Filip Pizlo. * wasm/LowLevelBinary.js: (export.default.LowLevelBinary.prototype.get return): get the ArrayBuffer (export.default.LowLevelBinary.prototype.hexdump): Deleted. (export.default.LowLevelBinary.prototype._maybeGrow): Deleted. * wasm/js-api/test_Module.js: Added. (EmptyModule): The most basic module possible 2016-10-25 JF Bastien WebAssembly JS API: implement Module This implementation allows us to: - Syncrhonously create a WebAssembly.Module with a typed array. - Creates a compilation plan. - Parse the Module and creates corresponding code. - Throw WebAssembly.CompileError with mildly helpful [*] error messages on failure. Consult the API documentation for expected behavior: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymodule-constructor For now the implementation discards the generated code. The next steps will be: - Expose a Module's exports. - Implement WebAssembly.Instance, which allows instantiating and running a compiled Module. - Beef up the testing infrastructure under JSTests/wasm so that more complex modules can be created and tested (instead of writing the bits by hand). This patch also: - Adds assert.instanceof in assert.js. - Refactors Wasm::Parser and friends to accept const uint8_t* as well as a Vector, to avoid copying when invoked synchronously. - Remove useless Structure from some of the wasm constructors: they're already on the JSGlobalObject, visited properly and all. - Fix off-by-one error in parsing: Parser::parseUInt32 failed if the integer was exactly at end of file. [*] On error messages while parsing: I filed https://bugs.webkit.org/show_bug.cgi?id=163919 WebAssembly JS API: implement Module https://bugs.webkit.org/show_bug.cgi?id=163903 Reviewed by Keith Miller. * wasm/assert.js: use underscore in name, and remove when exporting to avoid clasing with builtin names (const._notUndef): (const._isUndef): (const._eq): (const._ge): (const._throws): * wasm/js-api/test_basic_api.js: test the WebAssembly.Module API (const.c.in.constructorProperties.switch): 2016-10-25 Keith Miller Add trivial Wasm conversion opcodes https://bugs.webkit.org/show_bug.cgi?id=163950 Reviewed by Filip Pizlo. This patch differentiates between Wasm opcodes that are trivially mapped to a B3 opcode and those that are not. Some of the Wasm opcodes that are currently a non-simple opcode will become simple as we add B3 opcodes for Wasm operations. The remaining opcodes will need to be added via patchpoints in a later patch. * wasm/generate-wasmops-header.js: (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.Wasm.inline.bool.isSimple): * wasm/wasm.json: 2016-10-24 Yusuke Suzuki Arrow functions with concise bodies cannot return regular expressions https://bugs.webkit.org/show_bug.cgi?id=163162 Reviewed by Filip Pizlo. * ChakraCore/test/Operators/instanceof.baseline-jsc: * ChakraCore/test/Regex/nul_character.baseline-jsc: * ChakraCore/test/es5/Lex_u3.baseline-jsc: * stress/parse-regexp-as-token.js: Added. (shouldBe): 2016-10-24 Keith Miller Wasm should support floating point operations. https://bugs.webkit.org/show_bug.cgi?id=163770 Reviewed by Michael Saboff. Add appropriate b3op names for floating point wasm bytecodes, where they exist. Also, fix some WASM => Wasm in WasmOps.h generator script that I missed the first time I made the change. * wasm/generate-wasmops-header.js: (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.template.typename.Int.inline.bool.isValidOpType): Deleted. (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.BinaryOpType): Deleted. (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.UnaryOpType): Deleted. (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.LoadOpType): Deleted. (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.StoreOpType): Deleted. (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.undef.CREATE_ENUM_VALUE.inline.bool.isControlOp): Deleted. * wasm/wasm.json: 2016-10-21 Saam Barati SpeculativeJIT::compileTryGetById needs to pass in NeedsToSpill along both the cell speculation and untyped speculation path https://bugs.webkit.org/show_bug.cgi?id=163622 Reviewed by Yusuke Suzuki. * stress/try-get-by-id-should-spill-registers-dfg.js: Added. (let.f.createBuiltin): 2016-10-21 Caitlin Potter [JSC] don't crash when arguments to `new Function()` produce unexpected AST https://bugs.webkit.org/show_bug.cgi?id=163748 Reviewed by Mark Lam. * stress/regress-163748.js: Added. (assert): (shouldThrowSyntaxError): (GeneratorFunction): 2016-10-20 Keith Miller Add support for WASM calls https://bugs.webkit.org/show_bug.cgi?id=161727 Reviewed by Filip Pizlo and Michael Saboff. Add members of the Call category to the WASMOps special group. * wasm/generate-wasmops-header.js: 2016-10-20 Yusuke Suzuki [JSC] Drop isEnvironmentRecord type info flag and use JSType information instead https://bugs.webkit.org/show_bug.cgi?id=163761 Reviewed by Keith Miller. * modules/string-prototype-module-scope.js: Added. (shouldBe): (catch): (refer): * stress/string-prototype-scopes-global-lexical-environment-strict.js: Added. (shouldBe): (catch): * stress/string-prototype-scopes-global-lexical-environment.js: Added. (shouldBe): (catch): * stress/string-prototype-scopes-strict.js: Added. (shouldBe): (catch): (try.refer): (refer): * stress/string-prototype-scopes.js: Added. (shouldBe): (catch): (try.refer): (refer): (object.toString): (with): 2016-10-20 JF Bastien WebAssembly API: implement exception constructors properly - Rename WebAssemblyObject to JSWebAssembly for consistency. - WebAssembly object now has its own prototype: add WebAssemblyPrototype, and use it to register JSWebAssembly's function properties through auto-generated .lut.h, instead of manually. - The error constructors used to throw (e.g. `new WebAssembly.CompileError()`). - Register WebAssembly's constructors from the global object, and hold a reference to their structure and prototype so that invoking the constructor can use the structure directly from the global object. - Add a prototype base field to global object creation. Previous ones all had Object's prototype as their base, but WebAssembly's error constructors have Error as their base. - Test for the error object's correctness. - Add missing #if ENABLE(WEBASSEMBLY) WebAssembly API: implement exception constructors properly https://bugs.webkit.org/show_bug.cgi?id=163699 Reviewed by Keith Miller. * wasm/js-api/test_basic_api.js: (const.c.in.constructorProperties): more tests 2016-10-20 Caitlin Potter [JSC] disallow references to `await` in AsyncFunction formal parameters https://bugs.webkit.org/show_bug.cgi?id=163694 Reviewed by Saam Barati. * stress/async-await-syntax.js: 2016-10-20 Keith Miller Invalid assertion in arguments elimination https://bugs.webkit.org/show_bug.cgi?id=163740 Reviewed by Michael Saboff. * stress/direct-arguments-osr-entry.js: Added. (foo.): (foo): 2016-10-20 Caitlin Potter [JSC] throw TypeError when constructing dynamically created JSGeneratorFunction https://bugs.webkit.org/show_bug.cgi?id=163714 Reviewed by Mark Lam. Add missing test coverage that dynamically created JSGeneratorFunctions can not be constructed. * stress/generator-function-constructor.js: (shouldThrow): 2016-10-19 JF Bastien JavaScript WebAssembly API: baby steps - Expand WebAssembly constructors into their own files. This requires a lot of boilerplate, as well as adding the .lut.h files. All of the JSWebAssembly*.{h,cpp}, as well as Constructor and Prototype files, are currently the same between the 4 specified WebAssembly constructors. It'll be easy to implement individual functions on constructed objects as per the spec, and have each of these files diverge. The error constructors are also similar, except that their instance derives from ErrorInstance. - Use constructor macro when initializing the global object. - Dramatically improve testing of the WebAssembly API by checking for properties specified in the spec [*]. - Clean up assert.js' exception testing. - Fix a copy-paste bug in wasm.json: floating-point const return values were swapped. [*] https://github.com/WebAssembly/design/blob/master/JS.md Implement more of the JavaScript WebAssembly API https://bugs.webkit.org/show_bug.cgi?id=163571 Reviewed by Keith Miller. * wasm/assert.js: (export.const.isUndef): add this useful helper (export.const.throws): fold other throw checks into this one, and check message as well * wasm/js-api/test_basic_api.js: (const.checkOwnPropertyDescriptor): check own property descriptor follows the spec * wasm/self-test/test_BuilderJSON.js: (const.assertOpThrows): use new assert API (CheckedOpcodeArgumentsTooMany): ditto (CheckedOpcodeArgumentsNotEnough): ditto (CallInvalid): ditto (I32ConstInvalid): ditto (F32ConstInvalid): ditto (and this caugth the JSON copy-paste bug) (F64ConstInvalid): ditto * wasm/self-test/test_LowLevelBinary_varint.js: use new assert API * wasm/self-test/test_LowLevelBinary_varuint.js: use new assert API * wasm/utilities.js: add "global" object, used in basic API test (to access global.WebAssembly). * wasm/wasm.json: fix copy-paste 2016-10-19 Caitlin Potter [JSC] forbid "use strict" directive in generator functions with non-simple parameters https://bugs.webkit.org/show_bug.cgi?id=163683 Reviewed by Geoffrey Garen. Update various generator*-non-simple-param.js tests to be passing. * test262.yaml: 2016-10-18 Mark Lam Invoking Object.prototype.__proto__ accessors directly should throw a TypeError. https://bugs.webkit.org/show_bug.cgi?id=154377 Reviewed by Filip Pizlo and Saam Barati. * stress/object-prototype-proto-accessors-should-throw-on-undefined-this.js: Added. 2016-10-18 Keith Miller GetByVal to GetById conversion in the DFG is incorrect for getters with control flow https://bugs.webkit.org/show_bug.cgi?id=163629 Reviewed by Yusuke Suzuki. * stress/get-by-val-to-id-with-getter.js: Added. (foo): (o.get hello): 2016-10-15 Filip Pizlo DFG and FTL should be able to use DirectCall ICs when they proved the callee or its executable https://bugs.webkit.org/show_bug.cgi?id=163371 Reviewed by Geoffrey Garen and Saam Barati. Add microbenchmarks for all of the cases that this patch optimizes. * microbenchmarks/direct-call-arity-mismatch.js: Added. (foo): (bar): * microbenchmarks/direct-call.js: Added. (foo): (bar): * microbenchmarks/direct-construct-arity-mismatch.js: Added. (Foo): (bar): * microbenchmarks/direct-construct.js: Added. (Foo): (bar): * microbenchmarks/direct-tail-call-arity-mismatch.js: Added. (foo): (bar): * microbenchmarks/direct-tail-call-inlined-caller-arity-mismatch.js: Added. (foo): (bar): (baz): * microbenchmarks/direct-tail-call-inlined-caller.js: Added. (foo): (bar): (baz): * microbenchmarks/direct-tail-call.js: Added. (foo): (bar): 2016-10-18 Caitlin Potter [JSC] ES6 Method functions should not have prototype https://bugs.webkit.org/show_bug.cgi?id=162530 Reviewed by Saam Barati. Fix test262 expectations about MethodDefinitions * ChakraCore/test/strict/05.arguments_sm.baseline-jsc: * stress/reflect-set.js: * test262.yaml: 2016-10-17 Keith Miller Add support for WASM Memory. https://bugs.webkit.org/show_bug.cgi?id=161710 Reviewed by Geoffrey Garen. Add store and load opcodes to wasm.json. Additionally, add new enums for those opcodes in the generator. * stress/wasm/generate-wasmops-header.js: (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.LoadOpType): (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.StoreOpType): 2016-10-17 Saam Barati Add more tests for the double->String conversion in ValueAdd constant folding https://bugs.webkit.org/show_bug.cgi?id=163517 Reviewed by Yusuke Suzuki. * microbenchmarks/string-add-constant-folding.js: (test): 2016-10-17 JF Bastien WebAssembly JS API: implement basic stub Implement the global WebAssembly JavaScript object, and its constructor + function properties as described in: https://github.com/WebAssembly/design/blob/master/JS.md These don't do anything at the moment, the parent bug will take care of adding more functionality and associated tests. WebAssembly JS API: implement basic stub https://bugs.webkit.org/show_bug.cgi?id=163404 Reviewed by Keith Miller. * wasm.yaml: * wasm/js-api/test_basic_api.js: Added. (const.f.of.functionProperties.WebAssembly.f.undefined.throw.new.Error.Couldn.const.c.of.constructorProperties.WebAssembly.c.undefined.throw.new.Error.Couldn): (const.c.of.constructorProperties.catch): 2016-10-17 Yusuke Suzuki [DOMJIT] Use DOMJIT::Patchpoint in IC https://bugs.webkit.org/show_bug.cgi?id=163223 Reviewed by Saam Barati. * stress/domjit-exception-ic.js: Added. (shouldBe): (access): * stress/domjit-exception.js: Added. (shouldBe): (access): * stress/domjit-getter-complex-with-incorrect-object.js: Added. (shouldThrow): (access): (i.shouldThrow): * stress/domjit-getter-complex.js: Added. (shouldBe): (access): * stress/domjit-getter-try-catch-getter-as-get-by-id-register-restoration.js: Added. (assert): (bar): (foo): 2016-10-15 Saam Barati Assertion failed under operationToLowerCase with a rope with zero length https://bugs.webkit.org/show_bug.cgi?id=163314 Reviewed by Mark Lam. * stress/to-lower-case-intrinsic-on-empty-rope.js: Added. (assert): (returnRope.helper): (returnRope): (lower): 2016-10-14 Benjamin Poulain [JSC] op_negate should with any type https://bugs.webkit.org/show_bug.cgi?id=162587 Reviewed by Saam Barati. * stress/arith-abs-to-arith-negate-range-optimizaton.js: Added. Cover OSR Exits when converting Math.abs() into ArithNegate. * stress/arith-negate-on-various-types.js: Added. Cover ArithNegate with all types. 2016-10-14 JF Bastien Basic WebAssembly testing Create a small DSL in JavaScript which can build WebAssembly binary modules based on the JSON description of the format as described in: https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md This DSL can then be used to write small text description of valid and invalid WebAssembly binaries, making testing the JSC implementation much easier. Details and example in README.md. Basic WebAssembly testing https://bugs.webkit.org/show_bug.cgi?id=163267 Reviewed by Keith Miller. * stress/wasm/wasm.json: Removed. * wasm.yaml: Added. * wasm/Builder.js: Added. (const._isValidValue): (const._BuildWebAssemblyBinary): (export.default.Builder): (export.default.Builder.prototype.setChecked): (export.default.Builder.prototype.setPreamble): (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section): (export.default.Builder.prototype._registerSectionBuilders.this.Unknown): (export.default.Builder.prototype._registerSectionBuilders): (export.default.Builder.prototype._addSection): (export.default.Builder.prototype.optimize): (export.default.Builder.prototype.json): (export.default.Builder.prototype.AsmJS): (export.default.Builder.prototype.WebAssembly): * wasm/LowLevelBinary.js: Added. (const._getterRangeCheck): (const._hexdump): (export.default.LowLevelBinary): (export.default.LowLevelBinary.prototype.newPatchable): (export.default.LowLevelBinary.prototype.hexdump): (export.default.LowLevelBinary.prototype._maybeGrow): (export.default.LowLevelBinary.prototype._push8): (export.default.LowLevelBinary.prototype.uint8): (export.default.LowLevelBinary.prototype.uint16): (export.default.LowLevelBinary.prototype.uint32): (export.default.LowLevelBinary.prototype.varuint): (export.default.LowLevelBinary.prototype.varint): (export.default.LowLevelBinary.prototype.varuint7): (export.default.LowLevelBinary.prototype.string): (export.default.LowLevelBinary.prototype.getSize): (export.default.LowLevelBinary.prototype.getUint8): (export.default.LowLevelBinary.prototype.getUint16): (export.default.LowLevelBinary.prototype.getUint32): (export.default.LowLevelBinary.prototype.getVaruint): (export.default.LowLevelBinary.prototype.getVarint): (export.default.LowLevelBinary.prototype.getVaruint7): (export.default.LowLevelBinary.prototype.getString): (PatchableLowLevelBinary): (PatchableLowLevelBinary.prototype._push8): (PatchableLowLevelBinary.prototype.apply): * wasm/README.md: Added. * wasm/WASM.js: Added. * wasm/assert.js: Added. (export.const.notUndef): (export.const.eq): (export.const.ge): (export.const.throwsError): (export.const.throwsRangeError): * wasm/generate-wasmops-header.js: Renamed from JSTests/stress/wasm/generate-wasmops-header.js. * wasm/self-test/test_BuilderJSON.js: Added. (const.assertOpThrows): (EmptyModule): (CustomMagicNumber): (CustomVersion): (CustomSection): (CustomSectionAllBytes): (CustomSectionInvalidByte): (TwoCustomSections): (EmptyCodeSection): (CodeSectionWithEmptyFunction): (CodeSectionWithEmptyFunctionWithParameters): (InvalidFunctionParameters): (SimpleFunction): (TwoSimpleFunctions): (TwoBuildersAtTheSameTime): (CheckedOpcodeArgumentsTooMany): (CheckedOpcodeArgumentsNotEnough): (CallNoArguments): (CallInvalid): (I32ConstInvalid): (F32ConstInvalid): (F64ConstInvalid): (CallManyFromStack): (OpcodeAdd): (OpcodeUnreachable): (OpcodeUnreachableCombinations): (OpcodeSelect): * wasm/self-test/test_BuilderWebAssembly.js: Added. (EmptyModule): (CustomSection): (Basic): * wasm/self-test/test_LowLevelBinary_encode.js: Added. * wasm/self-test/test_LowLevelBinary_string.js: Added. * wasm/self-test/test_LowLevelBinary_uint16.js: Added. * wasm/self-test/test_LowLevelBinary_uint32.js: Added. * wasm/self-test/test_LowLevelBinary_uint8.js: Added. * wasm/self-test/test_LowLevelBinary_varint.js: Added. * wasm/self-test/test_LowLevelBinary_varuint.js: Added. * wasm/self-test/test_LowLevelBinary_varuint7.js: Added. * wasm/self-test/test_WASM.js: Added. * wasm/test.sh: Added. * wasm/utilities.js: Added. (const._read.filename.switch): (const._load.filename.switch): (const._json.filename.switch): * wasm/wasm.json: Added. 2016-10-14 Joseph Pecoraro test262: @isConstructor incorrectly thinks Math.cos is a constructor https://bugs.webkit.org/show_bug.cgi?id=163437 Reviewed by Saam Barati. * stress/is-constructor.js: Added. (assert): (prototype.assert): New test to cover the @isConstructor builtin. * test262.yaml: Test now passes. 2016-10-14 Ryan Haddad Unreviewed, rolling out r207322. This change caused JSC test failures Reverted changeset: "Fix Array.prototype.splice ES6 compliance." https://bugs.webkit.org/show_bug.cgi?id=163372 http://trac.webkit.org/changeset/207322 2016-10-14 Mark Lam JSON.parse should not modify frozen objects. https://bugs.webkit.org/show_bug.cgi?id=163430 Reviewed by Saam Barati. * stress/json-parse-on-frozen-object.js: Added. 2016-10-14 Joseph Pecoraro test262: Failure with RegExp.prototype.compile when pattern is undefined https://bugs.webkit.org/show_bug.cgi?id=163431 Reviewed by Yusuke Suzuki. * test262.yaml: 2016-10-13 Joseph Pecoraro Exception message for expressions with multiple bracket accesses is inconsistent / incorrect https://bugs.webkit.org/show_bug.cgi?id=163426 Reviewed by Geoffrey Garen. * ChakraCore/test/Error/CallNonFunction_3.baseline-jsc: * ChakraCore/test/Object/null.baseline-jsc: * stress/exception-in-to-property-key-should-be-handled-early.js: Better exception messages. 2016-10-13 Mark Lam Fix Array.prototype.splice ES6 compliance. https://bugs.webkit.org/show_bug.cgi?id=163372 Reviewed by Geoffrey Garen and Yusuke Suzuki. * stress/array-splice-on-frozen-object.js: Added. 2016-10-12 Keith Miller Handle non-function, non-undefined comparator in Array.prototype.sort https://bugs.webkit.org/show_bug.cgi?id=163085 Reviewed by Yusuke Suzuki. * ChakraCore/test/Array/array_sort.baseline-jsc: * stress/array-sort-bad-comparator.js: Added. (test): 2016-10-12 Mark Lam Array.prototype.slice should not modify frozen objects. https://bugs.webkit.org/show_bug.cgi?id=163338 Reviewed by Filip Pizlo. * stress/array-slice-on-frozen-object.js: Added. 2016-10-11 Mark Lam Array.prototype.concat should not modify frozen objects. https://bugs.webkit.org/show_bug.cgi?id=163302 Reviewed by Filip Pizlo. * stress/array-concat-on-frozen-object.js: Added. 2016-10-11 Saam Barati ValueAdd should be constant folded if the operands are constant String,Primitive or Primitive,String https://bugs.webkit.org/show_bug.cgi?id=163182 Reviewed by Filip Pizlo. * microbenchmarks/string-add-constant-folding.js: Added. (assert): (runTests): (add): (test): 2016-10-07 Mark Lam Object.freeze() and seal() should throw if [[PreventExtensions]]() fails. https://bugs.webkit.org/show_bug.cgi?id=163160 Reviewed by Saam Barati. * stress/object-freeze-with-proxy-preventExtensions.js: Added. * stress/object-seal-with-proxy-preventExtensions.js: Added. 2016-10-05 Yusuke Suzuki [DOMJIT] Add initial CheckDOM and CallDOM implementations https://bugs.webkit.org/show_bug.cgi?id=162941 Reviewed by Filip Pizlo. * stress/domjit-getter-poly.js: Added. (shouldBe): (access): * stress/domjit-getter-proto.js: Added. (shouldBe): (access): * stress/domjit-getter-super-poly.js: Added. (shouldBe): (access): * stress/domjit-getter.js: Added. (shouldBe): (access): 2016-10-04 Saam Barati String.prototype.toLowerCase should be a DFG/FTL intrinsic https://bugs.webkit.org/show_bug.cgi?id=162887 Reviewed by Filip Pizlo and Yusuke Suzuki. * microbenchmarks/to-lower-case.js: Added. (assert): (foo): (bar): * stress/to-lower-case.js: Added. (assert): (foo): 2016-10-04 JF Bastien WebAssembly: handle a few corner cases https://bugs.webkit.org/show_bug.cgi?id=162884 Reviewed by Keith Miller. * stress/wasm/generate-wasmops-header.js: (const.opcodeIterator): max opcode value 2016-10-03 JF Bastien Auto-generate WASMOps.h, share with testing JSON file https://bugs.webkit.org/show_bug.cgi?id=162870 Reviewed by Keith Miller. * stress/wasm/to-c++.js: Added. Generates WASMOps.h, siilar to the current one but with more data. (const.opcode_iterator): (opcode_macroizer): * stress/wasm/wasm.json: Added. Data from 0xC binary format version. 2016-10-03 Saam Barati MapHash should speculate on the type of its child node https://bugs.webkit.org/show_bug.cgi?id=161922 Reviewed by Filip Pizlo. * microbenchmarks/map-key-well-typed.js: Added. (assert): (intKey): (doubleKey): (objectKey): (stringKey): (booleanKey): (symbolKey): (cellKey): (assert.doubleKey): (assert.booleanKey): 2016-10-03 Yusuke Suzuki [ES6] GeneratorFunction (a.k.a. GeneratorWrapperFunction)'s prototype object does not have constructor property https://bugs.webkit.org/show_bug.cgi?id=162849 Reviewed by Geoffrey Garen. * test262.yaml: 2016-10-01 Yusuke Suzuki [ES6] Align attributes of Generator related properties to spec https://bugs.webkit.org/show_bug.cgi?id=162839 Reviewed by Saam Barati. * test262.yaml: 2016-10-01 Yusuke Suzuki [ES6] GeneratorFunction constructor should instantiate generator function https://bugs.webkit.org/show_bug.cgi?id=162838 Reviewed by Saam Barati. * stress/generator-function-constructor-is-subclassible.js: Added. (shouldBe): (GeneratorFunction): (prototype.hello): * stress/generator-function-constructor.js: * test262.yaml: 2016-09-30 Saam Barati Arrow functions should not allow duplicate parameter names https://bugs.webkit.org/show_bug.cgi?id=162741 Reviewed by Filip Pizlo. * test262.yaml: 2016-09-30 Saam Barati Make some microbenchmarks run for less time. Rubber stamped by Filip Pizlo. * microbenchmarks/bound-function-construction-performance.js: (foo): * microbenchmarks/getter-richards-try-catch.js: 2016-09-29 Joseph Pecoraro Arrow functions do not infer name from computed property but normal functions do https://bugs.webkit.org/show_bug.cgi?id=162720 Reviewed by Saam Barati. * stress/inferred-names.js: 2016-09-29 Mark Lam Break some slow running tests into smaller bits so they don't time out. https://bugs.webkit.org/show_bug.cgi?id=162743 Reviewed by Keith Miller. The following tests have shown to be slow running: op_div.js op_lshift.js op_mod.js op_mul.js op_rshift.js op_sub.js op_urshift These tests auto-generate permutations of values to apply to binary operations. They also test the operations with 3 permutations of value types: 1. VarVar - both operands variables 2. VarConst - variable operand 1, constant / literal operand 2 3. ConstVar - constant / literal operand 1, variable operand 2 We can prevent these tests from timing out by breaking each up to only run 1 of the 3 permutations of value types. * stress/op_div-ConstVar.js: Added. * stress/op_div-VarConst.js: Added. * stress/op_div-VarVar.js: Copied from JSTests/stress/op_div.js. (o1.valueOf): Deleted. * stress/op_div.js: Removed. * stress/op_lshift-ConstVar.js: Added. * stress/op_lshift-VarConst.js: Added. * stress/op_lshift-VarVar.js: Copied from JSTests/stress/op_lshift.js. (o1.valueOf): Deleted. * stress/op_lshift.js: Removed. * stress/op_mod-ConstVar.js: Added. * stress/op_mod-VarConst.js: Added. * stress/op_mod-VarVar.js: Copied from JSTests/stress/op_mod.js. (o1.valueOf): Deleted. * stress/op_mod.js: Removed. * stress/op_mul-ConstVar.js: Added. * stress/op_mul-VarConst.js: Added. * stress/op_mul-VarVar.js: Copied from JSTests/stress/op_mul.js. (o1.valueOf): Deleted. * stress/op_mul.js: Removed. * stress/op_rshift-ConstVar.js: Added. * stress/op_rshift-VarConst.js: Added. * stress/op_rshift-VarVar.js: Copied from JSTests/stress/op_rshift.js. (o1.valueOf): Deleted. * stress/op_rshift.js: Removed. * stress/op_sub-ConstVar.js: Added. * stress/op_sub-VarConst.js: Added. * stress/op_sub-VarVar.js: Copied from JSTests/stress/op_sub.js. (o1.valueOf): Deleted. * stress/op_sub.js: Removed. * stress/op_urshift-ConstVar.js: Added. * stress/op_urshift-VarConst.js: Added. * stress/op_urshift-VarVar.js: Copied from JSTests/stress/op_urshift.js. (o1.valueOf): Deleted. * stress/op_urshift.js: Removed. * stress/resources/binary-op-values.js: Added. (o1.valueOf): 2016-09-29 Joseph Pecoraro test262: class and function names should be inferred in assignment https://bugs.webkit.org/show_bug.cgi?id=146262 Reviewed by Saam Barati. * stress/arrowfunction-name.js: Added. Quick tests for arrow function names. * stress/inferred-names.js: Added. General test for inferred function names. * test262.yaml: Pass many tests checking inferred function names. 2016-09-29 Saam Barati We don't properly propagate non-simple-parameter-list when parsing a setter https://bugs.webkit.org/show_bug.cgi?id=160483 Reviewed by Joseph Pecoraro. * test262.yaml: 2016-09-28 Saam Barati stringProtoFuncRepeatCharacter will return `null` when it should not https://bugs.webkit.org/show_bug.cgi?id=161944 Reviewed by Yusuke Suzuki. * stress/pad-start-calls-repeat-character-with-double.js: Added. (logLinesWithContext): 2016-09-27 Filip Pizlo B3::lowerMacros forgets to before->updatePredecessorsAfter() when lowering ChillMod on ARM64 https://bugs.webkit.org/show_bug.cgi?id=162644 Reviewed by Keith Miller. * stress/chill-mod-chill-mod.js: Added. (foo): 2016-09-26 Csaba Osztrogonác Skip stress/string-joining-long-strings-should-not-crash.js on memory limited devices https://bugs.webkit.org/show_bug.cgi?id=162386 Unreviewed, relanding r206317 after typo fix. * stress/string-joining-long-strings-should-not-crash.js: 2016-09-24 Caitlin Potter [JSTests] fix test262 expectations following r206333 https://bugs.webkit.org/show_bug.cgi?id=162533 Reviewed by Yusuke Suzuki. * test262.yaml: 2016-09-23 Caitlin Potter [JSC] Implement parsing of Async Functions https://bugs.webkit.org/show_bug.cgi?id=161409 Reviewed by Yusuke Suzuki. * stress/async-await-syntax.js: Added. (testSyntax): (testSyntaxError): (testTopLevelAsyncAwaitSyntaxSloppyMode.testSyntax): (testTopLevelAsyncAwaitSyntaxSloppyMode): (testTopLevelAsyncAwaitSyntaxStrictMode): (testTopLevelAsyncAwaitSyntaxStrictMode.testSyntax): (testNestedAsyncAwaitSyntax.async): (testNestedAsyncAwaitSyntax.foo): (testTopLevelAsyncAwaitSyntaxSloppyMode.testSyntaxError): 2016-09-23 Ryan Haddad Unreviewed, rolling out r206317. This change caused timeouts on El Capitan Release JSC tests Reverted changeset: "Skip stress/string-joining-long-strings-should-not-crash.js on memory limited devices" https://bugs.webkit.org/show_bug.cgi?id=162386 http://trac.webkit.org/changeset/206317 2016-09-23 Csaba Osztrogonác Skip mozilla-tests.yaml/js1_5/Array/regress-157652 on memory limited devices https://bugs.webkit.org/show_bug.cgi?id=162381 Reviewed by Mark Lam. * mozilla/mozilla-tests.yaml: 2016-09-23 Csaba Osztrogonác Skip stress/string-joining-long-strings-should-not-crash.js on memory limited devices https://bugs.webkit.org/show_bug.cgi?id=162386 Reviewed by Mark Lam. * stress/string-joining-long-strings-should-not-crash.js: 2016-09-22 Benjamin Poulain [JSC] Use an inline cache to generate op_negate https://bugs.webkit.org/show_bug.cgi?id=162371 Reviewed by Saam Barati. * stress/op-negate-inline-cache.js: Added. 2016-09-22 Mark Lam Array.prototype.join should do overflow checks on string joins. https://bugs.webkit.org/show_bug.cgi?id=162459 Reviewed by Saam Barati. * stress/array-join-on-strings-need-overflow-checks.js: Added. (assert): (catch): 2016-09-22 Joseph Pecoraro test262: Function length should be number of parameters before parameters with default values https://bugs.webkit.org/show_bug.cgi?id=162377 Reviewed by Saam Barati. * stress/es6-default-parameters.js: Add our own tests for function lengths with default parameters. * test262.yaml: We now pass all dflt-length tests. 2016-09-20 Benjamin Poulain [JSC] Do not use EagerRun on tests counting recompilation https://bugs.webkit.org/show_bug.cgi?id=162248 Reviewed by Geoffrey Garen. This patch adds defaultNoEagerRun to all the tests for which recompilation is the symptom of a bug. The reason is that an OSR Exit can be unrelated to the tested nodes when we are running in Eager mode. * stress/arith-abs-on-various-types.js: * stress/arith-ceil-on-various-types.js: * stress/arith-clz32-on-various-types.js: * stress/arith-cos-on-various-types.js: * stress/arith-floor-on-various-types.js: * stress/arith-fround-on-various-types.js: * stress/arith-log-on-various-types.js: * stress/arith-round-on-various-types.js: * stress/arith-sin-on-various-types.js: * stress/arith-sqrt-on-various-types.js: * stress/arith-tan-on-various-types.js: * stress/arith-trunc-on-various-types.js: * stress/compare-strict-eq-on-various-types.js: (testAllTypesCall): The value 2 came from the other tests. CompareStrictEq supports many more cases, the worst case is bool->int->int52->number->polymorphic. 2016-09-20 Filip Pizlo Make MarkedBlock state tracking support overlapped allocation and marking state https://bugs.webkit.org/show_bug.cgi?id=161581 Reviewed by Geoffrey Garen. Add a microbenchmark for why we want to reclaim empty blocks from other allocators. * microbenchmarks/switching-size-classes.js: Added. 2016-09-20 Saam Barati Unreviewed, added test for x86 32-bit failure for HasOwnProperty node in DFG. * stress/has-own-property-called-on-non-object.js: Added. (let.objs): (new.String): (foo): 2016-09-20 Yusuke Suzuki [JSC] Add `typeof value === "symbol"` handling to bytecode compiler https://bugs.webkit.org/show_bug.cgi?id=162253 Reviewed by Sam Weinig. * microbenchmarks/is-symbol-mixed.js: Added. (isSymbol): (i.let.pair.of.list.String): * microbenchmarks/is-symbol.js: Added. (isSymbol): 2016-09-19 Saam Barati Make HasOwnProperty faster https://bugs.webkit.org/show_bug.cgi?id=161708 Reviewed by Geoffrey Garen. * microbenchmarks/has-own-property-name-cache.js: Added. (foo): * stress/has-own-property-cache-basics.js: Added. (assert): (foo): * stress/has-own-property-name-cache-string-keys.js: Added. (assert): (foo): * stress/has-own-property-name-cache-symbol-keys.js: Added. (assert): (foo): * stress/has-own-property-name-cache-symbols-and-strings.js: Added. (assert): (foo): 2016-09-19 Benjamin Poulain [JSC] Make the rounding-related nodes support any type https://bugs.webkit.org/show_bug.cgi?id=161895 Reviewed by Geoffrey Garen. * stress/arith-ceil-on-various-types.js: Added. * stress/arith-floor-on-various-types.js: Added. * stress/arith-round-on-various-types.js: Added. * stress/arith-trunc-on-various-types.js: Added. 2016-09-18 Yusuke Suzuki [JSC] Do not need to use defineProperty to define methods for object literals https://bugs.webkit.org/show_bug.cgi?id=162111 Reviewed by Saam Barati. * stress/object-literal-methods.js: Added. (shouldBe): (throw.new.Error.let.object.get name): (throw.new.Error): (shouldBe.let.object.get name): (shouldBe.let.object.get prototype): (shouldBe.let.object.get 42): 2016-09-16 Yusuke Suzuki [DFG] Introduce IsCellWithType node and unify IsJSArray, IsRegExpObject and newly added IsProxyObject https://bugs.webkit.org/show_bug.cgi?id=162000 Reviewed by Filip Pizlo. * microbenchmarks/is-array-for-array.js: Added. (isArray): * microbenchmarks/is-array-for-mixed-case.js: Added. (isArray): * microbenchmarks/is-array-for-non-array-object.js: Added. (isArray): * microbenchmarks/is-array-for-proxy.js: Added. (isArray): (isArray.proxy.throw.new.Error.isArray): (isArray.proxy.throw.new.Error): 2016-09-16 Yusuke Suzuki Unreviewed, gardening test262 results Some tests are now passed with JSC, but marked as failed. * test262.yaml: 2016-09-16 Joseph Pecoraro test262: Various Constructors length properties should be configurable https://bugs.webkit.org/show_bug.cgi?id=161998 Reviewed by Saam Barati. * test262.yaml: 2016-09-15 Commit Queue Unreviewed, rolling out r205931. https://bugs.webkit.org/show_bug.cgi?id=162021 Tests for this change fail on 32-bit JSC bots (Requested by ryanhaddad on #webkit). Reverted changeset: "[JSC] Make the rounding-related nodes support any type" https://bugs.webkit.org/show_bug.cgi?id=161895 http://trac.webkit.org/changeset/205931 2016-09-15 Joseph Pecoraro test262: Should be a SyntaxError for duplicate parameter names in function with default parameters https://bugs.webkit.org/show_bug.cgi?id=162013 Reviewed by Saam Barati. * stress/es6-default-parameters.js: * test262.yaml: 2016-09-14 Joseph Pecoraro ASSERT_NOT_REACHED when using spread inside an array literal with Function.prototype.apply https://bugs.webkit.org/show_bug.cgi?id=162003 Reviewed by Saam Barati. * stress/spread-calling.js: * test262.yaml: 2016-09-14 Michael Saboff YARR doesn't check for invalid flags for literal regular expressions https://bugs.webkit.org/show_bug.cgi?id=161995 Reviewed by Mark Lam. New test. * stress/regress-161995.js: Added. (testStatic): (catch): 2016-09-14 Joseph Pecoraro test262: TypedArray constructors length should be 3 and configurable https://bugs.webkit.org/show_bug.cgi?id=161955 Reviewed by Mark Lam. * test262.yaml: 2016-09-14 Benjamin Poulain [JSC] Make the rounding-related nodes support any type https://bugs.webkit.org/show_bug.cgi?id=161895 Reviewed by Geoffrey Garen. * stress/arith-ceil-on-various-types.js: Added. * stress/arith-floor-on-various-types.js: Added. * stress/arith-round-on-various-types.js: Added. * stress/arith-trunc-on-various-types.js: Added. 2016-09-14 Joseph Pecoraro TaggedTemplateString function calls should emit tail position calls https://bugs.webkit.org/show_bug.cgi?id=161948 Reviewed by Yusuke Suzuki. * stress/tail-call-recognize.js: (runTests): Ensure a tagged template string function call is tail call. * test262.yaml: These now pass. 2016-09-14 Joseph Pecoraro test262: Array.prototype.slice should always set length https://bugs.webkit.org/show_bug.cgi?id=161953 Reviewed by Mark Lam. * test262.yaml: 2016-09-13 JF Bastien Support jsc shell builtin `read` https://bugs.webkit.org/show_bug.cgi?id=161662 Reviewed by Keith Miller. * stress/jsc-read.js: Added. (test): test `read` and `readFile` shell builtins, in string and binary mode. 2016-09-12 Skachkov Oleksandr ES6: Classes: Should be allowed to create a static method with name "arguments" https://bugs.webkit.org/show_bug.cgi?id=152985 Reviewed by Keith Miller. * test262.yaml: 2016-09-12 Saam Barati Speed up Function.prototype.bind a bit by making it a builtin https://bugs.webkit.org/show_bug.cgi?id=161879 Reviewed by Filip Pizlo. * microbenchmarks/function-bind-inlining.js: Added. (assert): (test): (test2): (foo): * microbenchmarks/function-bind-no-inlining.js: Added. (assert): (test): (test2): (foo): 2016-09-12 Saam Barati HashMapImpl should take into account m_deleteCount in its load factor and it should be able to rehash the table to be smaller https://bugs.webkit.org/show_bug.cgi?id=161640 Reviewed by Geoffrey Garen. * microbenchmarks/map-rehash.js: Added. * stress/map-delete.js: Added. (assert): * stress/map-rehash-2.js: Added. (assert): * stress/map-rehash.js: Added. (assert): 2016-09-12 Yusuke Suzuki Unreviewed, fix tests for different libm environments https://bugs.webkit.org/show_bug.cgi?id=161857 * stress/ftl-arithtan.js: 2016-09-12 Benjamin Poulain [JSC] Use GetArrayLength for JSArray.length even when the array type is undecided https://bugs.webkit.org/show_bug.cgi?id=161671 Reviewed by Geoffrey Garen. * stress/get-array-length-on-undecided.js: Added. 2016-09-12 Yusuke Suzuki [DFG][FTL] Add ArithTan https://bugs.webkit.org/show_bug.cgi?id=161857 Reviewed by Filip Pizlo. * microbenchmarks/tan.js: Added. * stress/arith-tan-on-various-types.js: Added. (let.validInputTypedTestCases.validInputTestCases.map): (isIdentical): (opaqueTanNoArgument): (testNoArgument): (opaqueAllTypesTan): (testAllTypesCall): (testTangleTypeCall): (testConstant): (opaqueTanForSideEffects): (testSideEffect.let.testObject.valueOf): (testSideEffect): (opaqueTanForCSE): (testCSE.let.testObject.valueOf): (testCSE): (opaqueTanForDCE): (testDCE.let.testObject.valueOf): (testDCE): (testException.opaqueTanWithException): (testException): * stress/ftl-arithtan.js: Added. (foo): 2016-09-12 Saam Barati MapHash should do constant folding when it has a constant argument and its legal to hash that value https://bugs.webkit.org/show_bug.cgi?id=161639 Reviewed by Filip Pizlo. * microbenchmarks/map-constant-key.js: Added. (assert): (test): (foo): 2016-09-12 Michael Saboff JSC test timeout: ChakraCore.yaml/ChakraCore/test/Bugs/bug56026_trycatch.js.default https://bugs.webkit.org/show_bug.cgi?id=161863 Reviewed by Saam Barati. * ChakraCore.yaml: Disabled Bugs/bug56026_trycatch.js. 2016-09-09 Michael Saboff Unreviewed, rolling r205759 back in with a fix. The expectation file, JSTests/ChakraCore/test/Lib/tostring.baseline-jsc, should be named "toString.baseline-jsc". * ChakraCore/test/Lib/toString.baseline-jsc: Copied from JSTests/ChakraCore/test/Lib/tostring.baseline-jsc. * ChakraCore/test/Lib/tostring.baseline-jsc: Removed. 2016-09-09 Michael Saboff Disable three flakey Chakra Tests https://bugs.webkit.org/show_bug.cgi?id=161807 Reviewed by Saam Barati. * ChakraCore.yaml: Disabled the flakey tests ChakraCore/test/Array/protoLookup_native.js ChakraCore/test/LetConst/delete.js ChakraCore/test/fieldopts/fieldhoist_sideeffect.js 2016-09-08 Saam Barati We should inline operationConvertJSValueToBoolean into JIT code https://bugs.webkit.org/show_bug.cgi?id=161729 Reviewed by Filip Pizlo. * stress/value-to-boolean.js: Added. (assert): (test1): (test2): (test3): 2016-09-08 Mark Lam REGRESSION (r205569?): 32-bit JSC test timeout: stress/rest-parameter-many-arguments.js.dfg-maximal-flush-validate-no-cjit https://bugs.webkit.org/show_bug.cgi?id=161756 Reviewed by Saam Barati. It looks like the 32-bit JSC bot is just too slow at running this test with the dfg-maximal-flush-validate-no-cjit configuration. We'll try excluding that configuration. * stress/rest-parameter-many-arguments.js: 2016-09-08 JF Bastien Delete older WebAssembly tests https://bugs.webkit.org/show_bug.cgi?id=161758 Reviewed by Filip Pizlo. They're not running, rely on the older polyfill prototype, and the older code was deleted in: https://trac.webkit.org/changeset/204180 * stress/wasm-arithmetic-float32.js: Removed. * stress/wasm-arithmetic-float64.js: Removed. * stress/wasm-arithmetic-int32.js: Removed. * stress/wasm-calls.js: Removed. * stress/wasm-comma.js: Removed. * stress/wasm-control-flow.js: Removed. * stress/wasm-globals.js: Removed. * stress/wasm-linear-memory.js: Removed. * stress/wasm-locals.js: Removed. * stress/wasm-relational.js: Removed. * stress/wasm-type-conversion.js: Removed. * stress/wasm/arithmetic-float32.wasm: Removed. * stress/wasm/arithmetic-float64.wasm: Removed. * stress/wasm/arithmetic-int32.wasm: Removed. * stress/wasm/calls.wasm: Removed. * stress/wasm/comma.wasm: Removed. * stress/wasm/control-flow.wasm: Removed. * stress/wasm/globals.wasm: Removed. * stress/wasm/linear-memory.wasm: Removed. * stress/wasm/locals.wasm: Removed. * stress/wasm/relational.wasm: Removed. * stress/wasm/type-conversion.wasm: Removed. 2016-09-08 Per Arne Vollan [Win] Exception fuzz tests fail https://bugs.webkit.org/show_bug.cgi?id=140928 Reviewed by Mark Lam. Unskip tests. * exceptionFuzz.yaml: 2016-09-06 Saam Barati ProxyObject's structure should not have ObjectPrototype as its prototype and it should not have special behavior for intercepting "__proto__" https://bugs.webkit.org/show_bug.cgi?id=161558 Reviewed by Benjamin Poulain. * stress/proxy-get-prototype-of.js: * stress/proxy-set-prototype-of.js: (let.handler.setPrototypeOf): Deleted. * stress/proxy-underscore-proto.js: Added. (assert): 2016-09-06 Saam Barati Make JSMap and JSSet faster https://bugs.webkit.org/show_bug.cgi?id=160989 Reviewed by Filip Pizlo. * microbenchmarks/dense-set.js: Added. (bench): * microbenchmarks/large-map-iteration-with-additions.js: Added. (bar): (foo): * microbenchmarks/large-map-iteration-with-mutation.js: Added. (bar): (foo): * microbenchmarks/large-map-iteration.js: Added. (bar): (foo): * microbenchmarks/map-get-get-cse.js: Added. (bar): (foo): * microbenchmarks/map-has-get-cse-opportunity.js: Added. (bar): (foo): * microbenchmarks/sparse-set.js: Added. (bench): * stress/map-cse-correctness.js: Added. (assert): (testHas): (testGet): (foo): * stress/map-iteration.js: Added. (assert): (test1): (test2): (test3): (test4): (test5): (test6): (test7): (test8): (test9): (test10): (test11): (test12): (test13): (test14): (test15): (test16): (test17): (test18): 2016-09-06 Benjamin Poulain [JSC] Make ArithClz32 work with Cell arguments https://bugs.webkit.org/show_bug.cgi?id=161369 Reviewed by Geoffrey Garen. * stress/arith-clz32-on-various-types.js: Added. 2016-09-06 Commit Queue Unreviewed, rolling out r205504. https://bugs.webkit.org/show_bug.cgi?id=161645 Broke the iOS device build (Requested by ryanhaddad on #webkit). Reverted changeset: "Make JSMap and JSSet faster" https://bugs.webkit.org/show_bug.cgi?id=160989 http://trac.webkit.org/changeset/205504 2016-09-06 Saam Barati Make JSMap and JSSet faster https://bugs.webkit.org/show_bug.cgi?id=160989 Reviewed by Filip Pizlo. * microbenchmarks/dense-set.js: Added. (bench): * microbenchmarks/large-map-iteration-with-additions.js: Added. (bar): (foo): * microbenchmarks/large-map-iteration-with-mutation.js: Added. (bar): (foo): * microbenchmarks/large-map-iteration.js: Added. (bar): (foo): * microbenchmarks/map-get-get-cse.js: Added. (bar): (foo): * microbenchmarks/map-has-get-cse-opportunity.js: Added. (bar): (foo): * microbenchmarks/sparse-set.js: Added. (bench): * stress/map-cse-correctness.js: Added. (assert): (testHas): (testGet): (foo): * stress/map-iteration.js: Added. (assert): (test1): (test2): (test3): (test4): (test5): (test6): (test7): (test8): (test9): (test10): (test11): (test12): (test13): (test14): (test15): (test16): (test17): (test18): 2016-08-31 Filip Pizlo Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression https://bugs.webkit.org/show_bug.cgi?id=160125 Reviewed by Geoffrey Garen and Keith Miller. Most of the things I did properly covered by existing tests, but I found some simple cases of unshifting that had sketchy coverage. * stress/array-storage-array-unshift.js: Added. * stress/contiguous-array-unshift.js: Added. * stress/double-array-unshift.js: Added. * stress/int32-array-unshift.js: Added. 2016-09-02 Michael Saboff Unreviewed fix after importing Chakra test * ChakraCore.yaml: Skipped ChakraCore/test/UnifiedRegex/crazy.js because the original test contained tab characters. I removed the tabs before landing. This test depended on the tab characters and now fails after they were removed. test. 2016-09-01 Michael Saboff Import Chakra tests to JSC https://bugs.webkit.org/show_bug.cgi?id=154697 Reviewed by Saam Barati. Added Chakra tests. All these tests are under Chakra/test. This is the same layout for tests in the Chakra tree. Created a ChakraCore.yaml file to be used with run-jsc-stress-tests. This file contains the tests that are run when the original Chakra runtests.py script is run. That script is the test driver for *nix platforms and does not attempt to run all tests or all variations of tests. The runtest.py driver consults rlexe.xml files in each test subdirectory to determine the test to run, the options to pass to the test and how to determine pass/fail of the test. With runtests.py as the start, tests that didn't pass directly where either skipped, with a message describing why or through adjustments to the test infrastructure, as described below, where made to pass. The only modification to the test infrastrucutre are: 1) Added simple mapping of Chakra expected exception text to JSC expected text in test/UnitTestFramework/UnitTestFramework.js. It would make sense to also map some JSC specific exception text to more generic text for the cases where that text contains indetifier names or other source specific strings and the Chakra equivolent exception texts are generic. 2) Created JSC specific expected text files where it is clear that the text work as expected on JSC but the test output is different. Typically the differences fall into three categories, different exception output, different output from toString() of a function, slight numeric differences, and test that rely on iteration order. 3) Stripped the CR's from the CR-LF line terminations of the files. No actual test .js files were modified. * ChakraCore: Added. * ChakraCore.yaml: Added. * ChakraCore/CONTRIBUTING.md: Added. * ChakraCore/LICENSE.txt: Added. * ChakraCore/README.md: Added. * ChakraCore/THIRD-PARTY-NOTICES.txt: Added. * ChakraCore/test: Added this directory and the tests included therein. 2016-09-01 JF Bastien GetByIdWithThis/GetByValWithThis should have ValueProfiles so that they can predict their result types https://bugs.webkit.org/show_bug.cgi?id=160922 Reviewed by Keith Miller. Benchmark GetBy{Id,Val}WithThis in monomorphic and polymorphic uses. The value profile is used by the calc functions, which do some mild math with the result. These benchmarks get ~4% faster with value profiling. * microbenchmarks/super-get-by-id-with-this-monomorphic.js: Added. (A): (A.prototype.set value): (A.prototype.get value): (B.prototype.set value): (B.prototype.get value): (B): (const.bench): * microbenchmarks/super-get-by-id-with-this-polymorphic.js: Added. (A): (A.prototype.set value): (A.prototype.get value): (B.prototype.set value): (B.prototype.get value): (B): (const.bench): * microbenchmarks/super-get-by-val-with-this-monomorphic.js: Added. (value): (A): (A.prototype.set v): (A.prototype.get v): (B.prototype.set v): (B.prototype.get v): (B): (const.bench): * microbenchmarks/super-get-by-val-with-this-polymorphic.js: Added. (value): (A): (A.prototype.set v): (A.prototype.get v): (B.prototype.set v): (B.prototype.get v): (B): (const.bench): 2016-09-01 Benjamin Poulain arith-abs-on-various-types.js is flaky Unreviewed. * stress/arith-abs-on-various-types.js: Two compilation is too small for the worst case. Math.abs() can be typed integer->number->untyped if we are very unlucky. 2016-09-01 Filip Pizlo ObjectAllocationSinkingPhase::insertOSRHintsForUpdate() fails to emit updated hints in some cases https://bugs.webkit.org/show_bug.cgi?id=161492 Reviewed by Mark Lam. This bug affected function->activation references but not object->object field references, because object->object field references are !neededForMaterialization(). So, the object test always passed but the activation/function test used to always fail. It passes now. * stress/materialize-activation-referenced-from-phantom-function.js: Added. (bar): (inc): (dec): (foo): (test): * stress/materialize-object-referenced-from-phantom-object.js: Added. (bar): (foo): (test): 2016-08-31 Yusuke Suzuki stress/random-53bit.js.ftl-no-cjit-no-inline-validate sometimes fails https://bugs.webkit.org/show_bug.cgi?id=161436 Reviewed by Filip Pizlo. The test checks Math.random() correctly produces 53bit random values. The test can fail by design, but this should be fairly rare. However, when introducing, we wrap the `test()` with 1e4 to ensure the FTL compilation, and this increases the failure rate. By increasing the MAX in the test, we make the failures much more rare case. And we also add getRandomSeed() and setRandomSeed(seed) JSC shell helpers to dump more useful information and reproduce the situation easily. * stress/random-53bit.js: (test): 2016-08-29 Benjamin Poulain [JSC] Improve ArithAbs with polymorphic input https://bugs.webkit.org/show_bug.cgi?id=161286 Reviewed by Saam Barati. * stress/arith-abs-on-various-types.js: Added. New tests. * stress/arith-cos-on-various-types.js: * stress/arith-fround-on-various-types.js: * stress/arith-log-on-various-types.js: * stress/arith-sin-on-various-types.js: * stress/arith-sqrt-on-various-types.js: Extend the existing tests to cover the DCE case. 2016-08-26 Benjamin Poulain [JSC] Implement CompareStrictEq(String, Untyped) in FTL https://bugs.webkit.org/show_bug.cgi?id=161229 Reviewed by Geoffrey Garen. * stress/compare-strict-eq-on-various-types.js: Added. 2016-08-26 Yusuke Suzuki [ES6] newPromiseCapabilities should check the given argument is constructor https://bugs.webkit.org/show_bug.cgi?id=161226 Reviewed by Mark Lam. The arrow function should not be a constructor. So the error should be raised. * stress/new-promise-capabilities-requires-constructor.js: Added. (shouldThrow): 2016-08-25 Benjamin Poulain [JSC] Clean up the abstract interpreter for cos/sin/sqrt/fround/log https://bugs.webkit.org/show_bug.cgi?id=161181 Reviewed by Geoffrey Garen. Extend the tests to constants. Add no-argument cases where needed. * stress/arith-cos-on-various-types.js: * stress/arith-fround-on-various-types.js: * stress/arith-log-on-various-types.js: * stress/arith-sin-on-various-types.js: * stress/arith-sqrt-on-various-types.js: 2016-08-25 Yusuke Suzuki [DFG][FTL] Implement ES6 Generators in DFG / FTL https://bugs.webkit.org/show_bug.cgi?id=152723 Reviewed by Filip Pizlo. * stress/generator-fib-ftl-and-array.js: Added. (fib): * stress/generator-fib-ftl-and-object.js: Added. (fib): * stress/generator-fib-ftl-and-string.js: Added. (fib): * stress/generator-fib-ftl.js: Added. (fib): * stress/generator-frame-empty.js: Added. (shouldThrow): (shouldThrow.fib): * stress/generator-reduced-save-point-put-to-scope.js: Added. (shouldBe): (gen): * stress/generator-transfer-register-beyond-mutiple-yields.js: Added. (shouldBe): (gen): 2016-08-25 JF Bastien TryGetById should have a ValueProfile so that it can predict its output type https://bugs.webkit.org/show_bug.cgi?id=160921 Reviewed by Saam Barati. * microbenchmarks/try-get-by-id-basic.js: Added. (const.check): (const.bench.f.const.fooPlusBar.createBuiltin): * microbenchmarks/try-get-by-id-polymorphic.js: Added. (const.check): (fooPlusBar.createBuiltin): (bench): 2016-08-25 Caio Lima NewRegexp should not prevent inlining https://bugs.webkit.org/show_bug.cgi?id=154808 Reviewed by Geoffrey Garen. Added test where functions with NewRegExp can be inlined right now. * stress/new-regex-inline.js: Added. (assert): (testRegexpInline): (toInlineGlobal): (withRegexp): (inlineRegexpNotGlobal): (toInlineRecursive): (regexpContainsRecursive): 2016-08-24 Benjamin Poulain [JSC] Make FRound work with any type https://bugs.webkit.org/show_bug.cgi?id=161129 Reviewed by Geoffrey Garen. * stress/arith-fround-on-various-types.js: Added. 2016-08-24 Filip Pizlo Unreviewed, roll out r204901, r204897, r204866, r204856, r204854. * stress/array-storage-array-unshift.js: Removed. * stress/contiguous-array-unshift.js: Removed. * stress/double-array-unshift.js: Removed. * stress/int32-array-unshift.js: Removed. 2016-08-24 Skachkov Oleksandr [ES2016] Allow assignment in for-in head in not-strict mode https://bugs.webkit.org/show_bug.cgi?id=160955 Reviewed by Saam Barati. * stress/for-in-tests.js: (foo): (boo): (catch): 2016-08-23 Benjamin Poulain [JSC] Make ArithLog works with any type https://bugs.webkit.org/show_bug.cgi?id=161110 Reviewed by Geoffrey Garen. * stress/arith-log-on-various-types.js: Added. 2016-08-23 Saam Barati JSC should have a "microbenchmarks" directory instead of "regress" directory https://bugs.webkit.org/show_bug.cgi?id=161096 Rubber stamped by Mark Lam. * microbenchmarks: Copied from LayoutTests/js/regress/script-tests. 2016-08-23 Keith Miller %TypedArray%.prototype.slice needs to check that the source and destination have not been detached. https://bugs.webkit.org/show_bug.cgi?id=161031 Reviewed by Geoffrey Garen. * stress/typedarray-slice.js: (get let): (get try): (testSpeciesWithTransferring): 2016-08-22 Filip Pizlo Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression https://bugs.webkit.org/show_bug.cgi?id=160125 Reviewed by Geoffrey Garen. Most of the things I did properly covered by existing tests, but I found some simple cases of unshifting that had sketchy coverage. * stress/array-storage-array-unshift.js: Added. * stress/contiguous-array-unshift.js: Added. * stress/double-array-unshift.js: Added. * stress/int32-array-unshift.js: Added. 2016-08-23 Keith Miller Update/add new test262 tests https://bugs.webkit.org/show_bug.cgi?id=161098 Reviewed by Saam Barati. * test262.yaml: * test262/test/annexB/language/statements/for-in/bare-initializer.js: Added. * test262/test/annexB/language/statements/for-in/const-initializer.js: Added. * test262/test/annexB/language/statements/for-in/let-initializer.js: Added. * test262/test/annexB/language/statements/for-in/nonstrict-initializer.js: Added. (a): * test262/test/annenxB/language/statements/for-in/strict-initializer.js: Added. * test262/test/annexB/language/statements/for-in/var-arraybindingpattern-initializer.js: Added. * test262/test/annexB/language/statements/for-in/var-objectbindingpattern-initializer.js: Added. * test262/test/built-ins/AsyncFunction/AsyncFunction-construct.js: Added. (AsyncFunction.async.foo): * test262/test/built-ins/AsyncFunction/AsyncFunction-is-extensible.js: Added. (AsyncFunction.async): * test262/test/built-ins/AsyncFunction/AsyncFunction-is-subclass.js: Added. (async.foo): * test262/test/built-ins/AsyncFunction/AsyncFunction-length.js: Added. (AsyncFunction.async.foo): * test262/test/built-ins/AsyncFunction/AsyncFunction-name.js: Added. (AsyncFunction.async.foo): * test262/test/built-ins/AsyncFunction/AsyncFunction-prototype.js: Added. (AsyncFunction.async.foo): * test262/test/built-ins/AsyncFunction/AsyncFunction.js: Added. (AsyncFunction.async.foo): * test262/test/built-ins/AsyncFunction/AsyncFunctionPrototype-is-extensible.js: Added. (AsyncFunction.async.foo): * test262/test/built-ins/AsyncFunction/AsyncFunctionPrototype-prototype.js: Added. (AsyncFunction.async.foo): * test262/test/built-ins/AsyncFunction/AsyncFunctionPrototype-to-string.js: Added. (AsyncFunction.async.foo): * test262/test/built-ins/AsyncFunction/instance-construct.js: Added. (async.foo): * test262/test/built-ins/AsyncFunction/instance-has-name.js: Added. (async.foo): * test262/test/built-ins/AsyncFunction/instance-length.js: Added. (async.l0): (async.l1): (async.l2): * test262/test/built-ins/AsyncFunction/instance-prototype-property.js: Added. (async.foo): * test262/test/built-ins/AsyncFunction/is-not-a-global.js: Added. * test262/test/built-ins/DataView/prototype/getFloat32/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/getFloat32/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/getFloat32/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/getFloat64/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/getFloat64/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/getFloat64/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/getInt16/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/getInt16/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/getInt16/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/getInt32/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/getInt32/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/getInt32/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/getInt8/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/getInt8/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/getInt8/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/getUint16/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/getUint16/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/getUint16/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/getUint32/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/getUint32/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/getUint32/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/getUint8/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/getUint8/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/getUint8/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/setFloat32/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/setFloat32/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/setFloat32/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/setFloat32/index-check-before-value-conversion.js: * test262/test/built-ins/DataView/prototype/setFloat32/range-check-after-value-conversion.js: * test262/test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/setFloat64/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/setFloat64/index-check-before-value-conversion.js: * test262/test/built-ins/DataView/prototype/setFloat64/range-check-after-value-conversion.js: * test262/test/built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/setInt16/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/setInt16/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/setInt16/index-check-before-value-conversion.js: * test262/test/built-ins/DataView/prototype/setInt16/range-check-after-value-conversion.js: * test262/test/built-ins/DataView/prototype/setInt32/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/setInt32/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/setInt32/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/setInt32/index-check-before-value-conversion.js: * test262/test/built-ins/DataView/prototype/setInt32/range-check-after-value-conversion.js: * test262/test/built-ins/DataView/prototype/setInt8/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/setInt8/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/setInt8/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/setInt8/index-check-before-value-conversion.js: * test262/test/built-ins/DataView/prototype/setInt8/range-check-after-value-conversion.js: * test262/test/built-ins/DataView/prototype/setUint16/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/setUint16/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/setUint16/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/setUint16/index-check-before-value-conversion.js: * test262/test/built-ins/DataView/prototype/setUint16/range-check-after-value-conversion.js: * test262/test/built-ins/DataView/prototype/setUint32/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/setUint32/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/setUint32/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/setUint32/index-check-before-value-conversion.js: * test262/test/built-ins/DataView/prototype/setUint32/range-check-after-value-conversion.js: * test262/test/built-ins/DataView/prototype/setUint8/detached-buffer-after-toindex-byteoffset.js: Renamed from JSTests/test262/test/built-ins/DataView/prototype/setUint8/detached-buffer-after-integer-byteoffset.js. * test262/test/built-ins/DataView/prototype/setUint8/detached-buffer-before-outofrange-byteoffset.js: * test262/test/built-ins/DataView/prototype/setUint8/index-check-before-value-conversion.js: * test262/test/built-ins/DataView/prototype/setUint8/range-check-after-value-conversion.js: * test262/test/built-ins/Function/prototype/bind/instance-construct-newtarget-boundtarget-bound.js: Added. (A): * test262/test/built-ins/Function/prototype/bind/instance-construct-newtarget-boundtarget.js: Added. (A): * test262/test/built-ins/Function/prototype/bind/instance-construct-newtarget-self-new.js: Added. (A): * test262/test/built-ins/Function/prototype/bind/instance-construct-newtarget-self-reflect.js: Added. (A): * test262/test/built-ins/Function/prototype/toString/AsyncFunction.js: Added. (async.f): * test262/test/built-ins/Function/prototype/toString/async-function-declaration.js: Added. (async.f): * test262/test/built-ins/Function/prototype/toString/async-function-expression.js: Added. (let.f.async.f): * test262/test/built-ins/Function/prototype/toString/async-method.js: Added. (let.f.async.f): (let.g.async.string_appeared_here): * test262/test/built-ins/JSON/parse/reviver-array-define-prop-err.js: Added. (defineProperty): * test262/test/built-ins/JSON/parse/reviver-array-delete-err.js: Added. (deleteProperty): * test262/test/built-ins/JSON/parse/reviver-array-length-coerce-err.js: Added. (uncoercible.valueOf): (get if): * test262/test/built-ins/JSON/parse/reviver-array-length-get-err.js: Added. (get if): * test262/test/built-ins/JSON/parse/reviver-call-err.js: Added. * test262/test/built-ins/JSON/parse/reviver-get-name-err.js: Added. (thrower): * test262/test/built-ins/JSON/parse/reviver-object-define-prop-err.js: Added. (defineProperty): * test262/test/built-ins/JSON/parse/reviver-object-delete-err.js: Added. (deleteProperty): * test262/test/built-ins/JSON/parse/reviver-object-own-keys-err.js: Added. (ownKeys): * test262/test/built-ins/Number/prototype/toExponential/infinity.js: Added. * test262/test/built-ins/Number/prototype/toExponential/nan.js: Added. * test262/test/built-ins/Number/prototype/toExponential/prop-desc.js: Added. * test262/test/built-ins/Number/prototype/toExponential/return-abrupt-tointeger-fractiondigits-symbol.js: Added. * test262/test/built-ins/Number/prototype/toExponential/return-abrupt-tointeger-fractiondigits.js: Added. (fd1.valueOf): (fd2.toString): * test262/test/built-ins/Number/prototype/toExponential/return-values.js: Added. * test262/test/built-ins/Number/prototype/toExponential/this-is-0-fractiondigits-is-0.js: Added. * test262/test/built-ins/Number/prototype/toExponential/this-is-0-fractiondigits-is-not-0.js: Added. * test262/test/built-ins/Number/prototype/toExponential/this-type-not-number-or-number-object.js: Added. * test262/test/built-ins/Number/prototype/toExponential/tointeger-fractiondigits.js: Added. * test262/test/built-ins/Number/prototype/toExponential/undefined-fractiondigits.js: Added. * test262/test/built-ins/Object/getOwnPropertyDescriptors/duplicate-keys.js: * test262/test/built-ins/Object/getOwnPropertyDescriptors/proxy-undefined-descriptor.js: Added. (badProxyHandlers.allowProxyTraps.getOwnPropertyDescriptor): (badProxyHandlers.allowProxyTraps.ownKeys): * test262/test/built-ins/Proxy/setPrototypeOf/boolean-trap-result-extensible-target.js: Removed. (setPrototypeOf): Deleted. * test262/test/built-ins/Proxy/setPrototypeOf/internals-call-order.js: Added. (target.new.Proxy.Object.create.isExtensible): (target.new.Proxy.Object.create.getPrototypeOf): (target.new.Proxy.Object.create): (setPrototypeOf): * test262/test/built-ins/Proxy/setPrototypeOf/not-extensible-target-not-same-target-prototype.js: (setPrototypeOf): * test262/test/built-ins/Proxy/setPrototypeOf/not-extensible-target-same-target-prototype.js: (setPrototypeOf): * test262/test/built-ins/Proxy/setPrototypeOf/not-extensible-trap-is-false-return-false.js: Removed. (setPrototypeOf): Deleted. * test262/test/built-ins/Proxy/setPrototypeOf/return-abrupt-from-get-trap.js: Added. * test262/test/built-ins/Proxy/setPrototypeOf/return-abrupt-from-isextensible-target.js: Added. (isExtensible): (setPrototypeOf): * test262/test/built-ins/Proxy/setPrototypeOf/return-abrupt-from-target-getprototypeof.js: Added. (getPrototypeOf): (setPrototypeOf): * test262/test/built-ins/Proxy/setPrototypeOf/return-abrupt-from-trap.js: Renamed from JSTests/test262/test/built-ins/Proxy/setPrototypeOf/return-is-abrupt.js. (setPrototypeOf): * test262/test/built-ins/Proxy/setPrototypeOf/return-is-abrupt.js: (setPrototypeOf): Deleted. * test262/test/built-ins/Proxy/setPrototypeOf/toboolean-trap-result-false.js: Added. (isExtensible): (setPrototypeOf): * test262/test/built-ins/Proxy/setPrototypeOf/toboolean-trap-result-true-target-is-extensible.js: Added. (isExtensible): (getPrototypeOf): (setPrototypeOf): * test262/test/built-ins/Proxy/setPrototypeOf/trap-is-not-callable.js: * test262/test/built-ins/Proxy/setPrototypeOf/trap-is-undefined-or-null.js: Added. (setPrototypeOf): * test262/test/built-ins/Proxy/setPrototypeOf/trap-is-undefined.js: Removed. * test262/test/built-ins/RegExp/lastIndex.js: Added. * test262/test/built-ins/RegExp/prototype/global/15.10.7.2-1.js: Removed. * test262/test/built-ins/RegExp/prototype/global/this-val-invalid-obj.js: Added. (get Object): * test262/test/built-ins/RegExp/prototype/global/this-val-non-obj.js: Added. (get Object): * test262/test/built-ins/RegExp/prototype/global/this-val-regexp-prototype.js: Added. * test262/test/built-ins/RegExp/prototype/ignoreCase/15.10.7.3-1.js: Removed. * test262/test/built-ins/RegExp/prototype/ignoreCase/this-val-invalid-obj.js: Added. (get Object): * test262/test/built-ins/RegExp/prototype/ignoreCase/this-val-non-obj.js: Added. (get Object): * test262/test/built-ins/RegExp/prototype/ignoreCase/this-val-regexp-prototype.js: Added. * test262/test/built-ins/RegExp/prototype/lastIndex/15.10.7.5-1.js: Removed. * test262/test/built-ins/RegExp/prototype/lastIndex/15.10.7.5-2.js: Removed. * test262/test/built-ins/RegExp/prototype/lastIndex/S15.10.7.5_A8.js: Removed. (__re.hasOwnProperty): Deleted. (__re.propertyIsEnumerable): Deleted. (count.0): Deleted. * test262/test/built-ins/RegExp/prototype/lastIndex/S15.10.7.5_A9.js: Removed. (__re.hasOwnProperty): Deleted. (catch): Deleted. * test262/test/built-ins/RegExp/prototype/multiline/15.10.7.4-1.js: Removed. * test262/test/built-ins/RegExp/prototype/multiline/this-val-invalid-obj.js: Added. (get Object): * test262/test/built-ins/RegExp/prototype/multiline/this-val-non-obj.js: Added. (get Object): * test262/test/built-ins/RegExp/prototype/multiline/this-val-regexp-prototype.js: Added. * test262/test/built-ins/RegExp/prototype/no-regexp-matcher.js: Added. * test262/test/built-ins/RegExp/prototype/source/15.10.7.1-1.js: Removed. * test262/test/built-ins/RegExp/prototype/source/this-val-invalid-obj.js: Added. (get Object): * test262/test/built-ins/RegExp/prototype/source/this-val-non-obj.js: Added. (get Object): * test262/test/built-ins/RegExp/prototype/source/this-val-regexp-prototype.js: Added. * test262/test/built-ins/RegExp/prototype/source/value-empty.js: Added. * test262/test/built-ins/RegExp/prototype/source/value-line-terminator.js: Added. * test262/test/built-ins/RegExp/prototype/source/value-u.js: Added. * test262/test/built-ins/RegExp/prototype/source/value.js: Added. * test262/test/built-ins/RegExp/prototype/sticky/this-val-invalid-obj.js: Renamed from JSTests/test262/test/built-ins/RegExp/prototype/sticky/this-invalid-obj.js. * test262/test/built-ins/RegExp/prototype/sticky/this-val-non-obj.js: Renamed from JSTests/test262/test/built-ins/RegExp/prototype/sticky/this-non-obj.js. * test262/test/built-ins/RegExp/prototype/sticky/this-val-regexp-prototype.js: Added. * test262/test/built-ins/RegExp/prototype/sticky/this-val-regexp.js: Renamed from JSTests/test262/test/built-ins/RegExp/prototype/sticky/this-regexp.js. * test262/test/built-ins/RegExp/prototype/unicode/this-val-invalid-obj.js: Renamed from JSTests/test262/test/built-ins/RegExp/prototype/unicode/this-invald-obj.js. * test262/test/built-ins/RegExp/prototype/unicode/this-val-non-obj.js: Renamed from JSTests/test262/test/built-ins/RegExp/prototype/unicode/this-non-obj.js. * test262/test/built-ins/RegExp/prototype/unicode/this-val-regexp-prototype.js: Added. * test262/test/built-ins/RegExp/prototype/unicode/this-val-regexp.js: Renamed from JSTests/test262/test/built-ins/RegExp/prototype/unicode/this-regexp.js. * test262/test/built-ins/String/numeric-properties.js: Added. * test262/test/intl402/DateTimeFormat/prototype/formatToParts/date-is-infinity-throws.js: Added. * test262/test/intl402/DateTimeFormat/prototype/formatToParts/date-is-nan-throws.js: Added. * test262/test/intl402/DateTimeFormat/prototype/formatToParts/formatToParts.js: Added. * test262/test/intl402/DateTimeFormat/prototype/formatToParts/length.js: Added. * test262/test/intl402/DateTimeFormat/prototype/formatToParts/main.js: Added. (reduce): (compareFTPtoFormat): * test262/test/intl402/DateTimeFormat/prototype/formatToParts/name.js: Added. * test262/test/intl402/DateTimeFormat/prototype/formatToParts/return-abrupt-tonumber-date.js: Added. (obj1.valueOf): (obj2.toString): * test262/test/intl402/DateTimeFormat/prototype/formatToParts/this-has-not-internal-throws.js: Added. * test262/test/intl402/DateTimeFormat/prototype/formatToParts/this-is-not-object-throws.js: Added. * test262/test/intl402/NumberFormat/prototype/formatToParts/formatToParts.js: Added. * test262/test/intl402/NumberFormat/prototype/formatToParts/length.js: Added. * test262/test/intl402/NumberFormat/prototype/formatToParts/main.js: Added. (reduce): (compareFTPtoFormat): * test262/test/intl402/NumberFormat/prototype/formatToParts/name.js: Added. * test262/test/intl402/NumberFormat/prototype/formatToParts/return-abrupt-tonumber.js: Added. (obj1.valueOf): (obj2.toString): * test262/test/intl402/NumberFormat/prototype/formatToParts/this-has-not-internal-throws.js: Added. * test262/test/intl402/NumberFormat/prototype/formatToParts/this-is-not-object-throws.js: Added. * test262/test/language/arguments-object/10.6-10-c-ii-2-s.js: (foo): Deleted. * test262/test/language/arguments-object/unmapped/via-params-dflt.js: Added. (dflt): * test262/test/language/arguments-object/unmapped/via-params-dstr.js: Added. (dstr): * test262/test/language/arguments-object/unmapped/via-params-rest.js: Added. (rest): * test262/test/language/arguments-object/unmapped/via-strict.js: Renamed from JSTests/test262/test/language/arguments-object/10.6-10-c-ii-2-s.js. (foo): * test262/test/language/block-scope/syntax/redeclaration-global/allowed-to-redeclare-function-declaration-with-function-declaration.js: (f): Deleted. * test262/test/language/eval-code/direct/super-call-arrow.js: Added. (catch): * test262/test/language/eval-code/direct/super-call-fn.js: Added. (f): * test262/test/language/eval-code/direct/super-call.js: Added. (catch): * test262/test/language/eval-code/direct/super-prop-arrow.js: Added. (catch): * test262/test/language/eval-code/direct/super-prop-method.js: Added. (o.method): * test262/test/language/eval-code/direct/super-prop.js: Added. (catch): * test262/test/language/eval-code/indirect/super-call.js: Added. (catch): (try.m): * test262/test/language/eval-code/indirect/super-prop.js: Added. (catch): (try.m): * test262/test/language/expressions/arrow-function/params-trailing-comma-length.js: Added. (assert.sameValue): * test262/test/language/expressions/arrow-function/params-trailing-comma.js: Added. * test262/test/language/expressions/async-arrow-function/arrow-returns-promise.js: Added. (p.then): * test262/test/language/expressions/async-arrow-function/early-errors-arrow-NSPL-with-USD.js: Added. (async): * test262/test/language/expressions/async-arrow-function/early-errors-arrow-arguments-in-formal-parameters.js: Added. (async): * test262/test/language/expressions/async-arrow-function/early-errors-arrow-await-in-formals-default.js: Added. (async): * test262/test/language/expressions/async-arrow-function/early-errors-arrow-await-in-formals.js: Added. (async): * test262/test/language/expressions/async-arrow-function/early-errors-arrow-body-contains-super-call.js: Added. (async): * test262/test/language/expressions/async-arrow-function/early-errors-arrow-body-contains-super-property.js: Added. (async): * test262/test/language/expressions/async-arrow-function/early-errors-arrow-duplicate-parameters.js: Added. (async): * test262/test/language/expressions/async-arrow-function/early-errors-arrow-eval-in-formal-parameters.js: Added. (async): * test262/test/language/expressions/async-arrow-function/early-errors-arrow-formals-body-duplicate.js: Added. (async): * test262/test/language/expressions/async-arrow-function/early-errors-arrow-formals-contains-super-call.js: Added. (async.foo.super): * test262/test/language/expressions/async-arrow-function/early-errors-arrow-formals-contains-super-property.js: Added. (async): * test262/test/language/expressions/async-function/early-errors-expression-NSPL-with-USD.js: Added. (async): * test262/test/language/expressions/async-function/early-errors-expression-binding-identifier-arguments.js: Added. (async.arguments): * test262/test/language/expressions/async-function/early-errors-expression-binding-identifier-eval.js: Added. (async.eval): * test262/test/language/expressions/async-function/early-errors-expression-body-contains-super-call.js: Added. (async.foo): * test262/test/language/expressions/async-function/early-errors-expression-body-contains-super-property.js: Added. (async.foo): * test262/test/language/expressions/async-function/early-errors-expression-eval-in-formal-parameters.js: Added. (async.foo): * test262/test/language/expressions/async-function/early-errors-expression-formals-body-duplicate.js: Added. (async.foo): * test262/test/language/expressions/async-function/early-errors-expression-formals-contains-super-call.js: Added. (async.foo): * test262/test/language/expressions/async-function/early-errors-expression-formals-contains-super-property.js: Added. (async.foo): * test262/test/language/expressions/async-function/early-errors-expression-not-simple-assignment-target.js: Added. (async.foo): * test262/test/language/expressions/async-function/expression-returns-promise.js: Added. (p.async): * test262/test/language/expressions/async-function/syntax-expression-is-PrimaryExpression.js: Added. (async.foo): * test262/test/language/expressions/await/await-BindingIdentifier-in-global.js: Added. (async.await): * test262/test/language/expressions/await/await-BindingIdentifier-nested.js: Added. (async.foo.await): (async.foo): * test262/test/language/expressions/await/await-awaits-thenable-not-callable.js: Added. (async.foo): * test262/test/language/expressions/await/await-awaits-thenables-that-throw.js: Added. (thenable.then): (async.foo): * test262/test/language/expressions/await/await-awaits-thenables.js: Added. (thenable.then): (async.foo): * test262/test/language/expressions/await/await-in-function.js: Added. (foo): * test262/test/language/expressions/await/await-in-generator.js: Added. (foo): * test262/test/language/expressions/await/await-in-global.js: Added. * test262/test/language/expressions/await/await-in-nested-function.js: Added. (async.foo.bar): (async.foo): * test262/test/language/expressions/await/await-in-nested-generator.js: Added. (async.foo.bar): (async.foo): * test262/test/language/expressions/await/await-throws-rejections.js: Added. (async.foo): * test262/test/language/expressions/await/early-errors-await-not-simple-assignment-target.js: Added. (async.foo): * test262/test/language/expressions/await/no-operand.js: Added. (async.foo): * test262/test/language/expressions/await/syntax-await-has-UnaryExpression-with-MultiplicativeExpression.js: Added. (async.foo): * test262/test/language/expressions/await/syntax-await-has-UnaryExpression.js: Added. (async.foo): * test262/test/language/expressions/call/trailing-comma.js: Added. (foo): * test262/test/language/expressions/function/arguments-with-arguments-fn.js: Added. (f): * test262/test/language/expressions/function/arguments-with-arguments-lex.js: Added. (f): * test262/test/language/expressions/function/params-trailing-comma-arguments.js: Added. (f1): (f2): * test262/test/language/expressions/function/params-trailing-comma-length.js: Added. (assert.sameValue): * test262/test/language/expressions/function/params-trailing-comma.js: Added. * test262/test/language/expressions/generators/arguments-with-arguments-fn.js: Added. (g): * test262/test/language/expressions/generators/arguments-with-arguments-lex.js: Added. (g): * test262/test/language/expressions/generators/params-trailing-comma-arguments.js: Added. (f1): (f2): * test262/test/language/expressions/generators/params-trailing-comma-length.js: Added. (assert.sameValue): * test262/test/language/expressions/generators/params-trailing-comma.js: Added. * test262/test/language/expressions/object/computed-property-evaluation-order.js: Added. * test262/test/language/expressions/object/method-definition/async-super-call-body.js: Added. (sup.method): (child.async.method): * test262/test/language/expressions/object/method-definition/async-super-call-param.js: Added. (sup.method): (child.async.method.x.super.method): * test262/test/language/expressions/object/method-definition/early-errors-object-method-NSPL-with-USD.js: Added. (foo): * test262/test/language/expressions/object/method-definition/early-errors-object-method-arguments-in-formal-parameters.js: Added. (async.foo): * test262/test/language/expressions/object/method-definition/early-errors-object-method-await-in-formals-default.js: Added. (async.foo): * test262/test/language/expressions/object/method-definition/early-errors-object-method-await-in-formals.js: Added. (async.foo): * test262/test/language/expressions/object/method-definition/early-errors-object-method-body-contains-super-call.js: Added. (async.foo): * test262/test/language/expressions/object/method-definition/early-errors-object-method-duplicate-parameters.js: Added. (async.foo): * test262/test/language/expressions/object/method-definition/early-errors-object-method-eval-in-formal-parameters.js: Added. (async.foo): * test262/test/language/expressions/object/method-definition/early-errors-object-method-formals-body-duplicate.js: Added. (async.foo): * test262/test/language/expressions/object/method-definition/early-errors-object-method-formals-contains-super-call.js: Added. (async.foo.foo.super): * test262/test/language/expressions/object/method-definition/object-method-returns-promise.js: Added. (obj.async.method): * test262/test/language/expressions/object/method-definition/params-trailing-comma-arguments.js: Added. (obj.f1): (obj.f2): * test262/test/language/expressions/object/method-definition/params-trailing-comma-length.js: Added. (obj.one): (obj.two): * test262/test/language/expressions/object/method-definition/params-trailing-comma-rest.js: Added. (m): * test262/test/language/expressions/object/method-definition/params-trailing-comma.js: Added. (one): (two): * test262/test/language/global-code/decl-func-dup.js: Renamed from JSTests/test262/test/language/block-scope/syntax/redeclaration-global/allowed-to-redeclare-function-declaration-with-function-declaration.js. (f): * test262/test/language/global-code/decl-func.js: Added. (brandNew): * test262/test/language/global-code/decl-lex-configurable-global.js: Added. * test262/test/language/global-code/decl-lex-deletion.js: Added. (test262class): * test262/test/language/global-code/decl-lex-restricted-global.js: Added. * test262/test/language/global-code/decl-lex.js: Added. (test262class): * test262/test/language/global-code/decl-var.js: Added. * test262/test/language/global-code/return.js: Added. * test262/test/language/global-code/script-decl-func-dups.js: Added. * test262/test/language/global-code/script-decl-func-err-non-configurable.js: Added. * test262/test/language/global-code/script-decl-func-err-non-extensible.js: Added. * test262/test/language/global-code/script-decl-func.js: Added. * test262/test/language/global-code/script-decl-lex-deletion.js: Added. * test262/test/language/global-code/script-decl-lex-lex.js: Added. (test262Class): * test262/test/language/global-code/script-decl-lex-restricted-global.js: Added. * test262/test/language/global-code/script-decl-lex-var.js: Added. (test262Fn): * test262/test/language/global-code/script-decl-lex.js: Added. * test262/test/language/global-code/script-decl-var-collision.js: Added. (test262Class): * test262/test/language/global-code/script-decl-var-err.js: Added. * test262/test/language/global-code/script-decl-var.js: Added. * test262/test/language/global-code/super-call-arrow.js: Added. * test262/test/language/global-code/super-call.js: Added. * test262/test/language/global-code/super-prop-arrow.js: Added. * test262/test/language/global-code/super-prop.js: Added. * test262/test/language/global-code/yield-non-strict.js: Added. (catch): * test262/test/language/global-code/yield-strict.js: Added. * test262/test/language/literals/regexp/lastIndex.js: Added. * test262/test/language/literals/regexp/u-unicode-esc-bounds.js: * test262/test/language/literals/regexp/y-assertion-start.js: Added. * test262/test/language/module-code/instn-star-err-not-found-faulty_FIXTURE.js: * test262/test/language/module-code/instn-star-err-not-found.js: * test262/test/language/module-code/namespace/internals/get-own-property-str-found-init.js: * test262/test/language/module-code/parse-err-return.js: Added. * test262/test/language/module-code/parse-err-yield.js: Added. * test262/test/language/rest-parameters/params-trailing-comma-rest.js: Added. * test262/test/language/statements/async-function/declaration-returns-promise.js: Added. (async.foo): * test262/test/language/statements/async-function/early-errors-declaration-NSPL-with-USD.js: Added. (async.foo): * test262/test/language/statements/async-function/early-errors-declaration-arguments-in-formal-parameters.js: Added. (async.foo): * test262/test/language/statements/async-function/early-errors-declaration-await-in-formals-default.js: Added. (async.foo): * test262/test/language/statements/async-function/early-errors-declaration-await-in-formals.js: Added. (async.foo): * test262/test/language/statements/async-function/early-errors-declaration-binding-identifier-arguments.js: Added. (async.arguments): * test262/test/language/statements/async-function/early-errors-declaration-binding-identifier-eval.js: Added. (async.eval): * test262/test/language/statements/async-function/early-errors-declaration-body-contains-super-call.js: Added. (async.foo): * test262/test/language/statements/async-function/early-errors-declaration-body-contains-super-property.js: Added. (async.foo): * test262/test/language/statements/async-function/early-errors-declaration-duplicate-parameters.js: Added. (async.foo): * test262/test/language/statements/async-function/early-errors-declaration-eval-in-formal-parameters.js: Added. (async.foo): * test262/test/language/statements/async-function/early-errors-declaration-formals-body-duplicate.js: Added. (async.foo): * test262/test/language/statements/async-function/early-errors-declaration-formals-contains-super-call.js: Added. (async.foo): * test262/test/language/statements/async-function/early-errors-declaration-formals-contains-super-property.js: Added. (async.foo): * test262/test/language/statements/async-function/early-errors-no-async-generator.js: Added. (async.foo): * test262/test/language/statements/async-function/evaluation-body-that-returns-after-await.js: Added. (async.foo): (foo.then): * test262/test/language/statements/async-function/evaluation-body-that-returns.js: Added. (async.foo): (foo.then): * test262/test/language/statements/async-function/evaluation-body-that-throws-after-await.js: Added. (async.foo): (foo.then): * test262/test/language/statements/async-function/evaluation-body-that-throws.js: Added. (async.foo): (foo.then): * test262/test/language/statements/async-function/evaluation-body.js: Added. (async.foo): * test262/test/language/statements/async-function/evaluation-default-that-throws.js: Added. (async.foo): (foo.then): * test262/test/language/statements/async-function/evaluation-mapped-arguments.js: Added. (async.foo): * test262/test/language/statements/async-function/evaluation-this-value-global.js: Added. (async.foo): * test262/test/language/statements/async-function/evaluation-this-value-passed.js: Added. (async.foo): * test262/test/language/statements/async-function/evaluation-unmapped-arguments.js: Added. (async.foo): * test262/test/language/statements/async-function/syntax-declaration-line-terminators-allowed.js: Added. (async.foo): * test262/test/language/statements/async-function/syntax-declaration-no-line-terminator.js: Added. (async.foo): * test262/test/language/statements/async-function/syntax-declaration.js: Added. (async.foo): (foo.then): * test262/test/language/statements/class/definition/class-method-returns-promise.js: Added. (Foo.prototype.async.method): (Foo): * test262/test/language/statements/class/definition/early-errors-class-method-NSPL-with-USD.js: Added. (Foo.prototype.async.bar): (Foo): * test262/test/language/statements/class/definition/early-errors-class-method-arguments-in-formal-parameters.js: Added. (Foo.prototype.async.foo): (Foo): * test262/test/language/statements/class/definition/early-errors-class-method-await-in-formals-default.js: Added. (Foo.prototype.async.foo): (Foo): * test262/test/language/statements/class/definition/early-errors-class-method-await-in-formals.js: Added. (Foo.prototype.async.foo): (Foo): * test262/test/language/statements/class/definition/early-errors-class-method-body-contains-super-call.js: Added. (Foo.prototype.async.foo): (Foo): * test262/test/language/statements/class/definition/early-errors-class-method-duplicate-parameters.js: Added. (Foo.prototype.async.foo): (Foo): * test262/test/language/statements/class/definition/early-errors-class-method-eval-in-formal-parameters.js: Added. (Foo.prototype.async.foo): (Foo): * test262/test/language/statements/class/definition/early-errors-class-method-formals-body-duplicate.js: Added. (Foo.async.foo): (Foo): * test262/test/language/statements/class/definition/early-errors-class-method-formals-contains-super-call.js: Added. (Foo.prototype.async.foo): (Foo): * test262/test/language/statements/class/definition/methods-async-super-call-body.js: Added. (A.prototype.async.method): (A): (B.prototype.async.method): (B): * test262/test/language/statements/class/definition/methods-async-super-call-param.js: Added. (A.prototype.async.method): (A): (B.prototype.async.method): (B): * test262/test/language/statements/class/definition/params-trailing-comma-arguments.js: Added. (C.prototype.f1): (C.prototype.f2): (C): * test262/test/language/statements/class/definition/params-trailing-comma-length.js: Added. (C.prototype.one): (C.prototype.two): (C): * test262/test/language/statements/class/definition/params-trailing-comma-rest.js: Added. (C.prototype.m): (C): * test262/test/language/statements/class/definition/params-trailing-comma.js: Added. (C.prototype.one): (C.prototype.two): (C): * test262/test/language/statements/function/arguments-with-arguments-fn.js: Added. (f): * test262/test/language/statements/function/arguments-with-arguments-lex.js: Added. (f): * test262/test/language/statements/function/params-trailing-comma-arguments.js: Added. (f1): (f2): * test262/test/language/statements/function/params-trailing-comma-length.js: Added. (one): (two): * test262/test/language/statements/function/params-trailing-comma.js: Added. (one): (two): * test262/test/language/statements/generators/arguments-with-arguments-fn.js: Added. (g): * test262/test/language/statements/generators/arguments-with-arguments-lex.js: Added. (g): * test262/test/language/statements/generators/params-trailing-comma-length.js: Added. (one): (two): * test262/test/language/statements/generators/params-trailing-comma.js: Added. (one): (two): * test262/test262-Revision.txt: 2016-08-23 Benjamin Poulain [JSC] Make Math.cos() and Math.sin() work with any argument type https://bugs.webkit.org/show_bug.cgi?id=161069 Reviewed by Geoffrey Garen. * stress/arith-cos-on-various-types.js: Added. * stress/arith-sin-on-various-types.js: Added. 2016-08-23 Yusuke Suzuki [ES6] Module namespace object's Symbol.iterator method should only accept module namespace objects https://bugs.webkit.org/show_bug.cgi?id=161097 Reviewed by Keith Miller. * test262.yaml: 2016-08-22 Yusuke Suzuki [ES6] Modules' `export default function/class` should be declaration https://bugs.webkit.org/show_bug.cgi?id=160499 Reviewed by Saam Barati. Add several module tests. And flip the failed tests flags in test262. * modules/export-default-function-name-in-assignment-expression.js: Added. (export.default): * modules/export-default-function-name-in-class-declaration.js: Added. * modules/export-default-function-name-in-function-declaration.js: Added. (export.default): * modules/export-default-function-name-in-generator-declaration.js: Added. (export.default): * stress/method-name.js: Added. (testSyntax): (testSyntaxError): (testSyntaxError.Hello.prototype.hello.hello): (testSyntaxError.Hello): (SyntaxError.Unexpected.identifier.string_appeared_here.Expected.an.opening.string_appeared_here.before.a.method.testSyntaxError.let.obj.hello.hello): (testSyntaxError.Hello.prototype.get hello): (testSyntaxError.Hello.prototype.set hello): * test262.yaml: 2016-08-22 Yusuke Suzuki [ES6] Module should not allow HTML comments https://bugs.webkit.org/show_bug.cgi?id=161041 Reviewed by Saam Barati. * modules/html-comments.js: Added. (shouldThrow): * test262.yaml: 2016-08-21 Yusuke Suzuki [DFG] Should not fixup AnyIntUse in 32_64 https://bugs.webkit.org/show_bug.cgi?id=161029 Reviewed by Saam Barati. * typeProfiler/int52-dfg.js: Added. (test): 2016-08-21 Yusuke Suzuki Unreviewed, rolling out r204697 https://bugs.webkit.org/show_bug.cgi?id=161029 * typeProfiler/int52-dfg.js: Removed. (test): Deleted. * typeProfiler/number-filter-dfg.js: Removed. (test): Deleted. 2016-08-21 Yusuke Suzuki [DFG] Should not fixup AnyIntUse in 32_64 https://bugs.webkit.org/show_bug.cgi?id=161029 Reviewed by Saam Barati. * typeProfiler/int52-dfg.js: Added. (test): * typeProfiler/number-filter-dfg.js: Added. (test): 2016-08-19 Benjamin Poulain [JSC] ArithSqrt should work with any argument type https://bugs.webkit.org/show_bug.cgi?id=160954 Reviewed by Saam Barati. * stress/arith-sqrt-on-various-types.js: Added. (let.validInputTypedTestCases.validInputTestCases.map): (isIdentical): (opaqueAllTypesSqrt): (testAllTypesCall): (testSingleTypeCall): (opaqueSqrtForSideEffects): (testSideEffect.let.testObject.valueOf): (testSideEffect): (opaqueSqrtForCSE): (testCSE.let.testObject.valueOf): (testCSE): (testException.opaqueSqrtWithException): (testException): 2016-08-19 Joseph Pecoraro Make custom Error properties (line, column, sourceURL) configurable and writable https://bugs.webkit.org/show_bug.cgi?id=160984 Reviewed by Saam Barati. * stress/native-error-properties.js: Added. (assert): (shouldNotThrow): (checkEmptyErrorPropertiesDescriptors): (checkNonEmptyErrorPropertiesDescriptors): The spec only describes the "message" property, so ensure it has the right descriptor attributes. (checkErrorPropertiesWritable): Ensure common error property names are writable. In strict mode this would have thrown an exception if they were readonly. 2016-08-18 Mark Lam ScopedArguments is using the wrong owner object for a write barrier. https://bugs.webkit.org/show_bug.cgi?id=160976 Reviewed by Keith Miller. * stress/scoped-arguments-write-barrier-should-be-on-scope-object.js: Added. 2016-08-17 JF Bastien We allow assignments to const variables when in a for-in/for-of loop https://bugs.webkit.org/show_bug.cgi?id=156673 Reviewed by Filip Pizlo. * stress/for-in-of-const.js: Added. (expect_nothrow): (expect_throw): (capture): 2016-08-17 Mark Lam Remove an invalid assertion in the DFG backend's GetById emitter. https://bugs.webkit.org/show_bug.cgi?id=160925 Reviewed by Filip Pizlo. * stress/dfg-get-by-id-should-not-assert-non-null-prediction.js: Added. 2016-08-16 Ryan Haddad Unreviewed, rolling out r204464. This is no longer needed after r204495. Reverted changeset: "Skip failing test mozilla/ecma/LexicalConventions/7.7.3.js" https://bugs.webkit.org/show_bug.cgi?id=160662 http://trac.webkit.org/changeset/204464 2016-08-15 Ryan Haddad Skip failing test mozilla/ecma/LexicalConventions/7.7.3.js https://bugs.webkit.org/show_bug.cgi?id=160662 Unreviewed test gardening. * mozilla/ecma/LexicalConventions/7.7.3.js: 2016-08-14 Skachkov Oleksandr [2016] Set correct status for test262 after implementation of Object.values&Object.entries https://bugs.webkit.org/show_bug.cgi?id=160844 Reviewed by Saam Barati. Patch contains fix statuses of specs in the test262 test collection after implementation of Object.values and Object.entries functions. Also patch contains small fixes in tests of the tests for Object.values/entries functions. * stress/object-entries.js: (Object.getOwnPropertyDescriptor): * stress/object-values.js: (Object.getOwnPropertyDescriptor): * test262.yaml: 2016-08-12 Saam Barati Inline store loop for CopyRest in DFG and FTL for certain array modes https://bugs.webkit.org/show_bug.cgi?id=159612 Reviewed by Filip Pizlo. * stress/rest-parameter-having-a-bad-time.js: Added. * stress/rest-parameter-many-arguments.js: Added. * stress/rest-parameter-various-types.js: Added. 2016-08-12 Skachkov Oleksandr [ES2016] Implement Object.entries https://bugs.webkit.org/show_bug.cgi?id=160412 Reviewed by Saam Barati. Patch contains tests for Object.entries function and fix of wrong tests for Object.values function. * stress/object-entries.js: (compare): (string_appeared_here.forEach): (const.getInvokedFunctions.): (const.getInvokedFunctions): (Array.prototype.push): * stress/object-values.js: 2016-08-11 Mark Lam OverridesHasInstance should not branch across register allocations. https://bugs.webkit.org/show_bug.cgi?id=160792 Reviewed by Benjamin Poulain. * stress/OverrideHasInstance-should-not-branch-across-register-allocations.js: Added. 2016-08-11 Mark Lam The jsc shell's Element host constructor should throw if it fails to construct an object. https://bugs.webkit.org/show_bug.cgi?id=160773 Reviewed by Saam Barati. * stress/generational-opaque-roots.js: 2016-08-11 Mark Lam Disallow synchronous sweeping for eden GCs. https://bugs.webkit.org/show_bug.cgi?id=160716 Reviewed by Geoffrey Garen. * stress/eden-gc-with-retired-blocks.js: Added. - This test is just in case we add back support for eden GCs with synchronous sweeping in the future. 2016-08-10 Michael Saboff Baseline GetByVal and PutByVal for cache ID stubs need to handle exceptions https://bugs.webkit.org/show_bug.cgi?id=160749 Reviewed by Filip Pizlo. New test that causes baseline GetByValWithCachedId and PutByValWithCachedId stubs to be generated and then throws exceptions for those stub to handle to verify that they are properly handled. * stress/regress-160749.js: Added. (testCachedGetByVal.): (testCachedGetByVal.get for): (testCachedGetByVal): (testCachedPutByVal.): (testCachedPutByVal.set for): (testCachedPutByVal): 2016-08-10 Mark Lam DFG's flushForTerminal() needs to add PhantomLocals for bytecode live locals. https://bugs.webkit.org/show_bug.cgi?id=160755 Reviewed by Filip Pizlo. * stress/need-bytecode-liveness-for-unreachable-blocks-at-dfg-time.js: Added. 2016-08-09 Skachkov Oleksandr [ES2016] Implement Object.values https://bugs.webkit.org/show_bug.cgi?id=160410 Reviewed by Saam Barati, Yusuke Suzuki. * stress/object-values.js: Added. (compare): (string_appeared_here.forEach): (const.getInvokedFunctions.): (const.getInvokedFunctions): (Array.prototype.push): 2016-08-09 Saam Barati JSBoundFunction should lazily generate its name string https://bugs.webkit.org/show_bug.cgi?id=160678 Reviewed by Mark Lam. * stress/bound-function-lazy-name-generation.js: Added. (assert): (test.let.f): (test.f): (test): 2016-08-08 Mark Lam ASSERTION FAILED: hasInlineStorage() in JSFinalObject::visitChildren(). https://bugs.webkit.org/show_bug.cgi?id=160666 Reviewed by Keith Miller. * stress/object-constructor-should-be-new-target-aware.js: 2016-08-07 Yusuke Suzuki [ES6] Module namespace object should not allow unset IC https://bugs.webkit.org/show_bug.cgi?id=160553 Reviewed by Saam Barati. * modules/namespace-object-get-property.js: Added. (import.as.ns.from.string_appeared_here.shouldThrow): * modules/namespace-object-has-property.js: Added. * modules/namespace-object-inline-caching.js: Added. (import.as.A.from.string_appeared_here.import.as.B.from.string_appeared_here.lookup): (shouldBe.lookup.lookup): (shouldBe.lookup): * modules/namespace-object-inline-caching/a.js: Added. * modules/namespace-object-inline-caching/b.js: Added. * modules/namespace-object-try-get.js: Added. (import.as.ns.from.string_appeared_here.tryGetByIdText): (tryGetByIdTextStrict): * modules/namespace-object-typed-array-fast-path.js: Added. * test262.yaml: 2016-08-05 Saam Barati various math operations don't properly check for an exception after calling toNumber() on the lhs https://bugs.webkit.org/show_bug.cgi?id=160154 Reviewed by Mark Lam. * stress/to-number-throws-correct-exception.js: Added. (test.let.test.runTest.): (test.let.test.runTest.get f): (test.let.test.runTest): (test.let.test): (test): (test2.runTest.): (test2.runTest.get f): (test2.runTest): (test2): 2016-08-05 Saam Barati Assertion failure when accessing TDZ variable in catch through eval https://bugs.webkit.org/show_bug.cgi?id=160554 Reviewed by Mark Lam and Keith Miller. * stress/catch-variables-under-tdz.js: Added. (test): 2016-08-04 Yusuke Suzuki [ES6] JSModuleNamespaceObject's Symbol.iterator function should have name https://bugs.webkit.org/show_bug.cgi?id=160549 Reviewed by Saam Barati. * modules/namespace-object-symbol-iterator-name.js: Added. * test262.yaml: 2016-08-04 Keith Miller ASSERTION FAILED: !hasInstanceValueNode->isCellConstant() || defaultHasInstanceFunction == hasInstanceValueNode->asCell() https://bugs.webkit.org/show_bug.cgi?id=160562 Reviewed by Mark Lam. * stress/instanceof-late-constant-folding.js: Added. (Constructor): (value): (body): 2016-08-04 Caitlin Potter [JSC] fix generator-syntax.js JSTest again after yield grammar fix https://bugs.webkit.org/show_bug.cgi?id=160550 Reviewed by Yusuke Suzuki. * stress/generator-syntax.js: (testYieldBindingIdentifier): 2016-08-03 Caitlin Potter Clarify SyntaxErrors around yield and unskip tests https://bugs.webkit.org/show_bug.cgi?id=158460 Reviewed by Saam Barati. Fix and unskip tests which erroneously asserted that `yield` is not a valid BindingIdentifier, and improve error message for YieldExpressions occuring in Arrow formal parameters. * stress/generator-syntax.js: * stress/yield-out-of-generator.js: 2016-08-03 Filip Pizlo REGRESSION(r203368): broke some test262 tests https://bugs.webkit.org/show_bug.cgi?id=160479 Reviewed by Mark Lam. Added a stress test for this case, since we don't always run test262. * stress/freeze-setter.js: Added. (let.o.set foo): 2016-08-03 Saam Barati Implement nested rest destructuring w.r.t the ES7 spec https://bugs.webkit.org/show_bug.cgi?id=160423 Reviewed by Filip Pizlo. * stress/destructuring-rest-element.js: Added. (assert): (test): (arr): (eq): (gen): (fakeGen.return.Symbol.iterator): (fakeGen): * stress/rest-elements.js: (testSyntaxError.String.raw): * stress/rest-parameter-is-destructuring.js: Added. (assert): (test): (foo): (bar): * test262.yaml: 2016-08-02 Saam Barati Rename Changelog to ChangeLog Rubber stamped by Keith Miller. * Changelog: Removed. 2016-08-02 Saam Barati update a class extending null w.r.t the ES7 spec https://bugs.webkit.org/show_bug.cgi?id=160417 Reviewed by Keith Miller. * Changelog: * stress/class-derived-from-null.js: Added. (assert): (test): (test1.C): (test1): (jsNull): (test2.C): (test2): (test3.C): (test3.D): (test3.E): (test3): (test4.E): (test4): (test5.E): (test5): (test6.Base): (test6.D): (test6.E): (test6.F): (test6.G): (test6): * test262.yaml: 2016-08-01 Filip Pizlo Rationalize varargs stack overflow checks https://bugs.webkit.org/show_bug.cgi?id=160425 Reviewed by Michael Saboff. * stress/arity-check-ftl-throw-more-args.js: Added. (catch): 2016-08-01 Keith Miller We should not keep the JavaScript tests inside the Source/JavaScriptCore/ directory. https://bugs.webkit.org/show_bug.cgi?id=160372 Rubber stamped by Geoffrey Garen. This patch moves all the JavaScript tests from Source/JavaScriptCore/tests to a new top level directory, JSTests. Having the tests in the Source directory was both confusing an inconvenient for people that just want to checkout the source code of WebKit. Since there is no other obvious place to put all the JavaScript tests a new top level directory seemed the most sensible. * tests/: Deleted.