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
Roman Artemev
1bced5d2a2
[KLIB IC] Fix file index allocation, make them stable between recompilations
2019-11-08 14:14:57 +03:00
Dmitry Petrov
f79909d724
IR serialization: isFakeOverride in proto
...
NB It's not clear yet if we actually want to serialize fake overrides
or generate and resolve them on deserialization.
2019-11-01 14:55:11 +03:00
Dmitry Petrov
5c390d9426
IR serialization: IrField.isFakeOverride
2019-11-01 14:55:11 +03:00
Dmitry Petrov
e9337ec8f2
IR serialization: IrProperty.isFakeOverride
2019-11-01 14:55:10 +03:00
Dmitry Petrov
d23f13e3dc
IR serialization: IrSimpleFunction.isFakeOverride
2019-11-01 14:55:09 +03:00
Ilya Matveev
955300dd34
Deserializer: Fix initialization of private top-levels
...
Consider a file with only private top-level properties compiled into
a klib. If this klib is deserialized with deserializationStrategy.ALL
(e.g. if this library if passed using the -Xinclude flag),
initializers of these properties will not be generated in a final
binary.
This patch fixes this error by unconditionally adding IrFiles into
deserialization queue if deserializationStrategy.ALL is specified.
Issue #KT-34722 fixed
2019-11-01 12:02:59 +03:00
Ilya Matveev
7c4033f0bf
Deserializer: Fix initialization order
...
Top-level initializers must be deserialized in the same order they
where in the original source file. Before this patch this rule might
be violated. Consider the following case:
// lib1.kt
val a = 5
val b = a * 5
// lib2.kt
fun foo() = println(b)
Compile both files into libraries and then link an application
against them. During deserialization of lib2 'b' will be added
to the deserialization queue of lib1. After that we will add 'a'
to this queue too. Thus 'b' and 'a' will be in a wrong order
in this queue resulting in a wrong order of corresponding
top-level initializers in a final executable.
This patch fixes this issue by adding all top-level initializers
to a deserialization queue before all other declarations.
2019-10-31 14:51:56 +03:00
Alexander Gorshenev
597e760fab
Broght back a condition lost during a refactoring
2019-10-21 17:41:56 +03:00
Roman Artemev
2cde7f2402
[KLIB] Fix explicitlyExported mode
...
- Refactor deserialization pipeline
- Fix K/N test
2019-10-21 17:41:56 +03:00
Roman Artemev
43e855150c
[KLIB] Correctly restore top level property order during deserialization - Add test - Fix KT-34273
2019-10-21 17:41:56 +03:00
Dmitry Petrov
69a9559eac
IR serialization: isExpect in proto and ser/deser
2019-10-21 13:04:59 +03:00
Dmitry Petrov
922b1e576d
IR serialization: isExpect (TODO actual value in proto)
2019-10-21 13:04:59 +03:00
Alexander Udalov
65c09a5e57
Minor, use experimental unsigned types in CityHash
...
This fixes 233 experimental usage API warnings
2019-10-16 15:00:31 +02:00
Anton Bannykh
82e8bcfca9
Proto: update the workaround which reduces memory allocations
2019-10-11 13:58:22 +03:00
Vitaliy.Tikhonov
62885ba497
[JS SCRIPTING] create compilers for scripting
2019-10-10 12:52:06 +03:00
Roman Artemev
d5176cbf5d
[IR SERIALIZATION] Get rid of UniqId proto message
...
- encode locality flag in major bit of uniqid (1 - global, 0 - local)
2019-10-09 13:23:18 +03:00
Roman Artemev
fcae5873d0
[IR SERIALIZATION] Get rid of Annotations message
2019-10-09 13:23:18 +03:00
Roman Artemev
aeafaf78f1
[IR SERIALIZATION] Replace DescriptorReference boolean fields with single flag in proto
2019-10-09 13:23:13 +03:00
Roman Artemev
105fc4b0ca
[IR SERIALIZATION] Get rid of FqName
2019-10-09 13:06:01 +03:00
Roman Artemev
9fa89bf7e2
[IR SERIALIZATION] Get rid of IrDataIndex
2019-10-09 13:06:01 +03:00
Alexander Gorshenev
e5dbec4523
Commonized FileRegistry with SourceFileMap for klib metadata
2019-10-08 16:56:29 +03:00
Alexander Gorshenev
c227c13799
Commonizing klib metadata between native and js
2019-10-01 17:38:57 +03:00
Roman Artemev
e5a1040dbd
[KLIB] Fix references to private top-level typealias via type abbreviation
2019-09-10 19:59:01 +03:00
Alexander Udalov
bf5ca2ed84
Cleanup compiler warnings in IR-related modules
2019-09-03 19:32:57 +02:00