Commit Graph

23 Commits

Author SHA1 Message Date
Mikhail Zarechenskiy 0ab9b3639b Approximate types for lambda literals before serialization 2020-05-31 17:38:18 +03:00
Dmitry Petrov 5db6a0b563 New mangling rules require language version 1.4 (not compiler version)
Follow-up to a270ee094c
2020-05-29 15:15:54 +03:00
Dmitry Petrov 94509bdb4e KT-39228 Fix inliner when latest 1.4 compiler used with 1.3 stdlib
Since 1.4.0-dev-8774, we mangle functions returning inline class values,
including functions with return type 'kotlin.Result'. This causes
incompatibility when 1.4 compiler is used with 1.3 (or just some
pre-1.4.0-dev-8774) standard library.

Also, write "message from the future" on functions returning inline
class values indicating that they can be used since compiler version 1.4
(otherwise 1.3 compiler using 1.4 stdlib would fail to find some
@InlineOnly functions such as 'Result.success' and 'Result.failure').
2020-05-29 00:53:00 +03:00
Alexander Udalov 4520e02bae Support fun interfaces in kotlinx-metadata
#KT-37421 Fixed
2020-05-27 23:29:12 +02:00
Alexander Udalov 012ffa2993 Support new scheme of compilation of OptionalExpectation annotations
Instead of generating these annotation classes as package-private on
JVM, serialize their metadata to the .kotlin_module file, and load it
when compiling dependent multiplatform modules.

The problem with generating them as package-private was that
kotlin-stdlib for JVM would end up declaring symbols from other
platforms, which would include some annotations from package
kotlin.native. But using that package is discouraged by some tools
because it has a Java keyword in its name. In particular, jlink refused
to work with such artifact altogether (KT-21266).

 #KT-38652 Fixed
2020-05-12 19:28:57 +02:00
Alexander Udalov 795d6ab407 Migrate UseExperimental->OptIn in project sources 2020-03-10 12:07:14 +01:00
Alexander Udalov 55e29363dc Update test data for kotlinp
Inline functions require Kotlin compiler at least 1.3.50 if they were
generated by the compiler with API version >= 1.4. This is because since
API version 1.4, we've changed the generation scheme of parameter
nullability assertions and they now refer to methods from the standard
library which did not exist until 1.4. See
JvmSerializerExtension.writeInlineParameterNullCheckRequirement.
2020-01-17 20:40:35 +01:00
Dmitriy Novozhilov 76b3964e96 Update testdata according to change compiler version to 1.4 2020-01-17 10:33:50 +03:00
Alexander Udalov 01ddac58e1 Add language feature for changed name of property annotations method
#KT-31352 Fixed
2019-08-12 16:48:26 +02:00
Alexander Udalov ea0142da60 Use JVM name of getter in synthetic method for property annotations
#KT-31352 In Progress
2019-08-12 16:48:25 +02:00
Alexander Udalov fd00999771 Render contracts in kotlinp, fix minor bug in kotlinx-metadata-jvm 2019-05-24 14:42:25 +02:00
Alexander Udalov 9e2733915b Add module name JVM extensions to class/package in kotlinx-metadata-jvm
#KT-31308 Fixed
2019-05-24 14:42:25 +02:00
Mikhail Zarechenskiy ed2b9172da Support unsigned integers in kotlinx-metadata-jvm
#KT-25371 Fixed
2018-11-13 01:29:39 +03:00
Alexander Udalov 5fb1bbe3f3 Add bytecode listing test on private default setter
Also fix test data of the kotlinp test and remove the newly added test
case in the obsolete PropertyGenTest

 #KT-20344 Fixed
2018-10-18 12:13:22 +02:00
Alexander Udalov 47bde73ed5 Minor, fix testdata to use release coroutines 2018-08-30 17:34:32 +02:00
Alexander Udalov b55fc818d1 Support JvmName on annotation constructor parameters
#KT-25372 Fixed
2018-08-30 14:56:42 +03:00
Alexander Udalov 3345dc81fd Do not return field signature if there's none in the metadata
Otherwise this code behaves incorrectly on getter-only properties: it
returns a meaningless field signature whereas the property has no field.
It's hard to come up with an example of when this could matter in
compiler code, but it's very noticeable in kotlinx-metadata-jvm

 #KT-26188 Fixed
2018-08-16 15:05:19 +02:00
Alexander Udalov 3f32e1cce9 Do not serialize empty property signature to JVM metadata
This should have no effect on the correct code currently because all
properties have at least a getter, but may help in debugging problems
with serialized metadata for properties
2018-08-16 14:11:09 +02:00
Alexander Udalov c011bf61fe Support multiple version requirements on single element 2018-08-13 11:02:35 +02:00
Alexey Tsvetkov 63b4302cea Always generate kotlin_module
#KT-25133 fixed
    #KT-25051 fixed
2018-07-09 15:48:11 +03:00
Alexander Udalov fec2c14ea5 Support local delegated properties in kotlinx-metadata-jvm 2018-06-14 17:19:08 +02:00
Alexander Udalov bef759161f Support .kotlin_module files in kotlinx-metadata
#KT-23198
2018-05-16 17:16:21 +02:00
Alexander Udalov 4b284a4890 Add kotlinp, a tool to print Kotlin metadata in class/module files
At the moment, it's not published anywhere, but that may change soon

 #KT-23198
2018-05-16 17:16:21 +02:00