PageRenderTime 12ms CodeModel.GetById 9ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

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

http://github.com/zpao/v8monkey
JavaScript | 25 lines | 20 code | 5 blank | 0 comment | 2 complexity | 536eda6e561416c977abd7b9755064c5 MD5 | raw file
 1var o = { };
 2for (var i = 0; i <= 50; i++)
 3    o[i] = i;
 4
 5Object.defineProperty(o, "51", { get: assertEq });
 6
 7var threw = 0;
 8function g(o, i) {
 9    try {
10        assertEq(o[i], i);
11    } catch (e) {
12        threw++;
13    }
14}
15
16function f() {
17    for (var i = 0; i <= 51; i++)
18      g(o, i);
19}
20
21f();
22f();
23f();
24assertEq(threw, 3);
25