Commit Graph

300 Commits

Author SHA1 Message Date
Mikhail Glukhikh 30679ebfaf FIR Java: implement correct type matching in SuperTypeScope 2019-11-07 15:07:41 +03:00
Mikhail Glukhikh 4d9839a790 JavaClassUseSiteMemberScope: add mutable vs non-mutable type matching 2019-11-07 13:08:38 +03:00
Mikhail Glukhikh 60e6d2e521 Resolve local declaration statuses & types inside bodies in FirBodyResolveTransformer 2019-11-06 13:19:10 +03:00
Dmitriy Novozhilov a501e514c9 [FIR] Add meaningful diagnostics in all error elements 2019-11-01 10:25:35 +03:00
Dmitriy Novozhilov 8b5f568a15 [FIR] Introduce FirDiagnostic in FIR instead of errorReason 2019-11-01 10:25:34 +03:00
Mikhail Zarechenskiy 77577dfa6f [FIR] Introduce ConeStubType to have subtyping for non-fixed variables
Currently, it's needed after changes in d7b47108f70a107818a04c8b8db33bfbf7c7e590

 Later it'll be also used for builder-inference
2019-10-31 11:32:03 +03:00
Mikhail Glukhikh 34d9959b17 FIR: add more correct handling of Java raw types 2019-10-30 12:55:38 +03:00
Mikhail Glukhikh d4af35d794 FIR: add substitution for Java fields 2019-10-30 12:55:37 +03:00
Mikhail Glukhikh e1c889e871 Make FirClass a kind of FirClassLikeDeclaration, introduce FirRegularClass/AnonymousObject symbols 2019-10-29 16:27:41 +03:00
Dmitriy Novozhilov 0d15ff1ddd [FIR] Introduce FirSourceElement instead of FirElement as source in fir nodes 2019-10-29 13:03:13 +03:00
Denis Zharkov 1564e72b59 FIR: Rename FirResolvedCallableReference -> FirResolvedNamedReference
^KT-32725 In Progress
2019-10-28 17:07:18 +03:00
Mikhail Glukhikh e14b63dfe1 FIR Java enhancement: get rid of FirAnnotationCall.resolvedFqName 2019-10-24 13:04:27 +03:00
Mikhail Glukhikh be6100527b FIR Java enhancement: fix JVM signature generation for type parameters 2019-10-24 13:04:27 +03:00
Mikhail Glukhikh dc657dfda5 FIR Java refactoring: calculate JVM signatures directly by Java types 2019-10-24 13:04:26 +03:00
Mikhail Glukhikh 15a8da5f7b Rename: Fir...UseSiteScope -> Fir...UseSiteMemberScope 2019-10-23 19:28:40 +03:00
Mikhail Glukhikh 374c3b4561 Cache FirSelfImportingScope and callables inside 2019-10-23 19:28:39 +03:00
Dmitriy Novozhilov 615d3aafef [FIR] Automatically generated abstract classes instead of interfaces if possible 2019-10-18 16:45:14 +03:00
Dmitriy Novozhilov f8f2d8b9a1 [FIR] Add FirAbstractElement as base type for all fir node implementations 2019-10-17 16:20:59 +03:00
Dmitriy Novozhilov 2ec305b34e [FIR] Don't generate replace and transform in implementations with kind = Interface 2019-10-17 16:20:58 +03:00
Mikhail Glukhikh b3d8f2d677 Introduce AbstractFirUseSiteScope and store common J/K code there 2019-10-17 13:39:33 +03:00
Mikhail Glukhikh fb22a31976 JavaClassUseSiteScope is made not-provider based
Before this commit, Java use-site scope was provider based for some reason.
In fact, provider was not used in this scope anyway,
so this can be safely removed
2019-10-17 13:39:33 +03:00
Dmitriy Novozhilov cb981919f9 [FIR] Replace FIR tree with generated implementation 2019-10-10 17:53:30 +03:00
Mikhail Glukhikh 58f2348647 FIR buildJavaUseSiteScope: fix visited symbols handling 2019-10-08 16:19:55 +03:00
Mikhail Glukhikh 1e8003e9a8 Use use-site session in buildJavaUseSiteScope 2019-10-08 16:19:55 +03:00
Mikhail Glukhikh 75a3d2fb97 FirClassDeclaredMemberScope: keep cache in provider but not in ScopeSession 2019-10-08 16:19:55 +03:00
Mikhail Glukhikh dfa494a21e FIR: remove duplicate of 'wrapSubstitutionScopeIfNeed' 2019-10-08 16:19:55 +03:00
Mikhail Glukhikh 4cd8b78779 FIR: eliminate most usages of FirSession.service() and getService() 2019-10-08 16:19:54 +03:00
Mikhail Glukhikh 9801e06eac Use .firSymbolProvider instead of service, deprecate FirSession.service 2019-10-08 16:19:54 +03:00
Mikhail Glukhikh 7ba40ac963 Memoize absent function/property names in FirSuperTypeScope 2019-10-04 18:59:12 +03:00
Mikhail Glukhikh 26e8202771 FIR: add 'isInner' parameter to constructors
This is helpful because inner class constructors are resolved in a bit
different way (like non-static vs static)
2019-10-04 18:59:10 +03:00
Mikhail Glukhikh 0493432723 Remove some usages of FirBasedSymbol 2019-09-17 10:10:06 +03:00
Mikhail Glukhikh 20c45a8382 FIR general refactoring: get rid of ConeSymbols 2019-09-16 16:55:42 +03:00
Denis Zharkov 3569eaabcf Rename FirJavaElementFinder.kt.as34 to FirJavaElementFinder.kt.183 2019-09-09 10:14:19 +03:00
Denis Zharkov 8c52ff31b3 Add bunch for AS34: FirJavaElementFinder 2019-09-06 13:45:28 +03:00
Denis Zharkov 3f0887dc0c FIR: Do not try building light classes for invalid names 2019-09-06 13:45:28 +03:00
Denis Zharkov 106b6c901d FIR: Get rid of FirRegularClass::setCallbackOnSupertypesComputed 2019-09-06 13:45:28 +03:00
Denis Zharkov 122c229a8b FIR: Add possibility to run SupertypeResolverTransformer ad-hoc 2019-09-06 13:45:28 +03:00
Denis Zharkov d9d6c38c2b FIR: Introduce FirClassLikeDeclaration::supertypesComputationStatus 2019-09-06 13:44:32 +03:00
Denis Zharkov 6058f9d286 FIR: Avoid recursions while building Java enhancement scopes 2019-09-06 13:44:32 +03:00
Denis Zharkov bf610323cf Support basic light-classes basic with FIR for CLI 2019-09-06 13:44:32 +03:00
Dmitriy Novozhilov 9f0781c9de [FIR] Add references to control flow graph to FirFunction and FirProperty
Also add updating CFG references anfter data flow analyzer builds graph
That graph is needed for further control flow analysis
2019-09-02 10:43:06 +03:00
Dmitriy Novozhilov ef4ef08b1d [FIR] Add default upper bound for java type parameters 2019-08-30 11:10:31 +03:00
Dmitriy Novozhilov 5846db4eab [FIR] Add symbol to FirFunction and all it's inheritors 2019-08-22 14:14:55 +03:00
Dmitriy Novozhilov e3e1f3c2aa [FIR] Fix transforming value parameters of anonymous functions 2019-08-22 14:14:55 +03:00
Mikhail Glukhikh 10e42a55c9 FIR: set PSI elements in JavaSymbolProvider / enhancement scope
Related to KT-24351
2019-07-31 13:24:20 +03:00
Mikhail Glukhikh 760fb668bb Introduce FIR resolution API with lazy resolve to use in IDE
Now lazy resolve atomic element is a file (declaration-level resolve)
or a callable declaration (expression-level resolve)

#KT-24351 In Progress
2019-07-30 16:28:17 +03:00
Mikhail Glukhikh c3a31dcdf5 Optimize FirSession component storage 2019-07-30 16:28:17 +03:00
Mikhail Glukhikh 7529d557fe FIR resolution: introduce FirResolvePhase & FirAbstractPhaseTransformer
The phase determines which transformers were already applied to declaration.
The transformer controls current resolve phase in phasedFir and
performs additional resolve if necessary.
2019-07-30 16:28:17 +03:00
Mikhail Glukhikh a38b4756b5 FIR tree refactoring: move FirElement.session to FirDeclaration
#KT-30275 Fixed
2019-07-30 16:28:16 +03:00
Mikhail Glukhikh 213f951da3 FIR: partial implementation of delegate resolve #KT-32217 Fixed 2019-07-25 09:46:34 +03:00