Alexander Shabalin
eae9d05f50
[K/N] Add mockable clock. ^KT-48537
2022-03-14 13:21:39 +00:00
Alexander Shabalin
e6b7a142b2
[K/N] Implicit constructors for saturating. ^KT-48537
2022-03-14 13:21:38 +00:00
Alexander Shabalin
03b09346a5
[K/N] Intrusive single linked list ^KT-51436
...
Merge-request: KT-MR-5854
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com >
2022-03-14 13:20:41 +00:00
Ilya Chernikov
6ae55a98cd
FIR2IR: fix annotations conversion for precompiled functions
...
fixes the case then the function being inlined is taken
from the binaries compiled on the previous iteration, and therefore
should be treated similarly to a fun from a library.
2022-03-14 13:37:50 +03:00
Ilya Chernikov
aa0386276d
Fix FIR incremental compilation failure with inlines and lambdas
...
#KT-51546 fixed
2022-03-14 13:37:50 +03:00
Yan Zhulanow
8f1a2f4612
Improve heuristic for filtering synthetic enum methods out
...
It's not possible to check the exact method signature, as it is
unavailable in dumb stubs for Kotlin's light classes. Yet, it's still
possible to check more things, such as parameter count and access flags.
2022-03-14 17:53:55 +09:00
Yan Zhulanow
c334a44e02
Preserve synthetic enum methods in stub-based 'ClsClassImpl'
...
'ClsClassImpl' instances created by the platform contain synthetic
enum methods (added by 'ClassInnerStuffCache.calcMethods()'). Such
convention is common in IntelliJ (see KT-36095 and
'9a8b345adaded83fe13980a28db5d9f9acc7450d' in the IntelliJ repository).
This commit makes Kotlin's stub-based classes consistent with the
convention. Instead, a filter is added in place of 'ClsClassImpl' usage.
See also the following commits:
- 7c86911f44
- 43468c6d55
2022-03-14 17:53:55 +09:00
Yan Zhulanow
fa4dadf9b7
Update KotlinClassInnerStuffCache implementation
...
'KotlinClassInnerStuffCache' was copy-pasted from the platform's
'ClassInnerStuffCache' several years ago. After J2K and other changes,
it became quite dirty.
Besides cleaning things up, enum synthetic method handling have
significantly improved. Before, such methods were handled only in
'processDeclarationsInEnum', and 'getMethods()' didn't return them.
This led to inconsistent behavior and was reason for providing special
ad-hoc support in '1b6ded600518176b21cc308ed3e032ef8d04cc90'.
2022-03-14 17:53:55 +09:00
Yan Zhulanow
955d0841bd
Remove unused modification tracker in KotlinClassInnerStuffCache
...
'dropCaches()' is not used anywhere both in the compiler and in the IDE.
2022-03-14 17:53:55 +09:00
Yan Zhulanow
f237631f05
Revert "FIR/LC: create synthetic members of enum class"
...
This reverts commit 1b6ded60
2022-03-14 17:53:55 +09:00
Yan Zhulanow
736c6c4d29
Pill: Import Java toolchain configuration correctly
...
Before, all project modules used 'inheritedJdk'. However, some Kotlin
modules now require JDK 8, while others depend on new API in JDK 11.
2022-03-14 17:53:54 +09:00
Mikhael Bogdanov
6b00b51e6d
Generate fake variables for default lambdas during inline
...
#KT-51557 Fixed
2022-03-14 08:48:26 +00:00
Vyacheslav Gerasimov
5e09c3176f
Build: Set kotlin.build.cache.push to false by default
...
#KTI-793
2022-03-13 20:29:12 +00:00
Xin Wang
4277827506
Don't transform irBranch if tableswitch can't be generated
...
#KT-34466 Fixed
2022-03-12 14:30:00 +03:00
Hung Nguyen
5f1cf34c79
KT-45777: Take coarse-grained snapshots of external libraries
...
to reduce the size of the snapshots.
- Track metrics for Gradle classpath snapshot artifact transform
- Format size metrics so it's more readable
^KT-45777 In Progress
2022-03-11 17:44:25 +01:00
Svyatoslav Scherbina
54fb4d9b70
Native: make forward declarations expect in metadata compilations
...
If we are compiling metadata, make synthetic forward declarations
`expect`, because otherwise `getFirstClassifierDiscriminateHeaders`
would prefer it over a "real" `expect` declaration from a commonized
interop library, which would ruin the whole idea of using synthetic
forward declarations only when no proper definitions are found.
^KT-51377 Fixed
2022-03-11 15:09:38 +00:00
Yahor Berdnikau
76fc4328d1
Migrate KotlinGradlePluginIT to new test dsl
...
Moved some tests to another test suites
^KT-45745 In Progress
2022-03-11 16:27:09 +03:00
Yahor Berdnikau
f11ae83a3d
Add method to include other project as included build
...
^KT-45745 In Progress
2022-03-11 16:27:09 +03:00
Yahor Berdnikau
ca76c00b6c
Also provide BuildResult in assert block
...
^KT-45745 In Progress
2022-03-11 16:27:08 +03:00
Yahor Berdnikau
8844f81a92
Move PublishingIT tests to use JVM tag
...
^KT-45745 In Progress
2022-03-11 16:27:08 +03:00
Yahor Berdnikau
8ef0bbb279
Rename KpmCompilerPluginIT
...
Make name of test suite to be considered as MPP test.
^KT-45745 In Progress
2022-03-11 16:27:07 +03:00
Yahor Berdnikau
4c2c7d9e5e
Rename VariantAwareDependenciesIT
...
Make name of test suite to be considered as MPP test.
^KT-45745 In Progress
2022-03-11 16:27:06 +03:00
Jinseong Jeon
46707b0426
AA: test evaluation mode with same test inputs
2022-03-11 13:51:16 +01:00
Jinseong Jeon
a7fcbfb717
AA: move logic to evaluate constant property initializer
...
so as to handle composite expressions w/ constant property
2022-03-11 13:51:16 +01:00
Jinseong Jeon
606033e1e6
AA: introduce KtConstantEvaluationMode
2022-03-11 13:51:15 +01:00
Jinseong Jeon
ee23a52e54
AA: avoid conversions to KtInitializerValue in constant evaluator
2022-03-11 13:51:15 +01:00
Jinseong Jeon
1f93630a9c
AA: evaluate constant property initializers
2022-03-11 13:51:14 +01:00
Jinseong Jeon
7ec7cc47a9
AA: ignore evaluating named reference (to avoid exceptions)
2022-03-11 13:51:14 +01:00
Jinseong Jeon
e36bf55807
AA: avoid NPE while evaluating operations with non-numbers
2022-03-11 13:51:13 +01:00
Dmitriy Novozhilov
6f64aedaf0
[FIR] Fix FindReferencePositioningStrategy for light tree
...
There was a problem which causes to lookup for assign token inside
functions from arguments of call
2022-03-11 15:36:05 +03:00
Dmitriy Novozhilov
ade2307345
[FIR] Fix exponential analysis of augmented array access calls
...
^KT-50861 Fixed
2022-03-11 15:36:05 +03:00
wrongwrong
c4735f9f29
Add tests for KFunction involving value classes
...
See KT-31141.
2022-03-10 23:28:40 +01:00
Mikhail Glukhikh
c8453ec8b4
FIR: report ambiguity-like errors in type resolve
2022-03-10 20:42:42 +00:00
Mikhail Glukhikh
f073e86c93
Update FIR Analysis API test data
2022-03-10 20:42:42 +00:00
Mikhail Glukhikh
59a1c68081
FIR LL: add predicate based provider to library resolvable session
2022-03-10 20:42:42 +00:00
Mikhail Glukhikh
34998473f5
FIR: Move deprecation resolve earlier
2022-03-10 20:42:41 +00:00
Mikhail Glukhikh
3505b285f7
FirLazyDeclarationResolver: drop skipPhaseInLazyResolve
2022-03-10 20:42:41 +00:00
Mikhail Glukhikh
30fa0230ec
FIR: rename ANNOTATION_FOR_PLUGINS into COMPILER_REQUIRED_ANNOTATIONS
2022-03-10 20:42:40 +00:00
Mikhail Glukhikh
f32cdef760
FirCompanionGenerationProcessor: optimize a bit
2022-03-10 20:42:40 +00:00
Mikhail Glukhikh
9aaf7b7d24
FIR: drop pluginPhase special parameter
2022-03-10 20:42:40 +00:00
Simon Ogorodnik
d054976389
FIR. Add visibility/deprecation filtering to getFirstClassifierOrNull
2022-03-10 20:42:39 +00:00
Simon Ogorodnik
4ba5a55626
FIR. Add visibility/deprecation filtering to type resolve
2022-03-10 20:42:39 +00:00
Simon Ogorodnik
f5b49e48ad
FIR. Remove visibility filtering from importing scopes
2022-03-10 20:42:38 +00:00
Simon Ogorodnik
ec3e2f7b99
FIR. Shadow classifiers from super-type scopes
2022-03-10 20:42:38 +00:00
Simon Ogorodnik
5ea1c246d7
FIR. Get rid of kotlin.Throws prioritization hack
2022-03-10 20:42:38 +00:00
Pavel Kirpichenkov
9162faaf39
[MPP] Fix incorrect reuse of type argument commonizer
...
If the same NullableSingleInvocationCommonizer is reused for any reason,
it will store next inputs alongside previous, which is totally not
expected
^KT-51528 Fixed
2022-03-10 17:54:19 +03:00
Pavel Kunyavskiy
42a2ce1610
[K/N] Fix currentFrame in smaller scope, to avoid gc while having incorrect shadow stack
2022-03-10 13:22:04 +00:00
Mikhail Glukhikh
779aa75855
Make FE1.0/FIR OptIn override message more clear
2022-03-10 09:09:51 +00:00
Mikhail Glukhikh
d823020c07
Make FIR/FE1.0 report similar OptIn messages
2022-03-10 09:09:50 +00:00
Mikhail Glukhikh
b42c236fb3
Replace blank messages in OptIn diagnostics #KT-51358 Fixed
2022-03-10 09:09:50 +00:00