Most of these changes are aimed to support and correctly transform ClassId for
local classes, no actual bytes are written or read at the moment (see next
commits). See the comment on ClassId for clarification.
A hack in DescriptorSerializer which erased anonymous types to Any (which had
been breaking the consistency between descriptors resolved from sources and
from serialized information) is now gone
Introduce an abstract factory class ReflectionFactory which is responsible for creating
reflection objects (KClass, KProperty, ...). The meaningful implementation is
located in "reflection.jvm" where KClassImpl/KPropertyImpl/... are accessible
and can be instantiated. The default implementation will be used in the lite
runtime with no reflection and will return nulls / throw exceptions there.
Put all functions, calls to which are generated by JVM back-end, in one place:
the class named Reflection which contains only static methods. Previously these
functions were scattered across different files in module "reflection.jvm".
The code using reflection may now be compiled against either runtime, but
reflection features will work if and only if reflection is accessible at
runtime
This obsoletes 'replaceName' workaround that was present in ClosureCodegen but
missing in other crucial call sites of mapSignature, e.g. generation of
EnclosingMethod info
#KT-6691 Fixed
This is the case when you reference a Java class in Kotlin whose superclass is
not resolved. Previously this fact was swallowed by LazyJavaClassDescriptor
leading to mysterious compilation errors
#KT-5129 Fixed
- drop 'kotlin-runtime' and other dependencies which are exported by
other modules ('util' and 'util.runtime' in case of 'kotlin-runtime')
- make all Kotlin modules from the compiler depend on 'util' for clarity
- put 'util' and 'util.runtime' to the bottom of the list everywhere: when
kotlin-runtime gets reflection, classes from core/ should have higher
priority than their previous versions from kotlin-runtime.jar