Mercurial > hg > graal-compiler
annotate graal/com.oracle.graal.truffle.test/src/sl/TestOSR.sl @ 23269:52f1bd96653f
ensure OptionValues have a name if profiling their reads
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 07 Jan 2016 15:00:09 +0100 |
parents | bba4e91a2d63 |
children |
rev | line source |
---|---|
20097
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
1 function test() { |
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
2 i = 0; |
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
3 sum = 0; |
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
4 while (i < 300000) { |
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
5 sum = sum + i; |
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
6 i = i + 1; |
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
7 } |
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
8 return sum; |
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
9 } |
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
10 |
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
11 function main() { |
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
12 test(); |
e8e55ebcf069
Truffle: implement language agnostic OSR support.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
13 } |