comparison graal/com.oracle.graal.truffle.test/sl/TestCompilationThreshold.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
comparison
equal deleted inserted replaced
17006:e9c119927199 17007:004e3f0a0517
1 /*
2 * This test verifies the compilation threshold property.
3 */
4 function test() {
5 }
6
7 function main() {
8 /* TODO disableSplitting is required because otherwise it needs more calls to warm up. This still needs to be fixed. */
9 disableSplitting(test);
10 threshold = getOption("TruffleCompilationThreshold");
11 i = 0;
12 while (i < threshold -1) {
13 test();
14 i = i + 1;
15 }
16 assertFalse(isOptimized(waitForOptimization(test)));
17 test(); // triggers compilation
18 assertTrue(isOptimized(waitForOptimization(test)));
19 }