summaryrefslogtreecommitdiff
path: root/js/src/jit-test/tests/basic/bug489098.js
blob: 6767ba634427903a94aa9d4b5e649b17d95b485f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Check that the loop is trace-compiled even though it's run in an eval.

code = "\
j = 0;\
for (i = 0; i < 10; i++)\
{\
  j += 5;\
}\
";

eval(code);
print (j);

checkStats({
recorderStarted: 1,
recorderAborted: 0,
traceCompleted: 1,
});