Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / jit-test / tests / basic / bug489098.js
1 // Check that the loop is trace-compiled even though it's run in an eval.
2
3 code = "\
4 j = 0;\
5 for (i = 0; i < 10; i++)\
6 {\
7   j += 5;\
8 }\
9 ";
10
11 eval(code);
12 print (j);
13
14 checkStats({
15 recorderStarted: 1,
16 recorderAborted: 0,
17 traceCompleted: 1,
18 });