Mercurial > hg > truffle
annotate graal/com.oracle.graal.truffle.test/sl/TestInliningMaxCallerSize.sl @ 17098:602fcd1b2cd4
[SPARC] fix issues with moving between float and general purpose registers (alignment)
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Wed, 10 Sep 2014 11:18:38 -0700 |
parents | 004e3f0a0517 |
children | f735aa886cf6 |
rev | line source |
---|---|
17007
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
1 /* |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
2 * This test verifies that CallTargets cannot exceed the TruffleInliningMaxCallerSize limit when inlining. |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
3 */ |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
4 function inlinableFunction() { |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
5 generateDummyNodes(getOption("TruffleInliningMaxCallerSize") - 8); |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
6 } |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
7 |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
8 function notInlinableFunction() { |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
9 generateDummyNodes(getOption("TruffleInliningMaxCallerSize") - 7); |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
10 } |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
11 |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
12 function test1() { |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
13 inlinableFunction(); |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
14 } |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
15 |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
16 function test2() { |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
17 notInlinableFunction(); |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
18 } |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
19 |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
20 function main() { |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
21 waitForOptimization(callUntilOptimized(test1)); |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
22 assertTrue(isInlined(test1, inlinableFunction), "inlinableFunction is not inlined"); |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
23 |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
24 waitForOptimization(callUntilOptimized(test2)); |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
25 assertFalse(isInlined(test2, notInlinableFunction), "notInlinableFunction is inlined"); |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
26 } |