Roman Artemev
cd931796bc
[SERIALIZATION] Fix kotlinx.serialization plugin
2020-04-14 11:12:08 +03:00
Roman Artemev
a9788f9506
[KLIB] Create an abstract class for module deserializer
...
- 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
2020-04-14 11:12:08 +03:00
Roman Artemev
8e295de593
[KLIB] Make sure float/double bits have fixed representation for NaN.
...
- Store float and double constants as fixed32/64 proto value
and encode/decode them in our side.
2020-03-16 16:49:39 +03:00
Alexander Udalov
795d6ab407
Migrate UseExperimental->OptIn in project sources
2020-03-10 12:07:14 +01:00
Roman Artemev
7fff4e78e5
[KLIB] Do not include return type into mangle
2020-03-10 11:12:09 +03:00
Roman Artemev
62621de4fc
[KLIB] Don't have a special mangle for internal declarations
2020-03-10 11:12:09 +03:00
Sergey Bogolepov
71cc288a14
[Linker][IdSignature] Rename classFqn property
...
classFqn is incorrect since this property represents
FqName of any declaration, including properties, functions and
type aliases.
2020-02-26 17:48:38 +07:00
Sergey Bogolepov
221d24c597
[Linker] Do not generate wrapped descriptor if descriptor is provided
...
Fixes metadata-based interop in Kotlin/Native.
2020-02-26 17:48:38 +07:00
Alexander Gorshenev
3eed0609b2
Brought back mppKlibs guard lost in rebase
2020-02-25 13:26:11 +03:00
Georgy Bronnikov
fe009ac695
IR: restore reading common Klib from JVM
...
Adapt to changes in linker
2020-02-23 14:55:29 +03:00
Sergey Bogolepov
208c06516b
[IR][Serialization] Allow backends to skip files
...
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.
2020-02-17 16:00:37 +07:00
Roman Artemev
6a37955a36
[KLIB] Implement new linker based on IdSignature
...
- 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
2020-02-14 18:22:16 +03:00
Roman Artemev
e81a7f10c1
[KLIB] Implement special encoding for Klib data
2020-02-14 18:22:15 +03:00
Roman Artemev
bb04eae93e
[IR] Implement IdSignature API
...
- Basic implementation of IdSignature classes and interafces
- Abstract and platform Ir/Descriptor based signature builders
2020-02-14 18:22:15 +03:00
Roman Artemev
0254734bb5
[IR] Refactored Kotlin Mangler API
...
- 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
2020-02-14 18:22:15 +03:00
Anton Bannykh
e8fba8bcb6
IR API: change val ... : MutableList to var ...: List for most lists
...
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.
2020-02-06 21:03:32 +03:00
Anton Bannykh
0bcde9dffc
IR API: Make IrEnumEntry.initializerExpression IrExpressionBody
...
All non-declarations should be inside IrBody's now
2020-02-06 21:03:32 +03:00
Georgy Bronnikov
e351d560d6
IR: remove KotlinIrLinker.checkAccessibility
...
This sanity check conflicted with cases where visibility test is
suppressed in the frontend.
2020-01-28 12:19:44 +03:00
Georgy Bronnikov
f75400cc1a
IR: avoid some calls of getUniqId()
2020-01-28 12:19:44 +03:00
Georgy Bronnikov
5ede65c525
JVM_IR: read Klib
2020-01-28 12:19:43 +03:00
Dmitry Petrov
c540116b71
IR: additional callable reference adapter stuff in IR
...
- IrFunctionReference.reflectionTarget: IrFunctionSymbol?
- add separate declaration origin for callable reference adapters
- bump IR ABI version
2020-01-24 11:21:26 +03:00
Dmitry Petrov
64a405e7a0
IR: 'fun interface' support
2020-01-22 00:12:03 +03:00
Mikhail Zarechenskiy
27e104187f
FIC: remove isFun from IR proto as conversion should happen in psi2ir
2020-01-17 19:36:12 +03:00
Mikhail Zarechenskiy
f7ce1c669b
FIC: Introduce isFun property for descriptors and proto
2020-01-17 19:35:06 +03:00
Alexander Gorshenev
39e1b24c2c
Don't search for expects when not given -Xmpp-klibs
2019-12-26 18:17:36 +03:00
Sergey Igushkin
1129b2d3eb
Support serializing a module's own descriptors without dependencies
...
The KlibMetadataSerializer used to serialize all package fragments that a module
could provide, including those coming from the module's dependencies. In order
to produce a klib from a module that is analyzed by the K2MetadataCompiler, the
serializer needs to take just the own package fragments of the module, excluding
those of the dependencies.
2019-12-25 12:09:08 +03:00
Sergey Igushkin
28e0089259
Allow not providing IR to serialize a klib with just the frontend metadata
2019-12-25 12:09:07 +03:00
Igor Chevdar
8d02d00f22
[IR Serialization] Removed native-specific hack in mangler
2019-12-20 16:13:11 +03:00
Alexander Gorshenev
ffa368e0a7
Reconciled -Xklib-mpp with commonizer
2019-12-18 19:29:56 +03:00
Alexander Gorshenev
dc8240c24e
Expect/actual support in klibs under -Xklib-mpp
2019-12-18 19:29:56 +03:00
Roman Artemev
cad3cb1bbe
[KLIB] Fix references to type made from TypeParameter in KotlinMangler
...
- promote ABI version
2019-12-17 17:56:07 +03:00
Dmitriy Dolovov
18117ed1f3
[Commonizer] Serialize commonized metadata for KLIB writer
...
- introduce EmptyDescriptorTable
- wipe out unused BindingContext from KlibMetadataSerializer
2019-12-12 14:52:02 +03:00
Roman Artemev
ca0bff75cd
[KLIB] Keep order of constant properties depending on backend
...
- Fix K/N performance regression
2019-12-03 16:20:52 +03:00
Alexander Gorshenev
a923e0d130
Only allow version triples for klib metadata and ir versions
2019-11-30 18:37:38 +03:00
Alexander Gorshenev
b0f077ff4b
Plumbing KlibMetadataVersion and KlibIrVersion values to klib manifest
2019-11-30 18:37:38 +03:00
Dmitry Petrov
55e9e8afbf
IR ser/deser: IrSimpleFunction.isOperator
2019-11-29 13:53:05 +03:00
Georgy Bronnikov
1ed23d7c54
IR: reorganize IrProvider handling
...
Make DeclarationStubGenerator a subclass of IrProvider,
anticipating deserialization of IR structures for JVM_IR backend.
2019-11-27 20:02:27 +03:00
Roman Artemev
c4d993d14c
[KLIB] Fix top level property index. Include const properties as well.
2019-11-25 20:22:04 +03:00
Alexander Gorshenev
369d9bfdab
Dropped index from DeserializedSourceFile as it is no longer needed
2019-11-19 18:19:46 +03:00
Alexander Gorshenev
e7ef453d22
Got rid of klib file registry
2019-11-19 18:19:46 +03:00
Roman Artemev
52b24ead91
[IR] Add REINTERPRET_CAST operator in IrTypeOperatorCall
...
- fix BE
- fix Serializer
- implement builder
- make Ir a bit more type-correct
- support developer mode (lowering [dynamic]implicit cast meterialized as general cast)
- fix autoboxing lowering
2019-11-19 11:15:35 +03:00
Georgy Bronnikov
1647279a8c
IR: move UniqId to ir.tree module
2019-11-13 20:07:57 +03:00
Georgy Bronnikov
76016b1a3c
IR: move KotlnMangler to ir.tree module
2019-11-13 20:07:57 +03:00
Georgy Bronnikov
2f5442800b
Move WrappedDescriptors to ir.tree module
2019-11-13 20:07:57 +03:00
Roman Artemev
63110ab636
[IR] Remove deprecated correspondingProperty from IrField
2019-11-12 20:45:11 +03:00
Roman Artemev
ec1c2eb42d
[IR] Remove deprecated correspondingProperty from IrSimpleFunction
2019-11-12 20:45:11 +03:00
Roman Artemev
a343a57207
[IR] Refactor ir infrastructure
...
- Remove range-based uniq id indexes using to link built ins
- Limit KotlinType usages, replace them with corresponding IrType
2019-11-12 20:45:11 +03:00
Roman Artemev
ba373c67d7
[IR] Remove FunctionDescriptor from IrCall-like node's constructor interface
2019-11-12 20:45:11 +03:00
Sergey Bogolepov
608885d118
[Linker] Extend KotlinIrLinker infrastructure to support libraries that
...
doesn't contain IR. Also bump ABI version because of addition of `ir_provider` property
2019-11-11 15:55:36 +07:00
Alexander Gorshenev
21c436c64c
Klib metadata cached package fragment and package fragment provider
2019-11-08 14:14:57 +03:00