js/src/jit-test/tests/jaeger/bug601982.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/jaeger/bug601982.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,33 @@
     1.4 +/* vim: set ts=8 sts=4 et sw=4 tw=99: */
     1.5 +
     1.6 +function J(i) {
     1.7 +    /* Cause a branch to build(?) */
     1.8 +    if (i % 3)
     1.9 +        [1,2,3]
    1.10 +}
    1.11 +
    1.12 +function h(i) {
    1.13 +    J(i);
    1.14 +
    1.15 +    /* Generate a safe point in the method JIT. */
    1.16 +    if (1 == 14) { eval(); }
    1.17 +
    1.18 +    return J(i);
    1.19 +}
    1.20 +
    1.21 +function g(i) {
    1.22 +    /* Method JIT will try to remove this frame(?) */
    1.23 +    if (i == 14) { with ({}); }
    1.24 +    return h(i);
    1.25 +}
    1.26 +
    1.27 +function f() {
    1.28 +    for (var i = 0; i < 9 * 2; i++) {
    1.29 +        g(i);
    1.30 +    }
    1.31 +}
    1.32 +
    1.33 +f();
    1.34 +
    1.35 +/* Don't crash. */
    1.36 +

mercurial