Ilmir Usmanov
3ee62cb1b2
JVM IR: Do not generate private suspend functions as synthetic package-private
...
#KT-26592
2021-02-23 18:49:06 +01:00
Ilmir Usmanov
ec569a4c89
Minor. Suppress errors in tests
2021-02-16 20:59:25 +01:00
Dmitry Petrov
b262d09a81
JVM_IR KT-44627 fix bridge signature for parameter with primitive bound
2021-02-15 17:19:33 +03:00
Dmitry Petrov
6ba57abb8f
JVM don't use indy by default for SAM conversions (wait for KT-44844)
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:32 +03:00
Dmitry Petrov
3438d19c22
JVM_IR indy: use 'CLASS' mode in SAM bytecode listing tests
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:31 +03:00
Dmitry Petrov
7564c9bb8c
JVM SamWrapperClassesAreSynthetic language feature
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:31 +03:00
Dmitry Petrov
052f6929c9
JVM_IR indy SAM conversions: update tests
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:30 +03:00
Dmitry Petrov
3ebeca5852
JVM_IR: use indy SAM conversions in jvmTarget 1.8+, fix bridges
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:30 +03:00
Dmitry Petrov
d0f26abd18
JVM_IR KT-44798 don't generate multiple stubs with same signature
2021-02-10 09:09:28 +03:00
Ilya Gorbunov
87e130e77a
Remove obsolete diagnostics suppression
...
The diagnostic NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS is now
obsolete because internal constructors of inline classes became allowed.
2021-02-03 18:23:53 +03:00
Mads Ager
6a959fefd0
[JVM_IR] Fix accessibility bridges for static protected fields.
...
Super-qualifiers have to be taken into account. Otherwise, too
few accessibility bridges will be generated which can lead to
binary compatibility issues.
2021-02-02 12:46:08 -08:00
Dmitry Petrov
4ec369ac5b
JVM_IR fix special bridge generation for inline classes
2021-02-01 17:57:58 +03:00
Dmitry Petrov
708e6914bd
JVM JVM_IR hide sealed class constructors
2021-01-25 17:29:38 +03:00
Mads Ager
ef36b81c67
[JVM_IR] Reduce the amount of super suffixes on accesibility bridges.
...
The super suffix was used for any static field/method that needed
an accessor. We should only use it when that field or method is
inherited.
2021-01-22 13:20:25 +01:00
Dmitry Petrov
0c463d3260
KT-44378 don't generate no-arg constructor for sealed classes
2021-01-15 22:31:01 +03:00
Alexander Udalov
e0363788f4
Remove some remaining tests on old coroutines
2021-01-13 19:16:31 +01:00
Iaroslav Postovalov
77180a5b13
[JVM IR] Make file classes with all private members package-private
2021-01-12 12:47:59 +01:00
Kristoffer Andersen
43b61a618d
[IR+Tests] Improve Local Function Debugging Experience
...
This change improves the debugging experience around local functions
on the IR backend. The changes include moving old
checkLocalVariablesTable (cLVT) tests to the new stepping/local variable
infrastructure in order to refine the tests and further define the
behavior of the two JVM backends, and their differences.
The primary ported test case is cLVT/localFun.kt that documents the
discrepancy in implementation strategy for local functions on the two
backends. The old backend implements local functions as lambdas
assigned to a local variable while the IR backend lifts them out as
static funtions on the surrounding class. The discrepancies and their
consequences are documented in bytecodeListing, idea-stepping,
localVariableTable and debugStepping tests.
The only _code change_ is disabling the captured variable name
mangling for captured variables on the IR backend. Captured variables
are passed as arguments to the static function, so in the debugger,
they really just are local variables. For them to show properly in the
debugger and be detectable by evaluate expression, they simply need no
mangling.
Finally, this change cleans 3 redundant cLVT tests, copyFunction.kt
and destructuringInlineLambda.kt and destructuringInFor.kt, that are
all covered in the new suite. The stepping behavior needs to be made
precise around for loops, but that is an entirely seperate issue.
2021-01-11 18:21:23 +01:00
Dmitry Petrov
b02a9846d0
IR KT-44233 support flexible nullability in IrTypeSystemContext
...
^KT-44233 Fixed Target versions 1.5-M1
2021-01-11 17:33:50 +03:00
Steven Schäfer
98a9e142e8
JVM IR: Fix visibility of protected/private functions with reified types
2021-01-08 16:35:31 +01:00
Jinseong Jeon
7cc06489dd
IR: move enum value array initialization out of <clinit>
...
#KT-44192 Fixed
2021-01-07 23:00:37 +01:00
Ilmir Usmanov
9c67d8f89e
IC Mangling: Correctly mangle functions with generic return type
...
if the type's parent is inline class.
#KT-43050 Fixed
#KT-26130 Fixed
#KT-32384 Fixed
2020-12-24 14:29:48 +01:00
Ilmir Usmanov
8bfcef415e
Do not generate variables for non-generated fields
...
Use attributes instead of classes.
#KT-43048 Fixed
2020-12-23 19:45:15 +01:00
Dmitry Petrov
c9d330207b
JVM_IR no nullability annotations on SAM wrapper constructor parameters
2020-12-22 16:09:46 +03:00
Dmitry Petrov
0dff583070
JVM KT-36984 SAM wrappers are anonymous inner classes
2020-12-22 16:09:45 +03:00
Dmitry Petrov
57dd9fc87a
JVM_IR KT-36984 SAM wrappers are anonymous inner classes
2020-12-22 16:09:45 +03:00
Dmitry Petrov
443cd0fc2c
Tests for issues fixed in JVM_IR
2020-12-22 16:07:06 +03: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
Dmitry Petrov
b7330a9e14
JVM_IR KT-43877 fix generic signatures for SAM-converted lambdas
2020-12-11 20:26:29 +03:00
Dmitriy Novozhilov
b416c669b0
[TEST] Update testdata due to dropped COMMON_COROUTINE_TEST directive
2020-12-10 01:31:04 +03:00
Dmitry Petrov
313dfaf48c
JVM_IR KT-43812 erase generic arguments of SAM wrapper supertype
2020-12-09 20:06:02 +03:00
Denis.Zharkov
920ed558ee
Add some tests on corner cases for @JvmRecord
2020-12-09 16:47:25 +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
Dmitry Petrov
3dbe02b7fe
JVM_IR KT-43109 generate internal bridge for custom internal 'toArray'
...
Also add some tests for internal collection stubs.
2020-12-04 18:57:10 +03:00
Ilmir Usmanov
516fce37db
Value classes: Allow unsigned arrays in annotations
...
including varargs, apparently.
So, we allow unsigned types and unsigned arrays in annotations,
but disallow user-defined inline classes.
#KT-23816 Fixed
2020-12-03 17:22:08 +01:00
Alexander Udalov
6b649d02d3
JVM IR: fix visibility/modality of $suspendImpl methods
...
#KT-43614 Fixed
2020-12-02 20:53:55 +01:00
Alexander Udalov
8ce2e4654b
JVM IR: allow custom toArray to have any array type
...
To avoid breaking Java source compatibility. This problem can be fixed
later once JVM IR is stabilized.
#KT-43111 Fixed
2020-12-02 20:53:47 +01:00
Dmitry Petrov
e6a3e38c4d
JVM_IR no static inline class members for Kotlin JvmDefault methods
...
KT-43698 KT-43051
2020-12-02 20:04:13 +03:00
Alexander Udalov
a917ebd11e
JVM IR: use origin to detect property/typealias $annotations methods
...
Now that DEFAULT_IMPLS origins for methods do not exist after previous
commits, the name heuristic is no longer needed.
2020-12-02 15:54:15 +01:00
Alexander Udalov
c7c793c724
JVM IR: do not use origin DEFAULT_IMPLS_BRIDGE(_TO_SYNTHETIC)
...
Instead, check that origin of the parent class is DEFAULT_IMPLS. Also,
add a separate origin SUPER_INTERFACE_METHOD_BRIDGE for interface
methods with bodies that are copied to classes.
2020-12-02 15:54:14 +01:00
Ilmir Usmanov
129de76288
Value classes: Generate @JvmInline annotation for inline classes
...
but not for value classes.
Since inline classes and value classes share the same flag, we use
presence of the annotation to distinguish them.
2020-12-01 23:45:47 +01:00
Dmitry Petrov
1412ee96f8
JVM_IR KT-43524 static wrappers for deprecated accessors are deprecated
2020-12-01 19:43:52 +03:00
Dmitry Petrov
e96fc74ffa
JVM_IR KT-43519 no delegates for external funs in multifile facades
...
Also add ABI tests for @JvmStatic/JvmOverloads + 'external'.
2020-12-01 19:43:52 +03:00
Dmitry Petrov
2b4564059e
JVM_IR KT-43459 fix $annotations method receiver type
2020-12-01 19:43:51 +03:00
Dmitry Petrov
85b5948931
JVM_IR KT-43051 no static inline class members for default Java methods
2020-12-01 19:43:51 +03:00
Dmitry Petrov
a157b58c61
JVM_IR KT-43610 keep track of "special bridges" for interface funs
2020-11-30 15:49:01 +03:00
Ilmir Usmanov
78e607c6b0
Value classes: Support @JvmName annotation on functions with inline
...
classes in signatures, but not on methods of inline classes.
2020-11-28 00:34:04 +01:00
Dmitry Petrov
498047e64e
KT-43562 don't remap static inline class funs as special builtins
2020-11-25 17:31:46 +03:00
Dmitry Petrov
3a166f3592
KT-43525 forbid @JvmOverloads on mangled funs and hidden constructors
2020-11-24 16:06:20 +03:00