comparison graal/com.oracle.graal.truffle.test/sl/TestDeoptInInlinedFunction.sl @ 20985:eebb05f2d1e8

Fixes for GraphPE
author Christian Wimmer <christian.wimmer@oracle.com>
date Wed, 15 Apr 2015 21:01:33 -0700
parents
children
comparison
equal deleted inserted replaced
20984:6361fa2e3321 20985:eebb05f2d1e8
1 /*
2 * This tests that simple arithmetic gets inlined.
3 */
4 function add(a, b) {
5 deoptimizeWhenCompiled(a == 50);
6 return a + b;
7 }
8
9
10 function test() {
11 i = 0;
12 while (i < 100) {
13 i = add(i, 1);
14 }
15 return i;
16 }
17
18 function main() {
19 waitForOptimization(callUntilOptimized(test, 1 == 2));
20 test();
21 }