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
Denis.Zharkov
5e5b236ef8
Extract record related parts into smaller bunch files for 201
2020-12-22 14:58:05 +03:00
Jinseong Jeon
e05d26b9b0
FIR2IR: cache type parameters in delegated property
...
#KT-44030 Fixed
2020-12-22 12:05:31 +03:00
Jinseong Jeon
78fa8814c4
FIR: unwrap f/overrides when determining mutability of property reference
...
#KT-44010 Fixed
2020-12-22 12:04:56 +03:00
Nikolay Krasko
0918e73dff
Move wasm tests to JS tests configuration (KTI-419)
2020-12-21 19:59:13 +03:00
Dmitriy Novozhilov
554fa358e8
[FIR] Fix calculating offsets of light tree source elements for local declarations
2020-12-21 18:34:58 +03:00
Dmitriy Novozhilov
298e27bdac
[Test] Migrate AbstractExtendedFirDiagnosticsTest to new infrastructure
2020-12-21 18:34:57 +03:00
Dmitriy Novozhilov
a276d05917
[Test] Generate FIR tests with new infrastructure in :analysis-tests module
2020-12-21 18:34:56 +03:00
Dmitriy Novozhilov
537e4f0bb4
[Test] Move existing fir tests on old infrastructure to :legacy-fir-tests module
2020-12-21 18:34:55 +03:00
Dmitriy Novozhilov
1f258c28fc
[Test] Extract main compiler test generator to separate project
...
This is needed because now we have different tests modules with different
test frameworks (JUnit3 and JUnit5) which has no dependencies between
each other. So for keeping all test generation config in one place
we need module which may rely on all independent test modules
2020-12-21 18:34:54 +03:00
Jinseong Jeon
d753d21dee
FIR2IR: don't add SAM conversion for explicit subtype cases
2020-12-21 18:01:27 +03:00
Jinseong Jeon
7df289746c
FIR: fix invoke lookup for SAM resolution
2020-12-21 18:01:26 +03:00
Jinseong Jeon
3bca6ae893
FIR: allow lower bound of flexible type when finding contributed invoke
2020-12-21 18:01:25 +03:00
Jinseong Jeon
4a24f0fab3
FIR2IR: use FirSamResolverImpl to get function type for possible SAM type
2020-12-21 18:01:23 +03:00
Jinseong Jeon
d5a6991b2d
FIR: extend SAM conversion to subtype of functional type
2020-12-21 18:01:22 +03:00
Mikhail Glukhikh
c6a40b2322
Optimize/simplify FirJvmTypeMapper.defaultType
2020-12-21 17:35:51 +03:00
Mikhail Glukhikh
3ab5b57594
Optimize/simplify FirJvmTypeMapper.representativeUpperBound
2020-12-21 17:35:51 +03:00
Mikhail Glukhikh
42b590d07c
Optimize/simplify FirSealedClassConstructorCallChecker
2020-12-21 17:35:51 +03:00
Mikhail Glukhikh
c94c71cc50
Optimize/simplify ConeClassLikeLookupTag.getNestedClassifierScope
2020-12-21 17:35:50 +03:00
Mikhail Glukhikh
7add186616
Optimize/simplify FirClass<*>.findNonInterfaceSupertype
2020-12-21 17:35:50 +03:00
Andrei Klunnyi
3e8016ed25
KTIJ-717 [Java side inspection]: "implementation of Kotlin sealed"
2020-12-21 11:44:16 +01:00
Ilya Chernikov
65cf941b9b
Remove assertion about dispatch receiver in scripts
...
#KT-42530 fixed
2020-12-21 09:43:44 +01:00
Ilya Chernikov
0671fd9aaa
Support destructuring declarations in scratch files
...
#KT-25038 fixed
2020-12-21 09:43:44 +01:00
Ilya Chernikov
9ee17cd610
Do not throw assertion on recursion in typealias declaration,
...
return empty list of descriptors instead, allowing for proper error
reporting later.
#KT-18344 fixed
2020-12-21 09:43:43 +01:00
Ilya Chernikov
02c617468f
Add support for a callback on recursion for memoized functions
2020-12-21 09:43:43 +01:00
Alexander Udalov
eef06cded3
JVM IR: output stable ABI binaries by default
...
#KT-43592 Fixed
2020-12-20 23:14:54 +01:00
Alexander Udalov
e0593ff70f
Minor, extract CompilerConfiguration.messageCollector to extension property
2020-12-20 23:14:49 +01:00
Alexander Udalov
691b20a685
JVM IR, FIR: set IR configuration key to true if FIR is enabled
2020-12-20 23:14:41 +01:00
Alexander Udalov
06805ffbaa
Change CLI flags for controlling diagnostics for ABI of FIR and JVM IR
...
- Use a more generic `-Xallow-unstable-dependencies` instead of
`-Xallow-jvm-ir-dependencies`
- Change `-Xir-binary-with-stable-abi` to `-Xabi-stability=stable`, with
an additional option to specify `unstable` after a subsequent commit
where JVM IR becomes stable by default
#KT-43592
2020-12-20 23:14:32 +01:00
Alexander Udalov
3f517d7e8d
Add new metadata flag for class files compiled with FIR
...
Report a separate error when class files compiled with FIR are in
dependencies, in addition to the one for class files compiled with FE
1.0 + JVM IR.
#KT-43592
2020-12-20 23:14:30 +01:00
Alexander Udalov
cbd90c3af5
Refactor boolean IR ABI stability flag to enum
...
Introduce an enum DeserializedContainerAbiStability with two values.
This is needed in order to support another reason for ABI instability in
a subsequent commit, namely "unstable because compiled by FIR".
#KT-43592
2020-12-20 23:14:12 +01:00
Alexander Udalov
b7d32a8754
Minor, invert analysis flag that allows unstable dependencies
2020-12-20 23:13:50 +01:00
Alexander Udalov
7d37030095
JVM IR, FIR: add JvmBackendExtension instead of MetadataSerializerFactory
...
This might be a better place for future behavior that should be
abstracted between FE 1.0 and FIR, in JVM IR.
2020-12-20 23:13:48 +01:00
Leonid Startsev
a5ddb1fdf1
Update error about unsupported inline classes
...
Remove unused declarations
2020-12-19 20:34:45 +03:00
Leonid Startsev
272273baed
Support serializable inline classes in IR plugin
...
as well as standard unsigned types.
2020-12-19 20:34:45 +03:00
Leonid Startsev
631a72d14a
Support old serialization runtime versions
...
(where exception signatures weren't changed)
after f671c27f27
2020-12-19 20:34:11 +03:00
Leonid Startsev
f671c27f27
Adapt serialization exceptions constructor calls in legacy JS
...
to signature change
(see https://github.com/Kotlin/kotlinx.serialization/pull/1054
and commit eea4ff33a0 )
2020-12-19 19:18:15 +03:00
Leonid Startsev
18e7a1485c
Additional fix for Compose:
...
directly search for fields in IR class w/o using the symbol table.
Because Compose copies whole IR, fields got referenced incorrectly.
In the end, bytecode generator thinks that this is a field from other
class and creates a synthetic setter, which is prohibited in Java 9+
(Update to non-static final field ... attempted from a different method than <init>)
2020-12-19 19:18:14 +03:00
Ilmir Usmanov
f922ebbfc3
Value classes: Add JvmInlineValueClasses language feature
2020-12-18 17:53:58 +01:00
Victor Petukhov
48d9812d9e
Review fixes around type enhancement and loading type use annotations
2020-12-18 19:32:05 +03:00
Victor Petukhov
9a52863fbd
Report warnings about type mismatches based on freshly supported nullability annotations deeply
2020-12-18 19:32:05 +03:00
Victor Petukhov
d6017420de
Mark freshly supported annotations to use that mark for reporting corresponding warnings
2020-12-18 19:32:05 +03:00
Victor Petukhov
9693ea19fb
Add tests for type enhancement uncluding with compiled java
2020-12-18 19:32:05 +03:00
Victor Petukhov
71ca18e937
Support diagnostic tests with Kotlin against compiled Java
2020-12-18 19:32:05 +03:00
Victor Petukhov
6f8f531d87
Put type enhancement improvements under the compiler flag
2020-12-18 19:32:05 +03:00
Victor Petukhov
857cc92326
Support preference of TYPE_USE annotations to enhance over others like METHOD, FIELD and VALUE_PARAMETER to avoid double applying them in case of arrays: @NotNull Integer [] (both to the array element and to the entire array)
...
^KT-24392 Fixed
2020-12-18 19:32:04 +03:00
Victor Petukhov
69f31afecc
Exclude tests for loading type use annotations and type enhancement based on them to pass using javac and psi class files reading
2020-12-18 19:32:04 +03:00
Victor Petukhov
f389654fea
Support type enhancement for super classes' types
2020-12-18 19:32:04 +03:00
Victor Petukhov
276498793f
Support enhancement of type parameter's bound for all nullability annotations
2020-12-18 19:32:04 +03:00