Commit Graph

7910 Commits

Author SHA1 Message Date
Steven Schäfer dbb6144ab0 JVM IR: Avoid boxing in generic floating point equality (KT-48635) 2022-06-08 15:38:06 +02:00
Roman Golyshev 8fca9f41eb [FIR IDE] Correctly check declarations' modalities in SamResolver
Modality might be null before the declaration itself is resolved to
`STATUS`

^KT-52667 Fixed
2022-06-07 21:14:24 +00:00
Dmitriy Novozhilov d527b00dfc [FIR] Create generated declared scope only for classes from sources and plugins 2022-06-07 14:12:27 +00:00
Dmitriy Novozhilov a85d25d7a6 [FIR] Rename UnderAnnotatedWith predicate to AncestorAnnotatedWith 2022-06-07 14:12:26 +00:00
Dmitriy Novozhilov 83d0a3e7a3 [FIR] Extract FirPluginKey into :core:compiler.common and rename it to GeneratedDeclarationKey
This is needed to avoid dependency on :compiler:fir:fir2ir module in
  backend parts of compiler plugins. It will allow to publish those
  parts into jars for IDE, where they are needed for working of debugger
  and bytecode toolwindow
2022-06-07 14:12:25 +00:00
Dmitriy Novozhilov a84ece7233 [Lombok] Add implementation of plugin for FIR 2022-06-07 14:12:25 +00:00
Dmitriy Novozhilov e58e86932c [FIR] Pass declared member scope to methods of declaration generation extension 2022-06-07 14:12:24 +00:00
Dmitriy Novozhilov ae0bc1c078 [FIR] Generate copy builder for FirTypeParameter 2022-06-07 14:12:24 +00:00
Dmitriy Novozhilov fb57e1ecd5 [FIR] Add two kinds of Java origin to distinguish source and library declarations 2022-06-07 14:12:23 +00:00
Dmitriy Novozhilov 23c69f8d17 [FIR] Add to new types of annotation predicates
- `ParentAnnotatedWith` matches declarations, which parent is annotated
- `HasAnnotatedWith` matches declarations, which have at least one
     direct child with annotation

Also, `DeclarationPredicate.Any` is removed, because there is no
  intention to support lookup for all declarations in module

^KT-52486 Fixed
2022-06-07 14:12:22 +00:00
Dmitriy Novozhilov f34061acc1 [FIR] Fix resolution of plugin annotations annotated with meta annotations
There was a problem, that after founding of new annotation with meta
  annotation we did not come back to previous files, which may contain
  declarations with this new annotation
2022-06-07 14:12:19 +00:00
Dmitriy Novozhilov 8acb8aa043 [FIR] Introduce utility service for plugins for matching common predicate pattern 2022-06-07 14:12:17 +00:00
Dmitriy Novozhilov 7048cac770 [FIR] Move FirPredicateBasedProvider to :compiler:fir:tree module 2022-06-07 14:12:17 +00:00
Dmitriy Novozhilov b948eaef4b [FIR] Add ability to register session components from FIR plugins 2022-06-07 14:12:17 +00:00
Dmitriy Novozhilov 67589b1b09 [FIR] Don't report TAILREC_ON_VIRTUAL_MEMBER_ERROR on private declarations 2022-06-07 14:12:13 +00:00
Dmitriy Novozhilov 399aaeca9d [FIR] Implement proper copy utility for FirDeclarationStatus 2022-06-07 14:12:13 +00:00
Dmitriy Novozhilov c7e3da8709 [FIR] Extend DeclarationPredicate DSL 2022-06-07 14:12:13 +00:00
Dmitriy Novozhilov 3ee0d13119 [FIR] Add additional DSL methods to FirExtensionRegistrar 2022-06-07 14:12:12 +00:00
Pavel Mikhailovskii 65b2cee913 KT-23397 Optimize out field for property delegate when it's safe (JVM) 2022-06-07 10:46:01 +00:00
Denis.Zharkov 9ee0268197 Minor. Drop unused FirTowerDataMode.SPECIAL 2022-06-06 15:18:05 +03:00
Denis.Zharkov 41dd00c241 FIR: Use outer scope for annotation arguments resolution
^KT-41980 Fixed
2022-06-06 15:18:05 +03:00
Denis.Zharkov eae673233b FIR: Rework FirRegularTowerDataContexts
- Get rid of SPECIAL mode (just left REGULAR and class-related instead)
- Clear naming
- Restore contexts after lambda/callable reference are processed

