X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/tests/stress/arrayify-to-structure-contradiction.js diff --git a/tests/stress/arrayify-to-structure-contradiction.js b/tests/stress/arrayify-to-structure-contradiction.js new file mode 100644 index 0000000..22c8019 --- /dev/null +++ b/tests/stress/arrayify-to-structure-contradiction.js @@ -0,0 +1,16 @@ +function foo(array, v, p) { + array[0] = 10; + if (p) + v = "hello"; + array[0] = v; +} + +noInline(foo); + +for (var i = 0; i < 100000; ++i) { + var array = [42]; + foo(array, 43, false); + if (array[0] != 43) + throw "Error: bad result: " + array; +} +