Mercurial > hg > graal-compiler
annotate graal/com.oracle.truffle.sl.test/tests/String.sl @ 17116:dced35fd40f7
[SPARC] fix the floatingpoint loading of constant +0.0 and -0.0, changed ArraysCompare more to the C2 implementation.
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Tue, 16 Sep 2014 15:36:00 -0700 |
parents | ff3136ecb5a7 |
children |
rev | line source |
---|---|
13821
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
1 function null() { |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
2 } |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
3 |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
4 function foo() { |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
5 return "bar"; |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
6 } |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
7 |
13883
ff3136ecb5a7
SL: small changes
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13821
diff
changeset
|
8 function f(a, b) { |
ff3136ecb5a7
SL: small changes
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13821
diff
changeset
|
9 return a + " < " + b + ": " + (a < b); |
ff3136ecb5a7
SL: small changes
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13821
diff
changeset
|
10 } |
ff3136ecb5a7
SL: small changes
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13821
diff
changeset
|
11 |
13821
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
12 function main() { |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
13 println("s" + null()); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
14 println("s" + null); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
15 println("s" + foo()); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
16 println("s" + foo); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
17 |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
18 println(null() + "s"); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
19 println(null() + "s"); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
20 println(foo() + "s"); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
21 println(foo + "s"); |
13883
ff3136ecb5a7
SL: small changes
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13821
diff
changeset
|
22 |
ff3136ecb5a7
SL: small changes
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13821
diff
changeset
|
23 println(f(2, 4)); |
ff3136ecb5a7
SL: small changes
Christian Wimmer <christian.wimmer@oracle.com>
parents:
13821
diff
changeset
|
24 println(f(2, "4")); |
13821
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
25 } |