Denis Zharkov
67cc85e02b
FIR: Avoid redundant calls to ensureResolved during call resolution
...
Call ensureResolved only once when creating a candidate
2020-09-01 17:43:30 +03:00
Denis Zharkov
bf2fc10cd6
FIR: Extract AbstractFirBasedSymbol::ensureResolved extension
2020-09-01 17:43:30 +03:00
Denis Zharkov
2529f541ba
FIR: Prepare refactoring of phasedFir
...
- Rename PhasedFirFileResolver -> FirPhaseManager
- Move semantically significant parts to a component
2020-09-01 17:43:30 +03:00
Roman Artemev
c7b57c0fb3
[IR] Use only empty constructor to create WrappedDescriptor
2020-09-01 17:08:11 +03:00
Dmitry Petrov
8cb8284957
EnhancedNullability annotation in IR
...
Fixes KT-40115 & KT-40117.
Move FlexibleNullability annotation to 'kotlin.internal.ir'.
2020-09-01 16:06:03 +03:00
Roman Golyshev
90c89bddc5
FIR IDE: Add collecting scopes for declarations
...
- They are required to perform completion in default arguments,
return types, and other declaration parts (except for body)
2020-09-01 10:09:46 +00:00
Dmitriy Novozhilov
cb47e631f8
[FIR] Move extended checkers containers to :compiler:fir:entrypoint
2020-09-01 12:00:13 +03:00
Dmitriy Novozhilov
c250912ee0
[FIR-TEST] Use FirAnalyzerFacade in BB and Fir2IrText tests
2020-09-01 12:00:13 +03:00
Dmitriy Novozhilov
a4e24ca3dc
[FIR] Introduce FirAnalyzerFacade which hides implementation details of running FIR compiler
2020-09-01 12:00:13 +03:00
Dmitriy Novozhilov
6db8c28291
[FIR] Refactor session components initialization
...
From now all customization of session should perform via DSL which
declared in FirSessionFactory. Registration or mutation session
services from other places is prohibited
2020-09-01 12:00:12 +03:00
Dmitriy Novozhilov
2819bd3aaf
[FIR] Get rid of deprecated extension point registration methods usage
2020-09-01 12:00:12 +03:00
Dmitriy Novozhilov
cf224b4de9
[FIR] Add createEmptySession to FirSessionFactory for testing purposes
2020-09-01 12:00:12 +03:00
Dmitriy Novozhilov
a8d23c36f5
[FIR] Introduce module :fir:entrypoint and FirSessionFactory for creating sessions
2020-09-01 12:00:12 +03:00
Dmitriy Novozhilov
94d58c714a
[FIR] Cleanup dependencies for fir modules
2020-09-01 12:00:12 +03:00
Dmitriy Novozhilov
73e2314f2f
[FIR] Get rid of dependency on intellijCore from :compiler:fir:resolve
2020-09-01 12:00:12 +03:00
Dmitriy Novozhilov
18ad56f7a8
[FIR] Fix creating fake source elements in declarations resolve
2020-09-01 12:00:12 +03:00
Dmitriy Novozhilov
28e6050551
[FIR] Extract java synthetic names calculation to platform specific component
2020-09-01 12:00:12 +03:00
Dmitriy Novozhilov
375140ebcc
[FIR] Extract java class mapping to platform specific component
2020-09-01 12:00:11 +03:00
Dmitriy Novozhilov
07c353973d
Move requireOrDescribe to :core:compiler.common
2020-09-01 12:00:11 +03:00
Dmitriy Novozhilov
f010dc533c
Move Variance.convertVariance to :core:compiler.common
2020-09-01 12:00:11 +03:00
Dmitriy Novozhilov
3379d9b619
[FIR] Extract java related effective visibility calculation to platform component
2020-09-01 12:00:11 +03:00
Dmitriy Novozhilov
ed4c6a38b6
[FIR] Move deserialization files to module :compiler:fir:fir-deserialization
2020-09-01 12:00:10 +03:00
Dmitriy Novozhilov
ca031f7ace
[FIR] Split ResolveUtils.kt from :resolve to separate files
2020-09-01 12:00:10 +03:00
Dmitriy Novozhilov
6ace4164ff
[FIR] Split TypeUtils from :resolve to :cones and :tree modules
2020-09-01 12:00:10 +03:00
Dmitriy Novozhilov
92ffa4dea9
[FIR] Replace KotlinScopeProvider with FirScopeProvider in ClassDeserialization
...
This is needed to remove dependecy on :fir:resolve from serialization
methods
2020-09-01 12:00:10 +03:00
Mikhail Glukhikh
3aa13362ca
[FIR2IR] Replace NPE in setThisReceiver with more detailed exception
2020-09-01 11:40:32 +03:00
Mikhail Glukhikh
65739c50d3
FIR full pipeline test: output build status per-module
2020-09-01 11:40:32 +03:00
Pavel Kirpichenkov
2979c37001
[NI] Fix resolution status for UnstableSmartCastDiagnostic
...
RESOLVED_WITH_ERROR was initially added for reproducing OI behavior.
The intention was to preserve resolution into unstable smart cast and to keep failing candidate.
However, this idea was abandoned after OI behavior proved inconsistent in cases involving generics.
This commit restores RUNTIME_ERROR status of UnstableSmartCastDiagnostic.
^KT-41357 Fixed
2020-09-01 11:21:13 +03:00
Pavel Kirpichenkov
873224dfbc
[NI] Use new type substitutor for known type parameters
...
Use known type parameters substitutor after substitutor for fresh variables.
The old logic of substituions had the following order:
- replace known type parameters
- replace type parameters with type variables
- complete inference
- replace type variables with inferred types
According to the updated logic, replacement goes as follows:
- replace type parameters with type variables
- replace known type parameters; if they were variables, this will effectively remove them from inference
- complete inference
- replace remaining type variables with inferred types
Support projection substitution in new type substitutor.
It is needed for correct interaction with old type substitutor.
Old type substitutors can contain mappings constructor -> projection
which couldn't be expressed correctly with existing substitutor API in some cases.
^KT-41386 Fixed
2020-08-31 17:53:46 +03:00
Mikhail Glukhikh
1e360d9c91
[FIR2IR] Pass type context for type argument conversion properly
2020-08-31 14:31:58 +03:00
Jinseong Jeon
04af6846a7
FIR2IR: handle more vararg spreads for adapted callable references
2020-08-31 14:31:58 +03:00
Mikhail Glukhikh
5efabe063e
[FIR] Fix JVM mapped function callable id
2020-08-31 14:31:57 +03:00
Mikhail Glukhikh
db815c96c5
[FIR] Substitute copied type parameters in fake override properties
2020-08-31 14:31:57 +03:00
Mikhail Glukhikh
dc9306367a
FirClassSubstitutionScope: reorder companion functions
2020-08-31 14:31:57 +03:00
Mikhail Glukhikh
5ad453d927
[FIR] Substitute copied type parameters in fake override functions
2020-08-31 14:31:57 +03:00
Mikhail Glukhikh
458f89ef33
[FIR] Signature composer: return null signature for local declarations
2020-08-31 14:31:57 +03:00
Mikhail Glukhikh
02b6f34067
[FIR2IR] Add extension receiver parameter to delegated members
2020-08-31 14:31:57 +03:00
Mikhail Glukhikh
22c63c4e80
[FIR2IR] Add supertypes to delegated member type parameters
2020-08-31 14:31:56 +03:00
Mikhail Glukhikh
9ad55a0ee3
[FIR2IR] Don't create list under the hood in DelegatedMemberGenerator
2020-08-31 14:31:56 +03:00
Mikhail Glukhikh
5384ccf02f
[FIR] Introduce & use FirDelegatedMemberScope
2020-08-31 14:31:56 +03:00
Mikhail Glukhikh
f0af930288
[FIR] Eliminate unused FirDelegatedTypeRef
2020-08-31 14:31:56 +03:00
Mikhail Glukhikh
ede910065a
[FIR] Add problematic resolve test case with delegated super call
2020-08-31 14:31:56 +03:00
Mikhail Glukhikh
3f5beb77e8
[FIR2IR] Cache delegatable members properly
2020-08-31 14:31:55 +03:00
vldf
b050ef9970
[FIR] Remove print in UnusedChecker
2020-08-30 14:18:01 +03:00
Steven Schäfer
b02f0f0a25
JVM IR: Fix compilation of nested inner classes
2020-08-28 20:03:19 +02:00
Mikhail Zarechenskiy
23f87d413a
Use initial system for completion if common one is effectively empty
...
Otherwise we can get unsubstituted type variables as expected types and
then write wrong information for assertions
#KT-41470 Fixed
2020-08-28 17:47:08 +03:00
Nick
bb18203ae6
[FIR] Various checkers performance fixes
2020-08-28 17:07:35 +03:00
Ilya Kirillov
8faaff00fa
FIR IDE: run lazy resolve on declaration when getting phased fir
2020-08-28 12:15:14 +03:00
Ilya Kirillov
f76b5bbf1b
FIR IDE: allow KtFirPackageScope to work without providers
2020-08-28 12:15:06 +03:00
Ilya Kirillov
a156cca02a
FIR: make class FirObjectImportedCallableScope to be name aware
2020-08-28 12:15:04 +03:00