Jinseong Jeon
3bca6ae893
FIR: allow lower bound of flexible type when finding contributed invoke
2020-12-21 18:01:25 +03:00
Jinseong Jeon
d5a6991b2d
FIR: extend SAM conversion to subtype of functional type
2020-12-21 18:01:22 +03:00
Jinseong Jeon
dea01125d6
FIR deserializer: keep SourceElement for more precise Fir2IrLazyClass's source
2020-12-18 12:17:23 +03:00
Jinseong Jeon
4608431682
FIR2IR: correct base symbols of fake overrides for delegated member
...
#KT-43984 Fixed
2020-12-18 11:21:02 +03:00
Shagen Ogandzhanian
4f96f9d6a1
[JS IR] Initialize enum fields before accessing them in companion object
...
see https://youtrack.jetbrains.com/issue/KT-43901
2020-12-18 01:54:59 +01:00
Dmitry Petrov
8999fd88b1
JVM_IR KT-43401 KT-43518 fix ACC_STRICT and ACC_SYNCHRONIZED flags
2020-12-16 14:10:36 +03:00
Dmitry Petrov
7ed3860c70
JVM_IR KT-43043 fix nullability annotations for inline class members
2020-12-16 13:43:29 +03:00
Jinseong Jeon
6239301f4e
FIR: no constraint for coerced-to-Unit last expression of lambda
2020-12-15 17:52:49 +03:00
Dmitry Petrov
b0f6461fa9
JVM_IR KT-42020 special IdSignature for some fake override members
2020-12-15 12:56:45 +03:00
Jinseong Jeon
12cfba9ca9
FIR BB: remove stale test ignoring tags in old language versions
...
Since bf06d381 (move old Java nullability assertion tests...),
these tests aren't used by (Fir|Ir)BlackBoxCodegenTest anymore.
2020-12-15 11:52:50 +03:00
Jinseong Jeon
f7ade2b0b8
FIR2IR: introduce implicit casts for extension receivers
2020-12-15 11:52:49 +03:00
Kristoffer Andersen
8a5f260d04
[IR] Align debugging of suspend lambdas with old BE
...
The existing backend restores LVs and parameters from the suspend lambda
fields used for spilling between suspension points, hence they are
visible in the debugger as local variables, plain and simple.
This PR introduces the same pattern to the IR backend, to bring the
debugging experience in line with the existing backend.
Both backends are still at the mercy of the liveness analysis
performed in the coroutine transformer where a liveness analysis
minimizes live ranges of entries in the LVT. E.g. an unused parameter
will be dropped entirely.
Adjusted existing test expectations accounting for the differences in
LV behavior.
2020-12-12 11:48:47 +01:00
Dmitry Petrov
b7330a9e14
JVM_IR KT-43877 fix generic signatures for SAM-converted lambdas
2020-12-11 20:26:29 +03:00
Ilmir Usmanov
2b0a99b7b0
IC Mangling: Use correct java field type if the type is inline class
...
in old JVM BE.
#KT-26445
2020-12-11 17:51:37 +01:00
Ilmir Usmanov
69bb65496f
IC Mangling: Change test since we pass boxed inline class to java method
...
#KT-28214
2020-12-11 17:51:34 +01:00
Ilmir Usmanov
0cab69a7a0
IC Mangling: Do not mangle functions with inline classes from Java
...
in old JVM BE. Map types to boxed variants, when mapping signatures.
#KT-26445
2020-12-11 17:51:30 +01:00
Mikhael Bogdanov
b143cb9ae5
Disable new test on WASM
2020-12-11 06:36:42 +01:00
Mads Ager
c922484758
[JVM_IR] Use direct field access to backing fields on current class.
...
The current backend uses direct field access to the backing field
instead of calling the companion object accessor, which calls
an accessibility bridge, which then gets the field for code such as:
```
class A {
companion object {
val s: String = "OK"
}
// f uses direct access to the A.s backing field.
fun f() = s
}
```
This change does the same for the IR backend.
2020-12-11 06:24:55 +01:00
Jinseong Jeon
8f2ad57f7a
FIR: pass elvis expected type to lhs/rhs
2020-12-10 20:52:49 +03:00
pyos
41f56729f9
FIR: serialize correct fqnames for local classes
2020-12-10 20:52:48 +03:00
pyos
12f936f6b7
FIR2IR: do not approximate reified type arguments to super class
2020-12-10 20:52:46 +03:00
pyos
5efe774dba
FIR: remap Java meta-annotations to Kotlin equivalents
...
This is a direct port of JavaAnnotationMapper from the old frontend.
2020-12-10 20:52:43 +03:00
Mads Ager
fadedc84db
[JVM_IR] Refactor and add bytecode text tests for compose-like code.
...
Tests that the default argument mask is not in the local variable
table.
2020-12-10 17:22:18 +01:00
Mads Ager
83588e9f22
[JVM_IR] Add tests of Compose-like default argument handling.
2020-12-10 17:22:18 +01:00
Mads Ager
a7efa5c98b
[IR] Fix remapping of arguments in LocalDeclarationsLowering.
...
It only remapped arguments for IrGetValue and not for IrSetValue.
This is hitting Compose which has non-standard default argument
handling.
2020-12-10 17:22:18 +01:00
Ilya Goncharov
167e60b9fb
[JS IR] Assert createdOn equals 0 for properties initialization fun for file
2020-12-10 18:07:50 +03:00
Dmitry Petrov
5be28520fc
JVM_IR KT-43851 preserve static initialization order in const val read
2020-12-10 17:55:13 +03:00
LepilkinaElena
c8c83c04c0
[IR] Fix saving function calls during inlining const properties in PropertyAccessorInlineLowering ( #3971 )
2020-12-10 12:24:23 +03:00
Ilmir Usmanov
dccfb33bcc
JVM_IR: Unbox argument of type kotlin.Result
...
if the argument has different type in parent: either generic or Any.
#KT-41163 Fixed
#KT-43536 Fixed
2020-12-10 08:27:32 +01:00
Dmitriy Novozhilov
b416c669b0
[TEST] Update testdata due to dropped COMMON_COROUTINE_TEST directive
2020-12-10 01:31:04 +03:00
Dmitriy Novozhilov
b6bd7c48f4
[FE] Rename FreedomForSealedClasses feature with more meaningful name
2020-12-09 22:54:38 +03:00
Dmitriy Novozhilov
e76acc8ee0
[FE] Collect inheritors of sealed classes from new places in computeSealedSubclasses
...
#KT-13495
2020-12-09 22:54:24 +03:00
Dmitriy Novozhilov
f5f1984a60
[FE] Allow declare sealed class inheritors in different files in one module
...
#KT-13495
2020-12-09 22:54:21 +03:00
Dmitry Petrov
313dfaf48c
JVM_IR KT-43812 erase generic arguments of SAM wrapper supertype
2020-12-09 20:06:02 +03:00
Jinseong Jeon
2dfba10d84
FIR: extend suspend conversion to intersection type
2020-12-09 19:53:25 +03:00
Denis.Zharkov
920ed558ee
Add some tests on corner cases for @JvmRecord
2020-12-09 16:47:25 +03:00
Denis.Zharkov
46c3979acd
Separate JVM target option from javac's --enable-preview analogue
2020-12-09 16:47:24 +03:00
Denis.Zharkov
6e4f84dddf
Add @SinceKotlin("1.5") on JvmRecord annotation
2020-12-09 16:47:23 +03:00
Denis.Zharkov
695d0dbfbb
Check JvmRecordSupport language feature before generating synthetic properties
2020-12-09 16:47:23 +03:00
Denis.Zharkov
c8851c4f75
Prohibit @JvmRecord for non-data classes
...
^KT-43677 In Progress
2020-12-09 16:47:22 +03:00
Denis.Zharkov
cc0b584445
Adapt test infrastructure to the latest changes
...
^KT-43677 In Progress
2020-12-09 16:47:22 +03:00
Denis.Zharkov
1b575d7903
Add initial support for @JvmRecord in backend
...
- Write relevant class files attributes
- Emit property accessors with records-convention: propertyName -> propertyName()
^KT-43677 In Progress
2020-12-09 16:47:21 +03:00
Denis.Zharkov
059e2aab7a
Make BlackBox tests for Java 9 generated
2020-12-09 16:29:03 +03:00
Denis.Zharkov
5d05419016
Add simple JDK15 BlackBox test
...
^KT-43677 In Progress
2020-12-09 16:29:03 +03:00
Mikhael Bogdanov
1cfb81455c
Generate correct names for companion @JvmStatic accessors in annotation class
...
#KT-31389 Fixed
2020-12-09 13:26:14 +01:00
Alexander Udalov
3e0efeef31
JVM IR: add test for complex generic diamond hierarchy
...
This is a test for KT-43832, which is fixed in the previous commit.
2020-12-09 10:52:18 +01:00
Dmitry Petrov
69c88a8a0a
PSI2IR KT-41284 use getters for open data class property values
...
'allopen' compiler plug-in can make data classes and their members open,
which is a compilation error in usual case, but makes sense for Spring
and other frameworks that generate proxy-classes.
2020-12-09 10:29:09 +03:00
Mikhael Bogdanov
c5015c9294
Don't recognize IrVariable as declaration scope in inlining
...
#KT-42815 Fixed
2020-12-08 06:16:12 +01:00
Ilmir Usmanov
7f51f57998
Generate correct $default method for actual suspend function
...
In order to do this, we need to get initial expect suspend function
before generating default value parameters checks.
#KT-43587 Fixed
2020-12-08 04:36:38 +01:00
Ilmir Usmanov
0dc5f3ac00
IC: call JvmDefault method of inline class using boxed receiver
...
#KT-43698 Fixed
2020-12-08 04:33:36 +01:00