Commit Graph

58 Commits

Author SHA1 Message Date
Alexander Udalov 6e67e1e78d Replace appendln with appendLine in project 2020-06-11 13:01:30 +02:00
Vladimir Dolzhenko 3817f7f044 Fixed GenerateKotlinpTests compilation
Relates to #KTI-17
2020-06-09 09:03:35 +02:00
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 787e4503e5 Migrate -Xuse-experimental -> -Xopt-in in project sources 2020-03-10 12:07:15 +01: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 8a4510c21b Regenerate tests 2020-01-02 10:31:00 +01:00
Anton Bannykh d6fcde7316 JS_IR: fix typecheck corner case
Consider `fun <E : I> foo(a: Any?) = a as? E`, where I is an interface.
This check used to fail, because the `a == null` was missing, and
the `isInterface` stdlib method crashes if the first argument
is null. This change adds the null check.

Also this change prettifies the instance check in case of type parameter
left operand.
2019-12-15 17:36:24 +03:00
Nikolay Krasko 4ed64b0283 Regenerate tests with TargetBackend.ANY remove and using runTest with this 2019-10-23 12:49:48 +03:00
Ilya Chernikov 315a9d66a0 Refactor more tasks to lazy API 2019-08-21 20:20:08 +02: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
Nikolay Krasko 58f294a757 Fix kotlin compiler tests in 192 (KT-32193)
#KT-32193 Fixed
2019-07-26 12:38:40 +03:00
Vyacheslav Gerasimov db3b01d2d4 Build: Centralize compiler dist build logic in :kotlin-compiler project 2019-06-27 17:56:48 +03:00
Vyacheslav Gerasimov 52303d65ab Build: Fix test runtime for kotlinp tests 2019-06-14 18:06:04 +03:00
Alexander Udalov 5ee34503c0 Introduce new API for kotlinx-metadata-jvm
Kdocs are provided in a subsequent commit

 #KT-26602 Fixed
2019-06-13 18:00:33 +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 2a3786e3f8 Retain "is moved from interface companion" property flag in kotlinx-metadata-jvm
#KT-31338 Fixed
2019-05-24 14:42:25 +02:00
Alexander Udalov cfa3509860 Add loadJava/compiledKotlinWithStdlib tests to KotlinpCompilerTestDataTest 2019-05-24 14:42:25 +02:00
Alexander Udalov fe52f5fc7c Rename "desc" parameters in kotlinx-metadata-jvm to "signature" 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
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Vyacheslav Gerasimov 1551f39daa Update asm version to 7.0.1 everywhere 2019-04-22 21:52:01 +03:00
Dmitry Gridin 3bed360c98 Fix "Should be replaced with Kotlin function" warnings 2019-04-18 15:28:52 +07:00
Alexander Udalov 246346367c Minor, don't use experimental coroutines in kotlinp test 2019-02-07 21:23:00 +01:00
Mikhael Bogdanov e963c52c80 Update copyright in generated non-compiler tests 2019-01-02 13:34:03 +01:00
Mikhael Bogdanov c2837cf7d9 Switch buildSrc to ASM7 Jetbrains ASM 2018-12-20 12:55:08 +01:00
Mikhael Bogdanov 2072d7806f Switch kotlinp to ASM7 Jetbrains ASM 2018-12-20 12:55:07 +01: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 f63cf9d506 Use JvmName on kotlin.Metadata parameters to improve public API
#KT-26359 Fixed
2018-09-12 14:37:11 +03: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 8c8d0eefbb Relocate package org.jetbrains.kotlin in kotlinx-metadata-jvm
To prevent clashes in scenarios where it's used together with the Kotlin
compiler (e.g. in annotation processing)

 #KT-24945 Fixed
2018-06-28 14:39:53 +02:00
Vyacheslav Gerasimov 01db78d776 Build: Introduce Project extension properties for source sets 2018-06-22 21:42:30 +03:00
Alexander Udalov fec2c14ea5 Support local delegated properties in kotlinx-metadata-jvm 2018-06-14 17:19:08 +02:00
Vyacheslav Gerasimov 992a31af88 Build: introduce javaPluginConvention extension on project
`ExtensionAware.the<T>()` introduced in gradle 4.7 made existing calls `the<JavaPluginConvention>()` invalid (on wrong receiver)
2018-06-13 19:43:03 +03:00
Ilya Gorbunov f8217ef28f Extract subclasses of JvmMemberSignature sealed class to top-level
Use more specific subtypes of sealed class in visitors.
2018-06-01 06:43:48 +03:00
Ilya Gorbunov 2f58539200 Refactor: allow to distinguish whether JvmMemberSignature is for field or for method
Introduce a method to create org.jetbrains.kotlin.load.kotlin.MemberSignature directly from JvmMemberSignature.
Create JvmFunctionSignature from JvmMemberSignature.
2018-06-01 06:43:48 +03:00
Ilya Gorbunov 36c658fd8b Introduce JvmMemberSignature to represent name and desc of jvm methods and fields
Return member name and desc in a class in order not to parse that information
from concatenated string when required.
2018-06-01 06:43:48 +03:00
Ilya Gorbunov eee9f8ab3f Include kotlinp tests into distTest and kotlinx-metadata-jvm tests into coreLibsTest
kotlinp tests: do not fail due to different directory separators on Windows
2018-06-01 06:43:48 +03:00