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:09:07 +01:00
2018-10-10 19:03:56 +03:00
2018-12-21 16:09:11 +01:00
2018-12-21 16:09:04 +01:00
2018-12-21 16:09:06 +01:00
2018-12-21 16:09:11 +01:00
2018-09-18 14:36:20 +03:00
2018-12-21 16:09:11 +01:00
2019-01-17 18:38:23 +03:00
2018-12-24 13:40:40 +01:00
2018-10-10 19:35:17 +03:00
2019-01-23 15:11:14 +01:00
2018-12-21 16:09:04 +01:00
2019-01-17 23:46:26 +03:00
2019-01-17 23:46:26 +03:00
2018-12-21 16:09:06 +01:00
2018-12-20 12:53:23 +01:00
2018-10-25 15:48:42 +03:00
2018-08-09 14:22:46 +03:00
2018-12-28 15:09:11 +03:00
2019-01-23 15:11:14 +01:00
2019-01-21 12:12:34 +01:00
2018-12-21 16:09:11 +01:00
2019-01-23 15:11:14 +01:00
2019-01-16 12:11:28 +03:00
2018-12-21 16:09:09 +01:00
2018-12-21 16:09:04 +01:00
2018-09-18 14:36:20 +03:00
2018-10-26 19:51:20 +03:00
2018-10-15 00:03:45 +03:00
2019-01-17 23:46:26 +03:00
2018-12-21 16:09:04 +01:00
2018-07-10 13:34:19 +03:00
2018-09-21 18:16:03 +03:00
2018-12-21 16:09:06 +01:00
2018-12-21 16:09:07 +01:00
2018-10-25 15:48:42 +03:00
2019-01-23 15:11:14 +01:00
2018-12-21 16:09:11 +01:00
2018-12-21 16:09:12 +01:00
2018-12-21 16:09:09 +01:00
2019-01-15 13:14:41 +03:00
2018-09-18 14:36:20 +03:00
2018-09-11 12:34:09 +03:00
2019-01-16 12:11:28 +03:00
2019-01-09 19:18:54 +01:00
2018-07-10 13:34:19 +03:00
2018-12-27 13:12:38 +01:00
2018-09-24 18:21:57 +03:00
2019-01-15 13:14:41 +03:00
2018-12-20 12:53:23 +01:00
2019-01-22 09:48:42 +03:00
2018-12-21 16:09:09 +01:00
2019-01-17 23:46:26 +03:00
2018-12-21 16:09:06 +01:00
2018-12-20 12:53:23 +01:00
2019-01-03 07:57:36 +01:00
2018-08-09 14:22:50 +03:00
2018-09-18 14:36:20 +03:00
2019-01-21 10:56:02 +03:00
2018-12-21 16:09:06 +01:00
2018-10-10 13:43:22 +03:00
2018-10-15 21:52:50 +03:00
2019-01-11 15:27:51 +01:00
2018-12-21 16:09:06 +01:00
2019-01-19 09:43:43 +01:00
2018-06-09 19:15:38 +03:00
2019-01-03 07:57:36 +01:00
2018-12-20 12:53:23 +01:00
2018-10-22 16:32:52 +02:00
2018-12-21 16:09:04 +01:00
2018-10-22 16:32:55 +02:00
2018-12-21 16:09:11 +01:00
2018-11-23 18:41:33 +01:00
2018-12-21 16:09:11 +01:00
2018-12-21 16:09:04 +01:00
2019-01-03 07:57:36 +01:00
2018-12-21 16:09:04 +01:00
2019-01-03 07:57:36 +01:00
2019-01-17 23:46:26 +03:00
2018-12-21 16:09:11 +01:00
2018-12-21 16:09:06 +01:00
2018-09-18 14:36:20 +03:00
2019-01-17 18:38:23 +03:00
2018-06-14 19:54:30 +03:00
2018-11-01 16:51:42 +03:00
2018-06-28 12:26:41 +02:00
2018-08-02 15:51:16 +02:00
2018-10-22 16:32:55 +02:00
2019-01-14 14:54:18 +03:00
2018-12-21 16:09:06 +01:00
2018-08-09 20:55:50 +03:00
2018-10-25 15:48:42 +03:00
2018-10-15 00:03:45 +03:00
2018-12-21 16:09:10 +01:00
2018-12-21 16:09:07 +01:00
2018-11-29 22:04:53 +03:00
2018-12-21 16:09:07 +01:00
2019-01-11 20:28:04 +03:00
2018-09-18 14:36:20 +03:00
2018-12-21 16:09:06 +01:00
2018-12-21 16:09:06 +01:00
2018-10-10 17:27:37 +03:00
2018-08-15 10:26:28 +03:00
2019-01-17 13:49:39 +03:00
2019-01-17 23:46:26 +03:00
2018-10-25 09:12:26 +02:00