Commit Graph

1122 Commits

Author SHA1 Message Date
Dmitriy Novozhilov 80223bd555 [FIR] Fix determination of which type is FIR type in tree generator
^KT-52832 Fixed
2022-06-21 14:10:36 +00:00
Ivan Kochurkin 37ccd85e59 [FIR] Use coneType instead of coneTypeSafe<ConeKotlinType> in checkers and fir2ir 2022-06-17 23:26:21 +00:00
Ivan Kochurkin ca222b9c31 [FIR] Create error type for FirErrorLoop during initialization 2022-06-17 23:26:20 +00:00
Ivan Kochurkin a3647bb4ff [FIR] FirRenderer: render annotations for block and resolvedQualifier 2022-06-17 23:26:18 +00:00
Ivan Kochurkin fd2b4fd497 [FIR] Fix false positive USELESS_CAST on stub types, ^KT-50293 Fixed 2022-06-17 23:26:18 +00:00
Ivan Kochurkin 9d6f88469a [FIR] Use @file:Suppress("DuplicatedCode") for generated fir impl nodes
Get rid of unwanted warnings in IntelliJ
2022-06-17 23:26:17 +00:00
mcpiroman c11d01bebb Extract some common source generator logic from FIR tree generator 2022-06-13 18:58:05 +02: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 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 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 c7e3da8709 [FIR] Extend DeclarationPredicate DSL 2022-06-07 14:12:13 +00:00
Nikolay Lunyak 0bc34a9e5a [FIR] Add some helper functions for dynamics 2022-06-02 13:47:31 +00:00
Mikhail Glukhikh eaa77b5af6 [FIR JS] Generate dynamic FIRs via DynamicScope 2022-06-02 13:47:26 +00:00
Nikolay Lunyak 611691ec70 [FIR JS] Support smart casts for dynamic 2022-06-02 13:47:25 +00:00
Denis.Zharkov 461d91a10e FIR: Rework checking dispatch receivers applicability
Using `ownerLookupTag` might be wrong in case of private constuctors
 of inner classes: their owner is an Inner class, but expected
 dispach receiver is Outer
2022-06-01 16:02:31 +00:00
Ivan Kochurkin ad7c213ab2 [FIR] Initialize type for annotation arguments during deserialization
Get rid of IrErrorTypeImpl creating in FIR2IR
2022-05-29 23:41:23 +03:00
Yahor Berdnikau cf2d03b914 Move common configuration from /build.gradle.kts into plugin
Move all common to all projects configuration from root build.gradle.kts
into common-configuration convention plugin.
2022-05-24 07:58:36 +00:00
Dmitriy Novozhilov d66748d011 [FIR] Extract expect actual matching into separate phase 2022-05-20 13:33:04 +00:00
Denis.Zharkov 853b7ec078 FIR: Use NullableAny as a default bound 2022-05-19 16:53:58 +00:00
Ivan Kylchik a993939127 [FIR] Allow constant values for IntrinsicConstEvaluation declarations 2022-05-18 21:19:55 +03:00
Denis.Zharkov b87412c5af FIR2IR: Fix substitution work for context receivers 2022-05-13 18:04:02 +00:00
Denis.Zharkov 299c02a822 FIR: Introduce FirContextReceiverArgumentListOwner
Add it as a supertype for FirQualifiedAccess and FirDelegatedConstructorCall

^KT-51889 Related
2022-05-13 18:04:01 +00:00
Ilya Kirillov 6e0eba7e00 [low level api] fix ISE: Expected FirResolvedTypeRef with ConeKotlinType but was FirImplicitTypeRefImpl for CheckDslScopeViolation 2022-05-11 13:14:44 +02:00
Victor Petukhov 47d6236a2d [FIR] Support determining emptiness of an intersection type with type parameters' types 2022-04-27 19:50:23 +00:00
Ivan Kochurkin 8c7fad9a5e [FIR] Support of type arguments in annotations ^KT-48444 Fixed 2022-04-18 15:36:19 +00:00
Jerome Prinet 44b2905800 Fix JavaApplication.setMainClassName deprecation 2022-04-14 14:21:31 +03:00
Jerome Prinet 6aec88446a Fix JavaExec.main deprecation 2022-04-14 14:21:31 +03:00
Jinseong Jeon 2763b58cdd RAW FIR: use special name for default setter parameter
FE1.0 descpritor, PSI2IR, and JVM IR backend use that.
FIR2IR is also using that, which implies name "value" in RAW FIR
maybe has not been used anywhere.
2022-04-12 22:05:22 +02:00
Denis.Zharkov ac399321f0 FIR: Add replace method for contextReceiverNumber 2022-04-06 16:05:37 +00:00
Denis.Zharkov c33f06b9e4 FIR tree: add context receivers helper properties 2022-04-06 16:05:34 +00:00
Denis.Zharkov ef84dddc88 FIR: Add preliminary support for context receivers in resolution 2022-04-06 16:05:32 +00:00
Denis.Zharkov 90b12433ec FIR: Add replaceContextReceivers to FirCallableDeclaration 2022-04-06 16:05:31 +00:00
Denis.Zharkov c595780d83 FIR: Add two label-related fields to FirContextReceiver 2022-04-06 16:05:26 +00:00
Denis.Zharkov 550d24f8c6 FIR: Introduce ContextFunctionTypeParams type attribute 2022-04-06 16:05:26 +00:00
Denis.Zharkov 54c3e7e7c5 FIR: Support context receiver in FIR building 2022-04-06 16:05:24 +00:00
Denis.Zharkov a89680fb34 FIR: Prepare tree for context receivers 2022-04-06 16:05:23 +00:00
Dmitriy Novozhilov 5a3b397552 [FIR] Get rid of FirTypedDeclaration
`FirTypedDeclaration` has only one inheritor (`FirCallableDeclaration`),
  so there is no much sense to keep this class
2022-04-04 15:23:58 +00:00
Ilya Chernikov 5d6e2b57a7 Sort sealed class inheritors to ensure reproducible builds with IC
without this sorting the inheritors field in the metadata may depend on
whether some inheritors are compiled in the IC round or not.
2022-03-30 08:35:30 +00:00
Ilya Chernikov 03cbfea737 FIR LT: Introduce source file abstraction, carry it from parsing to IR
along with source lines mapping, allows to "emulate" usage of the
PSI files which allows to extract source file and line mapping info
on every stage from source element.
It makes sense to use this mapping for the error reporting too.
2022-03-30 08:34:30 +00:00
Evgeniy.Zhelenskiy b6f2513dd2 [FIR] Introduce valueClassRepresentation to FIR
#KT-1179
2022-03-24 11:38:44 +00:00
Mikhail Glukhikh 87a7408ddf FIR: handle double-imported qualifiers properly 2022-03-15 13:21:02 +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
Dmitriy Novozhilov ade2307345 [FIR] Fix exponential analysis of augmented array access calls
^KT-50861 Fixed
2022-03-11 15:36:05 +03:00
Mikhail Glukhikh 34998473f5 FIR: Move deprecation resolve earlier 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 9aaf7b7d24 FIR: drop pluginPhase special parameter 2022-03-10 20:42:40 +00:00