X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/tests/stress/multi-put-by-offset-multiple-transitions.js diff --git a/tests/stress/multi-put-by-offset-multiple-transitions.js b/tests/stress/multi-put-by-offset-multiple-transitions.js new file mode 100644 index 0000000..99987ef --- /dev/null +++ b/tests/stress/multi-put-by-offset-multiple-transitions.js @@ -0,0 +1,30 @@ +function foo(o) { + o.x = 1; + o.y = 2; + o.a = 3; + o.b = 4; + o.c = 5; + o.d = 6; + o.e = 7; + o.f = 8; + o.g = 9; + o.h = 10; + o.i = 11; +} + +noInline(foo); + +function Foo() { + foo(this); +} + +var result = 0; + +for (var i = 0; i < 100000; ++i) { + foo({f:42}); + result += (new Foo()).x; +} + +if (result != 100000) + throw "Bad result: " + result; +