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-08-17 21:44:08 +03:00
2016-03-09 10:25:38 +03:00
2015-10-19 16:03:19 +03:00
2018-06-14 19:54:30 +03:00
2018-08-28 13:48:43 +03:00
2015-03-17 15:47:39 +03:00
2015-03-17 15:47:39 +03:00
2018-12-21 16:09:10 +01:00
2015-03-17 15:47:39 +03:00
2018-09-04 20:19:04 +03:00
2018-07-31 11:28:39 +03:00
2018-06-14 19:54:30 +03:00
2018-06-14 19:54:30 +03:00
2018-08-09 14:22:46 +03:00
2018-08-09 14:22:46 +03:00
2018-08-09 14:22:46 +03:00
2018-06-09 19:15:38 +03:00
2018-07-03 19:51:58 +03:00
2018-06-19 17:09:31 +03:00
2015-05-12 19:43:17 +02:00
2018-07-11 15:25:41 +03:00
2018-06-28 12:26:41 +02:00
2018-10-10 13:43:22 +03:00
2018-09-18 14:36:20 +03:00
2018-09-04 20:19:04 +03:00
2018-06-28 12:26:41 +02:00
2018-09-18 14:36:20 +03:00
2015-04-29 14:03:11 +03:00
2018-09-18 14:36:20 +03:00
2019-01-23 15:11:14 +01:00
2018-07-10 14:11:09 +03:00
2018-06-19 17:09:31 +03:00
2016-02-20 15:19:29 +03:00
2018-06-09 19:15:38 +03:00
2018-09-18 14:36:20 +03:00
2018-08-31 15:34:18 +03:00
2018-06-19 17:09:31 +03:00
2015-11-27 15:51:11 +03:00
2017-01-30 19:44:51 +03:00
2018-09-18 14:36:20 +03:00
2018-09-18 14:36:20 +03:00
2018-08-09 14:22:46 +03:00
2018-12-21 16:09:11 +01:00
2018-08-28 13:48:43 +03:00
2018-08-09 14:22:50 +03:00
2018-06-21 13:27:17 +03:00
2018-08-09 14:22:50 +03:00
2018-06-09 19:15:38 +03:00
2018-09-04 20:19:04 +03:00
2018-08-09 14:22:50 +03:00
2018-08-09 14:22:50 +03:00
2018-08-09 14:22:50 +03:00
2018-08-09 14:22:50 +03:00
2016-02-20 15:19:29 +03:00
2015-11-27 15:51:11 +03:00
2018-08-09 14:22:50 +03:00
2018-08-09 14:22:50 +03:00
2018-09-18 14:36:20 +03:00
2018-08-09 14:22:46 +03:00
2018-12-21 16:09:11 +01:00
2015-04-07 13:08:51 +03:00
2018-09-18 14:36:20 +03:00
2016-11-21 18:20:33 +03:00
2018-10-10 13:43:22 +03:00
2013-01-28 18:20:17 +04:00
2013-01-28 18:20:17 +04:00
2018-08-09 14:22:46 +03:00
2018-08-02 13:19:28 +02:00
2018-08-09 14:22:46 +03:00
2018-07-23 15:08:18 +03:00
2018-08-31 15:34:18 +03:00
2015-03-17 15:47:39 +03:00
2018-07-03 19:51:58 +03:00
2018-08-09 14:22:46 +03:00
2018-08-09 14:22:46 +03:00
2018-06-21 13:27:17 +03:00
2018-07-10 13:34:19 +03:00
2018-09-18 14:36:20 +03:00
2018-08-09 14:22:46 +03:00
2013-01-28 18:20:17 +04:00
2018-09-18 14:36:20 +03:00
2018-09-18 14:36:20 +03:00
2018-09-18 14:36:20 +03:00
2018-09-18 14:36:20 +03:00
2018-09-18 14:36:20 +03:00
2018-08-28 13:48:43 +03:00
2018-08-28 13:48:43 +03:00
2018-07-03 19:51:58 +03:00
2018-08-31 15:34:18 +03:00
2018-06-09 19:15:38 +03:00
2016-05-19 16:22:40 +03:00
2018-08-09 14:22:46 +03:00
2013-01-28 18:20:17 +04:00
2016-12-22 17:19:24 +03:00
2018-06-14 19:54:30 +03:00