JVM IR: replace unnecessary property accessor calls with field access

Split the ConstAndJvmFieldPropertiesLowering into two: ConstLowering
which replaces const vals with their values, and
PropertiesToFieldsLowering which removes unnecessary property accessors
(such as for JvmField or private properties with default accessors) and
replaces calls to those accessors with field access
This commit is contained in:
Alexander Udalov
2019-02-05 15:19:20 +01:00
committed by Alexander Udalov
parent 1c143310ac
commit ce7d8a6874
7 changed files with 77 additions and 26 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// Checks that methods 'access$getMy$p', 'access$getMy$cp' and 'getMy' are not generated and
// that backed field 'my' is directly used through a 'getstatic'
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
package a
class A {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
package a
class A {