Mercurial > hg > truffle
annotate graal/com.oracle.truffle.sl.test/tests/Null.sl @ 16609:add3510d087b
Do final round of incremental conditional elimination
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 28 Jul 2014 14:43:28 -0700 |
parents | b16ec83edc73 |
children |
rev | line source |
---|---|
13821
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
1 /* The easiest way to generate null: a function without a return statement implicitly returns null. */ |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
2 function null() { |
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 |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
5 function main() { |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
6 println(null()); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
7 println(null() == null()); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
8 println(null() != null()); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
9 println(null() == 42); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
10 println(null() != 42); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
11 println(null() == "42"); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
12 println(null() != "42"); |
b16ec83edc73
Documentation and more refactoring of Simple Language
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff
changeset
|
13 } |