Commit Graph

8 Commits

Author SHA1 Message Date
Alexander Udalov 98aecbef6b Optimize runtime representation for callable reference subclasses
Instead of generating overrides for getOwner/getName/getSignature in
each anonymous class representing a callable reference, pass them to the
superclass' constructor and store as fields. This occupies some small
memory but helps to reduce the size of the generated class files, and
will be helpful for adding further runtime information to callable
references, such as information about implicit conversions this
reference has been subject to.

Represent owner as java.lang.Class + boolean instead of
KDeclarationContainer, so that the unnecessary wrapping Class->KClass
wouldn't happen before it's needed, and also to make sure all callable
references remain serializable.

Note that the argument type where the "is declaration container a class"
is passed is int instead of boolean. The plan is to pass the
aforementioned implicit conversion information as bits of this same
integer value.

 #KT-27362 Fixed
2020-03-06 16:55:07 +01:00
Mikhael Bogdanov 7bab3a1048 Set non-synthetic origin for generated members of PropertyReference 2019-11-20 12:57:34 +01:00
Steven Schäfer ee45933e33 JVM IR: Create local classes in PropertyReferenceLowering
In particular, we should not cache classes or instances for property
references, since they may be used inside of inline funtions. This also
allows us to mark the $$delegatedProperties array as package private.
2019-09-06 12:12:58 +02:00
Steven Schäfer 626f4c94f6 Handle special case visibility rules in LocalDeclarationsLowering 2019-09-06 12:12:58 +02:00
Alexander Udalov 29fa1793d3 JVM IR: add InventNamesForLocalClasses pass 2019-07-17 13:55:36 +02:00
pyos 3fdcf8376f Add IR equivalent of the WriteFlags test 2019-04-09 08:11:29 +02:00
Alexander Udalov c1ef89df2c Make anonymous classes for callable references synthetic
#KT-28453 Fixed
2018-12-18 17:48:19 +01:00
Alexander Udalov f8815d9450 Test visibility of anonymous classes for callable references 2015-07-10 20:10:13 +03:00