pyos
e9b177352c
JVM_IR: do not inline reads of constructor arguments into accessors
2021-07-28 02:16:01 +02:00
Mikhail Glukhikh
84bd347841
Make EXPERIMENTAL_API_USAGE_ERR warning till 1.6 for signature type case
2021-07-27 14:58:56 +03:00
Mikhail Glukhikh
810def829c
Make EXPERIMENTAL_ANNOTATION_ON_OVERRIDE warning till 1.6
2021-07-27 14:58:55 +03:00
Steffi Stumpos
707e1c7f8d
[Test] Add service to provide additional classpath to box tests
2021-07-27 14:05:51 +03:00
Alexander Udalov
5526281c54
Minor, refactor diagnostic tests on repeatable annotations
2021-07-26 14:33:32 +02:00
Mikhail Glukhikh
7cbea12c8a
FIR: store all annotationContainers in checker context
2021-07-23 23:58:58 +03:00
Mikhail Glukhikh
82f268d611
FIR: add EXPERIMENTAL_API_USAGE reporting
2021-07-23 23:58:55 +03:00
Denis.Zharkov
d6adac8dd0
Move FastJarFileSystem to ProjectEnvironment and link to the root disposable
2021-07-23 21:38:45 +03:00
Denis.Zharkov
8f06e59d3b
Implement new faster version of Jar virtual file system
...
It's only enabled by default in FIR and might be turned on with a CLI flag
The main idea is that default FarFS re-read ZIP file list each time when
class file is requested that is quite slow.
We read it once and them reading bytes from the known offset.
Also, unlike the default version we don't perform attributes check on each access
On the one hand, it works faster on the other it might not notice that one
of the JAR has been changed during compilation process
But looks like it's not supposed to be a frequent even during
compilation of a single module
2021-07-23 21:38:38 +03:00
Nikolay Krasko
83023c2073
Remove 202 platform support in build scripts
2021-07-23 16:58:28 +03:00
Dmitry Petrov
34f5b85ae5
IR KT-47840 fix-point solution for closure conversion
2021-07-23 14:58:23 +03:00
pyos
d00fba3718
FE: avoid stack overflow on star projection of enhanced type parameter
...
#KT-47846 Fixed
2021-07-23 10:03:57 +03:00
Alexander Udalov
9ebd665c96
Report error on annotated type inside typeOf on JVM
...
Since it's not feasible to support annotated types in 1.6, we're making
this an explicit error in 1.6, so that typeOf can become stable and this
feature can be supported in the future without breaking changes to the
existing code.
Note that extension function types are a special case of annotated
types. A separate error is created for them just because the message
"annotated types are not supported" would be confusing, since such types
don't have explicit annotations in the source code.
#KT-29919
2021-07-22 15:54:48 +02:00
Leonid Startsev
83c1a75c1e
Revert "Revert "Instantiation of annotations for JVM IR with the corresponding feature flag""
...
Fix incorrectly rebased ce0a3a57df
This reverts commit 3d0126d5
2021-07-21 18:24:07 +03:00
Dmitriy Novozhilov
a710a8d10f
[FE 1.0] Report warning on non-exhaustive when statements only after 1.6
...
^KT-47709
2021-07-21 17:53:05 +03:00
Leonid Startsev
3d0126d5dd
Revert "Instantiation of annotations for JVM IR with the corresponding feature flag"
...
because of incorrect rebase
This reverts commit ce0a3a57
2021-07-21 15:23:24 +03:00
Leonid Startsev
ce0a3a57df
Instantiation of annotations for JVM IR with the corresponding feature flag
...
Seperate checker for platforms that do not support this language feature yet
Synthetic implementations of annotations are generated on-demand with proper
equals, hashCode, and annotationType methods
#KT-47699 Fixed
2021-07-21 10:23:51 +00:00
Mads Ager
6436a1686d
[JVM_IR] Recursively perform constant lowering.
...
Otherwise constants in child expressions are not transformed.
^KT-47716 Fixed.
2021-07-21 02:11:41 +02:00
Mads Ager
2877f1cabe
[JVM_IR] Fix check for inline class property backing in lowering.
...
The inline class lowering would attempt to lower a companion object
property backing field.
^KT-47762 Fixed.
2021-07-21 01:56:46 +02:00
Dmitriy Novozhilov
ef635f6a96
[FE 1.0] Report NON_EXHAUSTIVE_WHEN_STATEMENT/NO_ELSE_IN_WHEN for when's on logical types
...
^KT-47709 In Progress
2021-07-20 13:33:43 +03:00
Dmitry Petrov
e276dec4de
JVM don't merge local values in FixStackAnalyzer
...
We care only about stacks there.
This yields about 10-15% in a pathological case such as KT-41510.
2021-07-19 19:24:57 +03:00
Dmitriy Novozhilov
c304363aea
[FE 1.0] Report WRONG_ANNOTATION_TARGET on annotations on type arguments
...
^KT-47772 Fixed
2021-07-19 14:00:24 +03:00
Dmitry Petrov
d41fc0b599
PSI2IR fix suspend conversion tests
...
- support chained suspend conversion + SAM conversion
- support suspend conversion in vararg elements
2021-07-17 09:10:19 +03:00
Victor Petukhov
0cc6fbbc6e
Add tests for converting expressions of function types to suspending functional types
2021-07-17 09:10:17 +03:00
Mads Ager
b51ff799cb
Fix IteratorNext intrinsic to cast its dispatch receiver to
...
the expected type.
^KT-47741 Fixed.
2021-07-16 21:07:11 +02:00
Victor Petukhov
357fda2efa
Initialize builder inference lambda anyway, even a call is inapplicable
...
^KT-47744 Fixed
2021-07-16 19:32:35 +03:00
Dmitriy Novozhilov
afb7625d0c
[FE 1.0] Fix false positive INTEGER_OPERATOR_RESOLVE_WILL_CHANGE
...
^KT-47729 In progress
2021-07-16 15:18:44 +03:00
Dmitriy Novozhilov
2fb5f776d8
[FE 1.0] Report INTEGER_OPERATOR_RESOLVE_WILL_CHANGE on calls in parenthesis
...
^KT-47729 In progress
2021-07-16 15:18:38 +03:00
Victor Petukhov
ea4ab46765
Report implicit inferred Nothing only for own type parameters and in delegation resolve
...
^KT-47724 Fixed
2021-07-16 11:21:51 +03:00
Ilya Chernikov
c9b6847d83
FIR: Add test on delegated member with default param in overridden...
...
sensitive to the file processing order, therefore failing on the
current fir2ir at least with the new irBuiltIns
2021-07-16 02:24:36 +03:00
Ilya Chernikov
5b2acea98f
FIR: Add analysis flag for loading IR builtins from sources
2021-07-16 02:24:32 +03:00
Ilya Chernikov
dee0487185
IR: Refactor IrBuiltIns to abstract it from descriptors
2021-07-16 02:24:18 +03:00
Mikhael Bogdanov
671ef7dfff
Regenerate tests
2021-07-15 17:08:16 +00:00
Dmitry Petrov
8ea4916d64
JVM_IR KT-47739 recognize fake override external stubs
2021-07-15 19:20:39 +03:00
Georgy Bronnikov
ba61700be6
Regenerate tests
2021-07-14 21:20:49 +03:00
Georgy Bronnikov
28bff2ba4f
JVM_IR: add test for calling monitorEnter/Exit from serialized code.
2021-07-14 21:20:38 +03:00
Georgy Bronnikov
fa4efd3303
JVM_IR: fix deserialization of Java static field symbols
2021-07-14 21:20:35 +03:00
Georgy Bronnikov
20b76d4149
JVM_IR: reorganize initialization of JvmGeneratorExtensionsImpl
...
CachedFields are now created at initialization.
Therefore we need CompilerConfiguration as a constructor parameter.
2021-07-14 21:20:30 +03:00
Georgy Bronnikov
1c4466951f
IR: a flag to GeneratorExtensions to control IR deserialization
...
There is no need to search for IR embedded in toplevel classes when none
is expected (in npon-JVM backends or when -Xserialize-ir is not set).
2021-07-14 21:20:27 +03:00
Georgy Bronnikov
8d15a1d13d
JVM_IR: use signatures in AbstractIrSerializeCompileKotlinAgainstInlineKotlinTest
...
Using signatures allows us to identify calls from a new module to an old
one.
2021-07-14 21:20:24 +03:00
Georgy Bronnikov
96ce124268
JVM_IR: serialize fake overrides in IR
2021-07-14 21:20:21 +03:00
Georgy Bronnikov
6b80c00cc6
JVM_IR: deserialize lazy declarations
2021-07-14 21:20:14 +03:00
Georgy Bronnikov
ad8892f71f
JVM_IR: test that inline functions have deserialized bodies
2021-07-14 21:20:12 +03:00
Georgy Bronnikov
97d3eda23c
JVM_IR: run Kotlin against Kotlin tests with serialization
2021-07-14 21:20:10 +03:00
Mikhail Glukhikh
113d2653aa
Drop deprecated -Xexperimental flag from compiler and tests
2021-07-14 21:18:23 +03:00
pyos
07cb3a5ff8
JVM: do not reify methods of objects in lambdas
...
All type parameters used in them are not from the inline function
anyway.
2021-07-14 10:11:05 +02:00
pyos
100d2d629c
JVM: inline default lambda coercions from bridge invoke
...
The type of the default lambda may be a subtype of the parameter type,
so we can't really generate our own coercions at all as we don't know
the precise Kotlin type of the `invoke` method.
2021-07-14 10:11:05 +02:00
pyos
3dc7b6c3ee
IR: preserve argument evaluation order more carefully
...
1. receivers should be evaluated before named arguments;
2. just because an argument has no side effects doesn't mean it is not
affected by the other arguments' side effects - in that case it
should still be evaluated in source order.
#KT-47660 Fixed
2021-07-13 21:23:15 +03:00
Dmitriy Novozhilov
47b0071560
[FE 1.0] Properly handle intersection types in check if cast possible or not
...
^KT-47685 Fixed
2021-07-13 10:35:03 +03:00
Dmitriy Novozhilov
7b5a5f5682
[FE 1.0] Report USELESS_IS_CHECK if is expression is always false
...
^KT-47684 Fixed
2021-07-13 10:35:01 +03:00