The test has been failing before this change because after
callable reference is resolved, its tower data context has been left
erroneously in the SPECIAL-related entry
2022-06-06 09:39:29 +00:00
Denis.Zharkov 521d6c307c Minor. Make properties private in FirSpecialTowerDataContexts 2022-06-06 09:39:29 +00:00
Denis.Zharkov 6e6d576a44 Minor. Drop unused addReceiverLabelAlias 2022-06-06 09:39:28 +00:00
Roman Golyshev 166c771e1b [FIR IDE] Ensure resolve to CONTRACTS phase in ReturnTypeCalculator
If we want to analyse some function's call, we need to know about its
contracts, otherwise resolving the following code would be broken.
Computing return type of function is a prerequisite to using it in any
sensible way, so it's the best place to resolve it to CONTRACTS

KT-50733
2022-06-06 09:14:37 +00:00
Ilya Gorbunov e14ac2a062 Test kotlin-repeatable annotations on Android
(except for type-use annotations)
2022-06-04 10:39:37 +00:00
Mikhail Glukhikh 8baff4404d Partial rename of 'Experimentality' around K1 checkers 2022-06-02 15:36:56 +00:00
Nikolay Lunyak 8d2868da32 [FIR JS] Regenerate tests
вфцвфдцьв
2022-06-02 13:47:34 +00:00
Nikolay Lunyak c2cecb2818 [FIR JS] Add the dynamic type unsupported checker 2022-06-02 13:47:33 +00:00
Nikolay Lunyak 624728e5c7 [FIR JS] Support dynamic type in IR 2022-06-02 13:47:32 +00:00
Nikolay Lunyak 6b94ba5804 [FIR2IR] Add the missing argument 2022-06-02 13:47:32 +00:00
Nikolay Lunyak 858999c1a1 [FIR] Preserve information about prefix/postfix-ness
This information is needed for dynamics
2022-06-02 13:47:31 +00:00
Nikolay Lunyak 93fa5ee696 [FIR] Add the missing source kind 2022-06-02 13:47:31 +00:00
Nikolay Lunyak 0bc34a9e5a [FIR] Add some helper functions for dynamics 2022-06-02 13:47:31 +00:00
Nikolay Lunyak 4038c06b1e [FIR JS] Treat named arguments as positional for dynamics
Note: 174/1627 failing FirJsTest tests remaining
- 170 are multi-module tests
- 4 tests have to do with IR
2022-06-02 13:47:30 +00:00
Nikolay Lunyak ee58b52a3d [FIR] Fix false positive NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY 2022-06-02 13:47:29 +00:00
Nikolay Lunyak a474acd927 [FIR JS] Fix NOT_YET_SUPPORTED_IN_INLINE 2022-06-02 13:47:29 +00:00
Nikolay Lunyak ac1fb07102 [FIR JS] Add checkers.js 2022-06-02 13:47:28 +00:00
Nikolay Lunyak 1bf2f424a3 [FIR JS] Fix the plusAssign generation for dynamics 2022-06-02 13:47:28 +00:00
Nikolay Lunyak 9b87dcbeae [FIR JS] Move FirInvalidAndDangerousCharactersChecker to checkers.jvm
This is a JVM-specific checker.
2022-06-02 13:47:28 +00:00
Nikolay Lunyak 91fa7dec88 [FIR JS] Fix false positive NON_ABSTRACT_FUNCTION_WITH_NO_BODY 2022-06-02 13:47:27 +00:00
Mikhail Glukhikh eaa77b5af6 [FIR JS] Generate dynamic FIRs via DynamicScope 2022-06-02 13:47:26 +00:00
Nikolay Lunyak d7e8dc65f5 [FIR] Update smartcast tests 2022-06-02 13:47:25 +00:00
Nikolay Lunyak 611691ec70 [FIR JS] Support smart casts for dynamic 2022-06-02 13:47:25 +00:00
Nikolay Lunyak 9a9beef25b [FIR JS] Prepare the infrastructure for FIR JS tests 2022-06-02 13:47:24 +00:00
Nikolay Lunyak d2a8942353 [FIR] Extract FirJvmConstDeserializer
Attempts to separate JVM and non-JVM entities more clearly.
2022-06-02 13:47:23 +00:00
Nikolay Lunyak be9e97d044 [FIR] Introduce ConeDynamicType 2022-06-02 13:47:23 +00:00
Nikolay Lunyak e763197c3e [FIR] Fix the use of local ClassIds 2022-06-02 13:47:22 +00:00
Ilmir Usmanov f922684169 Minor. Add regression test
#KT-52561 Fixed
2022-06-02 13:26:24 +00:00
Nikolay Lunyak 98c7399a35 [FIR] Remove the redundant backing field check
This commit fixes a failing visibility check
(FirSymbolByPsiTestGenerated.testBackingField) for the backing field.

Merge-request: KT-MR-6389
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2022-06-02 08:36:14 +00:00