Mads Ager
fb6eafddf1
JVM_IR: Generate better code for null checks.
...
Simplify ifs when branches have condition true/false.
Simplify blocks containing only a variable declaration
and a variable get of the same variable. Simplify to
just the condition.
Do not introduce temporary variables for constants for
null checks. Constants have no side-effects and can be
reloaded freely instead of going through a local.
This simplifies code such as "42.toLong()!!" so that the
resulting code has no branches and uses no locals. The
simplifications happen as follows:
```
block
temp = 42.toLong()
when
(temp == null) throw NPE
(true) load temp
---> null test simplification
block
temp = 42.toLong()
when
(false) throw NPE
(true) load temp
---> when simplification
block
temp = 42.toLong()
load temp
---> block simplification
42.toLong()
```
2019-01-23 15:11:14 +01:00
..
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2019-01-19 09:43:43 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-28 14:18:39 +03:00
2018-12-21 16:20:45 +01:00
2018-12-28 14:18:39 +03:00
2018-12-21 16:20:45 +01:00
2019-01-19 09:43:43 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2019-01-16 20:40:33 +03:00
2019-01-23 15:11:14 +01:00
2018-12-28 14:18:39 +03:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2019-01-23 15:11:14 +01:00
2019-01-10 17:17:51 +03:00
2017-06-28 13:44:07 +02:00
2019-01-19 09:43:43 +01:00
2019-01-18 13:45:20 +03:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-28 14:18:39 +03:00
2018-12-21 16:20:45 +01:00
2019-01-08 12:09:23 +01:00
2018-12-21 16:20:45 +01:00
2019-01-16 20:40:29 +03:00
2018-12-21 16:20:45 +01:00
2019-01-19 09:43:43 +01:00
2018-12-21 16:20:45 +01:00
2019-01-10 17:17:51 +03:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-28 14:18:39 +03:00
2018-12-21 16:20:45 +01:00
2019-01-17 13:49:39 +03:00
2018-12-21 16:20:45 +01:00
2019-01-23 15:11:14 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2017-03-10 10:04:30 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2017-07-27 09:02:26 +03:00
2017-06-20 13:31:36 +03:00
2018-05-21 20:43:37 +03:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2019-01-19 09:43:43 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-20 12:53:24 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2017-09-06 08:20:32 +02:00
2018-12-21 16:20:45 +01:00
2017-01-13 10:31:07 +03:00
2018-06-22 16:53:07 +03:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00
2018-12-21 16:20:45 +01:00