Sergej Jaskiewicz
bca35c0015
[FIR/IR generator] Add default arguments to TypeVariable constructor
2023-11-09 13:30:25 +00:00
Jinseong Jeon
4110a9971a
AA: fix KtTypeProvider#getReceiverTypeForDoubleColonExpression
...
K1 version has used a wrong expression to retrieve the slice.
K2 version mishandled property access as a receiver.
^KT-63195 fixed
2023-11-08 16:18:21 +00:00
Evgenii Mazhukin
20af98c776
[Tests] Re-enable K1 IC tests for expect-actual
...
^KT-60831 fixed
^KT-60831 next step KT-63183
Merge-request: KT-MR-12855
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com >
2023-11-06 19:46:43 +00:00
Sergej Jaskiewicz
a84277782a
[IR generator] Don't use kotlinpoet for auto-generating IrFactory
...
KT-61970
2023-11-06 09:47:22 +00:00
Sergej Jaskiewicz
54de11cb58
[FIR/IR generator] Generate kDocs for visitor classes
2023-11-02 23:05:18 +00:00
Sergej Jaskiewicz
570422dbd4
[FIR/IR generator] Print visitor method expression bodies on new line
...
This helps to avoid long lines in visitor classes.
2023-11-02 23:05:18 +00:00
Sergej Jaskiewicz
c5f519f7c7
[FIR/IR generator] Commonize visitor printing logic
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
Also, don't use kotlinpoet for generating IR visitors (KT-61703)
2023-11-02 23:05:18 +00:00
Anna Kozlova
205a125c5f
[AA] implement KtFirSimpleNameReference.getImportAlias
...
^ KT-62980 fixed
Merge-request: KT-MR-12786
Merged-by: Anna Kozlova <Anna.Kozlova@jetbrains.com >
2023-11-02 21:23:43 +00:00
Alexander Udalov
1cf04916d6
Tests: remove bytecode listing tests for old JVM backend
...
These tests are mostly used to check ABI in case you're compiling a
library or library-like code, which is no longer possible (since old JVM
backend is only used in the IDE).
2023-11-02 10:59:29 +00:00
Ilya Kirillov
1aa5cf031f
[Analysis API FIR] fix "ConeClassLikeTypeImpl is not resolved to symbol for on-error type"
...
We should not expect builtins to be always available as they are taken from indecies.
For K1 and FIR Standalone implementations, the builtins are always available.
^KT-62010 fixed
2023-10-31 12:24:16 +00:00
Sergej Jaskiewicz
325b152efa
[FIR generator] Remove unused class ImplementationWithArg
2023-10-26 17:33:59 +00:00
Sergej Jaskiewicz
7b7bcb8ffa
[FIR/IR generator] Introduce ImportCollector
...
This class enables printing the import list in generated files
in a smarter way.
Also, refactor `Importable` interface hierarchy, namely, don't inherit
`TypeRef` from `Importable`, since we have types like `TypeRef.Star`
which are not really importable.
Replace the `Importable#typeWithArguments` property with
the `TypeRef#render` method to utilize `ImportCollector` while rendering
types.
2023-10-26 17:33:59 +00:00
Roman Golyshev
a6668919b0
KTIJ-26423 [AA] Remove FE10 tests for KtImportOptimizer
...
We don't plan to seriously support the FE10 implementation of
`KtImportsOptimizer` service, since it's not going to be used in IDE
(it has its own old version of import optimization logic)
2023-10-25 20:53:13 +00:00
Dmitrii Gridin
2f8026f335
[LL FIR] add missed diagnostic tests for scripts
...
^KT-62840
^KT-62841
^KT-62861
2023-10-24 19:32:54 +00:00
Anna Kozlova
5cac013d8c
[AA] approximate inplace type parameters bounds
...
^ KTIJ-27211 fixed
2023-10-24 10:54:15 +00:00
Dmitrii Gridin
2eb761adae
[LL FIR] generate resolution tests over codegen/box testData
...
Such testData can contain contract violations and other resolution
problems, so we should check them as well
^KT-62776
^KT-62832
^KT-62834
^KT-62836
2023-10-24 10:30:55 +00:00
Sergej Jaskiewicz
9eacdb3314
[FIR generator] Print builder property name in generated classes' KDocs
...
Just like we do when generating the IR tree
2023-10-24 10:29:43 +00:00
Sergej Jaskiewicz
7e7f4811bd
[FIR/IR generator] Add kDoc property to AbstractElement & AbstractField
2023-10-24 10:29:43 +00:00
Sergej Jaskiewicz
f2bb988e68
[FIR/IR generator] Replace getTypeWithArguments with a property
...
The `notNull` of that method was never used.
2023-10-20 10:49:20 +00:00
Sergej Jaskiewicz
de4e39906c
[FIR/IR generator] Use TypeRef for working with types in fields
...
- Don't inherit `AbstractField` from `Importable`, because it really
is not
- Remove the `arguments` and `nullable` properties from `AbstractField`.
Both properties can be derived from the field's `typeRef`.
- Make `AbstractField`'s `typeRef` property of type
`TypeRefWithNullability` instead of just `TypeRef`, because fields
can always be nullable.
2023-10-20 10:49:20 +00:00
Dmitrii Gridin
17ab005668
[Analysis API FIR] KtSymbolContainingDeclarationProvider: support script declarations
...
This commit also fixes a missing symbol for KtScriptInitializer
and some symbol pointers
Many tests marked as 'DO_NOT_CHECK_NON_PSI_SYMBOL_RESTORE'
due to KtFirFileSymbol#createPointer logic – the pointer can
be created only for PSI
^KT-61451
^KT-61887
^KT-62626 Fixed
^KT-62693
2023-10-20 09:27:21 +00:00
Sergej Jaskiewicz
75b509c185
[FIR/IR generator] Share visitor-related properties between FIR & IR
2023-10-20 06:41:12 +00:00
Sergej Jaskiewicz
04c5ac0eb6
[FIR/IR generator] Factor out adding pure abstract element as parent
2023-10-19 12:00:25 +00:00
Sergej Jaskiewicz
5798021e4b
[FIR/IR generator] Refactor element parents
...
- Move `elementParents` and `otherParents` properties
to `AbstractElement`
- Use `elementParents` instead of `parentRefs` where needed
2023-10-19 12:00:25 +00:00
Ilya Gorbunov
911fa3bbbb
[stdlib] Merge js-ir specific sources into common js sources
2023-10-19 03:11:54 +00:00
Sergej Jaskiewicz
417aa236fb
[FIR/IR generator] Factor out printing the preamble in generated files
2023-10-18 18:42:40 +00:00
Sergej Jaskiewicz
8c6da9fddb
[FIR/IR generator] Deduplicate interface/abstract class configuration
2023-10-18 12:39:39 +00:00
Sergej Jaskiewicz
9a4c28498c
[FIR generator] Deduplicate the logic of needPureAbstractElement
2023-10-18 11:12:55 +00:00
Sergej Jaskiewicz
7ab4ca6f51
[IR generator] Inherit Element from AbstractElement
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-10-16 22:56:36 +00:00
Sergej Jaskiewicz
f9d17a2d51
[IR generator] Inherit Field from AbstractField
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-10-16 22:56:36 +00:00
Sergej Jaskiewicz
15751333e3
[IR generator] Introduce constants for List-like types
2023-10-16 22:56:36 +00:00
Sergej Jaskiewicz
df0f86bf8d
[FIR generator] Use a single list of parent TypeRefs for elements
...
(Instead of storing the list of parent elements + the map of parent
arguments)
2023-10-13 10:11:38 +00:00
Svyatoslav Kuzmich
0295057520
Refactor: extract test generation regexp into a common util object
2023-10-12 13:26:58 +00:00
Sergej Jaskiewicz
04ac4b71a3
[FIR generator] Replace AbstractElement with ElemenOrRef
...
In the FIR generator, the `AbstractElement` class was used to
represent either an element type without type arguments applied
(using the `Element` subclass), or an element type with applied type
arguments (using the `ElementWithArguments` subclass).
Instead, it is more logical to use the `Element` class to always
represent a non-parameterized element type, and for a parameterized
element type use the `ElementRef` class, just like we do
in the IR generator.
2023-10-12 11:36:20 +00:00
Sergej Jaskiewicz
a909a28f29
[FIR generator] Use more type-safe field builders
2023-10-12 08:24:12 +00:00
Sergej Jaskiewicz
8be455649c
[FIR generator] Use TypeVariable instead of TypeArgument for TPs
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-10-12 08:24:12 +00:00
Sergej Jaskiewicz
8798fdeb82
[FIR generator] Use TypeRef for denoting types
...
(instead of `Type` and `Importable`)
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-10-11 11:16:08 +00:00
Marco Pennekamp
239cfa6d29
[AA] Add tests for combined declared member scopes
...
^KT-61800
2023-10-10 13:38:00 +00:00
Marco Pennekamp
1408556511
[AA] Refactoring: Rename AbstractMemberScopeByFqNameTest to AbstractMemberScopeTest
...
^KT-61900
2023-10-10 13:38:00 +00:00
Marco Pennekamp
21efd6aff3
[AA] Add tests for *static* (declared) member scopes
...
^KT-61900
^KT-61800
2023-10-10 13:38:00 +00:00
Ilya Kirillov
15e4cbc10d
[Analysis API] implement an API to get a substitution based on an inheritance relationship between classes
...
^KT-62090 fixed
2023-10-06 11:39:33 +00:00
Anna Kozlova
da385210d8
[AA] provide psiType#asKtType conversion
...
it's useful for IDE's features such as write UAST or refactorings
^KT-62302 fixed
Merge-request: KT-MR-12414
Merged-by: Anna Kozlova <Anna.Kozlova@jetbrains.com >
2023-10-05 15:18:55 +00:00
Sergej Jaskiewicz
3a5e69d651
[FIR/IR generator] Inherit TypeRef from Importable
...
This is the first step to replace the usages of `Importable`
in the FIR generator with `TypeRef`.
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-22 19:46:14 +00:00
Sergej Jaskiewicz
a995c522f7
[IR generator] Factor out TypeRef to common module
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-22 19:46:14 +00:00
Sergej Jaskiewicz
d5394db185
[FIR generator] Factor out AbstractElement to common module
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-22 19:46:14 +00:00
Sergej Jaskiewicz
977e316489
[FIR generator] Factor out TypeArgument to common module
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-22 19:46:14 +00:00
Yan Zhulanow
834cbaac5a
[LL API] Run fir2ir separately for files in different modules
...
Each module may have its own compiler configuration.
^KTIJ-27061 Fixed
2023-09-21 06:19:15 +00:00
Sergej Jaskiewicz
0dd01279da
[FIR generator] Move Implementation.Kind to common module
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-19 22:19:37 +00:00
Sergej Jaskiewicz
e62343427d
[FIR generator] Move Field and FieldContainer to common module
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-19 22:19:37 +00:00
Sergej Jaskiewicz
982b9221b4
[FIR generator] Move ArbitrarilyImportable class to common module
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-19 22:19:37 +00:00