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
Dmitry Petrov
2662679579
KT-43399 properly erase extension receiver type in property$annotations
2020-11-23 13:58:52 +03:00
Dmitry Petrov
551d0c1b64
JVM_IR KT-43440 private-to-this default interface funs are private
2020-11-23 13:56:17 +03:00
Dmitry Petrov
e59c8e0a5c
JVM_IR KT-42137 bridges are not generated for fake overrides
2020-11-20 14:33:20 +03:00
Steven Schäfer
7bfe2c0bbc
JVM IR: Update test expectation for testSamAdapterAndInlineOnce
...
...and remove redundant bytecode text tests.
2020-11-19 19:46:49 +01:00
Ilmir Usmanov
7761d30365
Minor. Add test to check fallback
2020-11-19 17:39:33 +01:00
Ilmir Usmanov
0d79ed1077
Minor. Update test data
2020-11-19 17:39:32 +01:00
Ilmir Usmanov
2cd9016016
IC mangling: Replace compiler hack with configuration flag
2020-11-19 17:39:30 +01:00
Ilmir Usmanov
b33774e5f2
IC mangling: Use empty list as a separator in the new mangling scheme
2020-11-19 17:39:28 +01:00
Ilmir Usmanov
2829d37cf5
IC mangling: Use old mangling scheme for stdlib
...
This way, new stdlib can still be usable in 1.4.20
2020-11-19 17:39:27 +01:00
Ilmir Usmanov
488d4ab018
IC mangling: Use '_' instead of 'x' as a placeholder before hashing
2020-11-19 17:39:27 +01:00
Ilmir Usmanov
c62093f54c
IC mangling: Change mangling rules
...
1. Use 'x' for each parameter, which is not an inline class, every
possible clash is handled by signature rather than name. This change
makes more API changes binary-compatible. So, the changes are in line
with the vision of inline classes are value classes, like primitives.
2. Take return type into account when mangling a function if the return
type is inline class. Otherwise, boxing bridge will not be generated,
which leads to CCE at runtime.
2020-11-19 17:39:24 +01:00
Alexander Udalov
7b5544ebd3
Use -source/target 1.6 for Java sources in codegen tests
...
In cases when the test has the JVM_TARGET directive, use that one for
Java compilation as well.
Otherwise, for box tests, the corresponding test in `JvmTarget6OnJvm6`
(module `:compiler:tests-different-jdk`) will fail. However, it affects
all codegen tests, so fix a bunch of them which use Java 8+ features to
explicitly compile with JVM target 1.8. In particular, this obsoletes
the SKIP_JDK6 directive in those tests because "JVM_TARGET: 1.8" also
skips it for JDK 6.
The check for IS_SOURCE_6_STILL_SUPPORTED is needed in order to still be
able to run tests in the project while only having a single JDK > 11
installed, and having all of the env vars JDK_16, JDK_17, JDK_18
pointing to that JDK.
2020-11-18 18:43:43 +01:00
Kristoffer Andersen
5967e8295e
[IR] Align captured receiver variable naming with old BE
2020-11-18 15:18:10 +01:00
Dmitry Petrov
ca41f733b6
KT-41841 no delegate to private $default fun in multifile facade
2020-11-18 15:04:39 +03:00
Dmitry Petrov
a27c6b77cf
KT-43370 ACC_DEPRECATED on property accessors implemented by delegation
2020-11-17 18:16:37 +03:00
Alexander Udalov
a3830b2611
JVM IR: copy corresponding property+annotations for DefaultImpls methods
...
Instead of using methodSignatureMapper which was an obsolete hack to
make accessor names "getFoo" instead of "<get-foo>".
In particular, this keeps the `@Deprecated` annotation on the
corresponding property, which results in ACC_DEPRECATED in codegen.
#KT-43326 Fixed
2020-11-16 19:15:49 +01:00
Alexander Udalov
5212ae6bbd
JVM IR: keep property annotations for inline class replacements
...
In particular, `@Deprecated` is not lost anymore and accessors of
deprecated property are generated with ACC_DEPRECATED just as in the old
backend.
#KT-43327 Fixed
2020-11-16 19:15:49 +01:00
Dmitry Petrov
93f868fb96
KT-43196 member extension property can't be "primary" in inline class
2020-11-16 13:54:19 +03:00
Dmitry Petrov
5d76df6e1a
KT-43045 mangle function name for fake override with default impl
2020-11-13 16:15:29 +03:00
Dmitry Petrov
653b26174b
KT-43006 don't generate no-arg constructor with inline class parameters
2020-11-13 09:59:34 +03:00
Dmitry Petrov
47e2656ca9
JVM_IR keep track of original overrides at collection stubs generation
...
KT-43068
2020-11-11 18:35:41 +03:00
Georgy Bronnikov
d246005891
JVM_IR: fix unbound type parameters in AddContinuationLowering
2020-11-10 17:49:55 +03:00
Dmitry Petrov
e10d8e51b6
JVM_IR more precise superclass stub filtering
...
Filter out abstract members of superclasses when generating collection
stubs.
KT-43207
2020-11-10 16:41:45 +03:00