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
Denis.Zharkov
f4a25066a8
Fix freshly added CLI tests for windows agents
2020-12-10 16:15:29 +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
Ilmir Usmanov
775d610045
Value classes: Forbid any identity equality check on value class
...
#KT-31130 Fixed
2020-12-10 08:24:48 +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
57a081c399
[FE] Prohibit inheritance of sealed classes in different module
...
KT-20423
2020-12-09 22:54:34 +03:00
Dmitriy Novozhilov
f8d6f79c17
[FE] Temporary disable exhaustiveness checker for java sealed classes
...
KT-43551
KT-41215
2020-12-09 22:54:33 +03:00
Dmitriy Novozhilov
1c9f9130e6
[FE] Prohibit implementing java sealed classes
2020-12-09 22:54:32 +03:00
Dmitriy Novozhilov
c0a1aecf9b
[FE] Add test for compiling against library with kotlin sealed classes and interfaces
...
#KT-20423
#KT-13495
2020-12-09 22:54:30 +03:00
Dmitriy Novozhilov
7897bb6adb
[FE] Support sealed classes and interfaces from java
...
KT-43551
KT-41215
2020-12-09 22:54:29 +03:00
Dmitriy Novozhilov
8e9e34350f
[FE] Properly support sealed interfaces in exhaustiveness checker
...
#KT-20423
2020-12-09 22:54:27 +03:00
Dmitriy Novozhilov
9609954560
[FE] Allow using sealed modifier on interface and compute sealed modality for them
...
#KT-20423
2020-12-09 22:54:26 +03:00
Dmitriy Novozhilov
d605c7e491
[FE] Prohibit inheritors of sealed classes which are declared in different package
...
#KT-13495
2020-12-09 22:54:25 +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
70c61be1ef
[FE] Allow declare sealed class inheritors as inner or nested classes
...
#KT-13495
2020-12-09 22:54:22 +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
Mikhail Glukhikh
d6e144c80e
[FIR] Extend callableNames known for JvmMappedScope
2020-12-09 19:53:23 +03:00
Mikhail Glukhikh
94014ba3eb
Fir2IrLazyClass: don't generate non-f/o properties from superclass
2020-12-09 19:53:22 +03:00
Mikhail Glukhikh
9b0ada2b0f
[FIR2IR] Generate f/o overridden symbol with FakeOverrideGenerator
...
#KT-43669 Fixed
2020-12-09 19:53:21 +03:00
Denis.Zharkov
92b402759b
Report incorrect JVM target only when @JvmRecord is actually used
2020-12-09 16:47:25 +03:00
Denis.Zharkov
920ed558ee
Add some tests on corner cases for @JvmRecord
2020-12-09 16:47:25 +03:00
Denis.Zharkov
3aa55620d0
Prohibit explicit j.l.Record supertype even 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
3abd8b1ab2
Adapt CliTests for api requirement of @JvmRecord
2020-12-09 16:47:24 +03:00
Denis.Zharkov
dc1a1c5821
Support cross-module usages of @JvmRecord classes
...
The problem is that JvmRecord has SOURCE retention
Probably, increasing its retention might be a more reliable solution
(or in some other way serializing that the class is a record)
Just checking supertypes seems like a reasonable approximation:
only records kotlin are allowed to extend j.l.Record.
But the relevant diagnostic has been added only since 1.4.30,
so potentially there could have been exist a non-record class with
such supertype compiled by 1.4.20, but this case seems to be ill-formed
and marginal anyway.
For Java classes, it's irrelevant since they don't have member properties
(only synthetic extensions)
^KT-43677 In Progress
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
ddbd62054f
Prohibit extending java.lang.Record from non-@JvmRecord classes
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
f64980a597
Add check for bytecode target when @JvmRecord is used
...
^KT-43677 In Progress
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