Mercurial > hg > truffle
view graal/com.oracle.graal.truffle.test/sl/TestInlining.sl @ 19344:83b35b97959c
Merge with f7b121b82697c3c3adcce9f9ea3fcc241c2eb968
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Thu, 12 Feb 2015 16:57:30 -0800 |
parents | f735aa886cf6 |
children |
line wrap: on
line source
/* * This tests that simple arithmetic gets inlined. */ function add(a, b) { return a + b; } function test() { i = 0; while (i < 100) { i = add(i, 1); } return i; } function main() { waitForOptimization(callUntilOptimized(test)); assertTrue(isInlined(test, test, add), "add is not inlined"); }