Mercurial > hg > truffle
comparison graal/com.oracle.graal.truffle.test/sl/TestInliningMaxCallerSize.sl @ 17007:004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 01 Sep 2014 20:08:19 +0200 |
parents | |
children | f735aa886cf6 |
comparison
equal
deleted
inserted
replaced
17006:e9c119927199 | 17007:004e3f0a0517 |
---|---|
1 /* | |
2 * This test verifies that CallTargets cannot exceed the TruffleInliningMaxCallerSize limit when inlining. | |
3 */ | |
4 function inlinableFunction() { | |
5 generateDummyNodes(getOption("TruffleInliningMaxCallerSize") - 8); | |
6 } | |
7 | |
8 function notInlinableFunction() { | |
9 generateDummyNodes(getOption("TruffleInliningMaxCallerSize") - 7); | |
10 } | |
11 | |
12 function test1() { | |
13 inlinableFunction(); | |
14 } | |
15 | |
16 function test2() { | |
17 notInlinableFunction(); | |
18 } | |
19 | |
20 function main() { | |
21 waitForOptimization(callUntilOptimized(test1)); | |
22 assertTrue(isInlined(test1, inlinableFunction), "inlinableFunction is not inlined"); | |
23 | |
24 waitForOptimization(callUntilOptimized(test2)); | |
25 assertFalse(isInlined(test2, notInlinableFunction), "notInlinableFunction is inlined"); | |
26 } |