Mercurial > hg > graal-compiler
annotate graal/com.oracle.graal.truffle.test/src/sl/TestDeoptInInlinedFunction.sl.disable @ 23394:964f28c04d7b default tip
Don't fill the code cache with nmethods from CTW
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Fri, 05 Feb 2016 22:48:36 -0800 |
parents | bba4e91a2d63 |
children |
rev | line source |
---|---|
20985
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
1 /* |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
2 * This tests that simple arithmetic gets inlined. |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
3 */ |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
4 function add(a, b) { |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
5 deoptimizeWhenCompiled(a == 50); |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
6 return a + b; |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
7 } |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
8 |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
9 |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
10 function test() { |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
11 i = 0; |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
12 while (i < 100) { |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
13 i = add(i, 1); |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
14 } |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
15 return i; |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
16 } |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
17 |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
18 function main() { |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
19 waitForOptimization(callUntilOptimized(test, 1 == 2)); |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
20 test(); |
eebb05f2d1e8
Fixes for GraphPE
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
21 } |