FqName/FqNameUnsafe tend to eagerly compute things like
safe/parent/shortName which take a lot of space.
This change helps to lower strongly reachable memory just before codegen
in JVM IR by about 5% on a relatively big project.
A mechanism that allows kotlinx.serialization plugin to preserve the
correct (program) order of properties after serializing/deserializing
descriptors to kotlin metadata, which is needed for correct and stable
json serialization of class hierarchies in incremental/multi-module scenario.
It uses protobuf extensions.
Currently DescriptorByIdSignatureFinder performs lookup of descriptor
not only in the given module but also in its dependencies.
This behaviour is incorrect if we have some kind of
relation (e.g. mapping) between moduleDescriptor and found descriptor.
Thus, we add a handle to control search scope.
- Introduce Ir-based Functional interface factory
- Switch from LazyIr to pure
- Use kotlin library to access raw bytes
- Link dirty files against IC cache and dependencies instead of LazyIr
- Move `DescriptorByIdSignatureFinder` from K/N to common
- Support inline-bodies only MODE
This change is required for Native interop libraries.
For enums and structs we generate full-blown IR classes that should not
be serialized because they will be generated anew.
- Remove klib dependency on metadata and uniqID
- Refactored proto format to make it more effective and compact
-- Use special encoding for some types of data (coordinates, flags, types)
-- Remove symbols table
-- Use packed proto list if it is possible
- Remove extension from metadata
- Remove special ids for function interfaces
- Fix klib IO
- Fix incremental cache
- General code clean up
- Implement abstract Ir-based, Descriptor-based
mangler computers and export checkers and corresponding platform
specializations
- Add runtime verifier which check whether all types of mangler
produces the same type of data
Note: code migration is not finished yet
All mutable state for IR declarations should be either:
- var (mutable properties)
- or class member list
Mutable properties are straightforward to persist.
The class member list is handled in a special way.