Commit Graph

118 Commits

Author SHA1 Message Date
Mikhail Glukhikh b3cf3c6579 FIR structure: include calleeReference into FirDelegatedConstructorCall 2019-04-04 10:31:05 +03:00
Mikhail Glukhikh 63d3100122 FIR structure: FirClassLikeDeclaration is now FirStatement
Done to support (in theory) local type aliases
2019-04-04 10:31:04 +03:00
Mikhail Glukhikh a0fa9e6b48 Raw FIR: make component call a function call, its argument -> receiver 2019-04-04 10:31:01 +03:00
Mikhail Glukhikh 30697787a0 Raw FIR: set "implicit boolean" result type for some operator calls 2019-04-04 10:31:00 +03:00
Mikhail Glukhikh eb86c9e540 FIR: get rid of ANDAND / OROR by replacing with when 2019-04-04 10:30:49 +03:00
Mikhail Glukhikh 33729aaf9b Raw FIR: add Any/Enum/Annotation to supertypes iff no supertypes exists 2019-04-04 10:30:44 +03:00
Mikhail Glukhikh 7dd89a48f0 Raw FIR: introduce FirConstructor.isPrimary 2019-04-04 10:30:43 +03:00
Mikhail Glukhikh 4187ea1f86 Raw FIR: add initializers to primary constructor properties 2019-04-04 10:30:40 +03:00
Denis Zharkov 6daf414098 Add common supertype for FirFunction and FirProperty symbols 2019-03-27 17:17:59 +03:00
Denis Zharkov 7a19e269fd FIR: Support import-references to callables 2019-03-27 17:17:59 +03:00
Mikhail Glukhikh aa6ba1cd4a Introduce typeRef for FirExpression
This helps both body resolve & conversion to IR
2019-03-25 10:38:45 +03:00
Simon Ogorodnik 5aa783a961 FIR: Fix visitors/transformers and testData 2019-03-22 16:25:19 +03:00
Simon Ogorodnik b574693916 FIR: Introduce function to render fir element with it's type 2019-03-22 16:25:14 +03:00
Simon Ogorodnik 24041828a9 FIR: Improve rendering for type operators 2019-03-22 16:25:14 +03:00
Simon Ogorodnik d9c40c24ed FIR: Allow rendering ConeTypes 2019-03-22 16:25:12 +03:00
Simon Ogorodnik 818701b8df FIR: Implement cycle avoidance in implicit type resolution 2019-03-22 16:25:11 +03:00
Simon Ogorodnik 334c42e8ab FIR: Implement deep implicit types resolution 2019-03-22 16:25:11 +03:00
Simon Ogorodnik 498fb94c37 FIR: Make FIR rendering more kotlin-styled 2019-03-22 16:25:10 +03:00
Simon Ogorodnik 43315fd61d FIR: Preparation for resolve to classifiers 2019-03-22 16:25:08 +03:00
Simon Ogorodnik 9dc6d93070 FIR: Resolve local callables 2019-03-22 16:25:06 +03:00
Simon Ogorodnik 61eb19fbbf FIR: Make possible to return variable symbols from scope 2019-03-22 16:25:05 +03:00
Simon Ogorodnik 02079bbeb5 FIR: Update fir hierarchy, decouple member declaration from callable 2019-03-22 16:25:04 +03:00
Simon Ogorodnik 099f98f817 FIR: Expression typing and simple call resolver 2019-03-22 16:25:02 +03:00
Mikhail Glukhikh c1984d92ff Introduce FirFile.fileSession, get rid of most FirElement.session usages 2019-03-21 10:29:58 +03:00
Mikhail Glukhikh 909a5fd32d FIR: implement named arguments #KT-24081 Fixed 2019-03-14 18:30:13 +03:00
Mikhail Glukhikh 43d06f85e3 Add raw type comparison for Java (J2K mapping is taken into account)
NB: Java enhancement scope does not perform substitution, so we could
have some duplicates inside "type enhancement" testData

Related to KT-29937
2019-03-14 18:17:58 +03:00
Mikhail Glukhikh 6c12fabf74 FIR: make JavaClassEnhancementScope use-site, get rid of scope providers
Related to KT-29937
2019-03-14 18:09:41 +03:00
Mikhail Glukhikh 33fb3d154b FIR Java model: support static members & enum entries
Related to KT-29218
2019-03-14 18:07:17 +03:00
Mikhail Glukhikh e7ac88d326 FIR: implement Java fields (in provider, type enhancement, scopes)
Related to KT-29218
2019-03-14 17:54:53 +03:00
Mikhail Glukhikh 4255c9f774 Add FIR enhancement tests, fix some exceptions / problems around them
Test data and tests themselves are based on
compiler/testData/loadJava/compiledJava
2019-03-14 17:52:33 +03:00
Mikhail Glukhikh f31faafd72 Introduce initial version of FIR Java type enhancement
Java type enhancement is performed by a special scope kind
Java FIR dump was added for multiplatform tests to look at enhancements
Overrides, J2K mapping, special cases does not work yet

Related to KT-29937
2019-03-14 17:51:00 +03:00
Mikhail Glukhikh 060bd1b464 Add separate FirJava elements (class, method, parameter, type reference)
Related to KT-29218
2019-03-14 17:40:04 +03:00
Denis Zharkov 6740cdabac Get rid of ConeAbbreviatedType::directExpansion
It becomes necessary after extracting supertypes resolution into a
separate phase.
But also it looks reasonable because direct expansion actually depends
on the module we are looking from.
2019-03-14 17:06:45 +03:00
Denis Zharkov 92defc2ae3 Extract supertypes resolution into a separate FIR phase 2019-03-14 17:06:45 +03:00
Simon Ogorodnik 3950dec4db Implement TypeSystemContext for FIR #KT-29968 Fixed
Use this context in FirClassUseSiteScope for type comparison
2019-03-06 13:36:00 +03:00
Mikhail Glukhikh 8e29ee53a4 Deprecate session in FirElement (related to KT-30275) 2019-03-05 18:23:17 +03:00
Denis Zharkov 2dbe96c853 Extract ConeClassifierLookupTag (aka SearchSymbol)
So, for classifiers there are both Symbols and LookupTags
The difference between them is that the former are assumed to have
a reference to the actual FirDeclaration while LookupTags
effectively contain only classId and
something informative may only be obtained by FirSession

#KT-24075 Fixed
2019-03-05 18:23:17 +03:00
Ilya Chernikov db3eb5707b Drop redundant usages of the ScriptDefinitionProvider 2019-03-02 08:10:17 +01:00
Mikhail Glukhikh 552b137852 FIR: get rid of fictitious function symbols 2019-02-19 09:54:37 +03:00
Mikhail Glukhikh 74d89b1be2 JavaSymbolProvider: support different kinds of literals in annotations
Constants, enum entries, class references, arrays are covered here
Related to KT-29218
2019-02-19 09:54:34 +03:00
Mikhail Glukhikh f8e165dbe4 Integrate nullability into cone types, add & use FIR flexible type
FIR fake overrides are rendered now more precisely to test this process
2019-02-19 09:54:32 +03:00
Mikhail Glukhikh 3d77f3d129 Fix rendering of ConeClassErrorType
This commit fixes total kotlin resolve test
2019-02-19 09:54:30 +03:00
Simon Ogorodnik 9ebefa3ba6 FIR: make FunctionType class-like, refactor built-ins resolution
This breaks total kotlin resolve test because of incorrect rendering
of ConeClassErrorType (we are trying to read its symbol)
2019-02-19 09:54:28 +03:00
Simon Ogorodnik 5afb0a6f4a FIR rename: FirType -> FirTypeRef and related 2019-02-19 09:54:24 +03:00
Mikhail Glukhikh 1c76a612f9 FIR rename: isNullable -> isMarkedNullable 2019-02-19 09:54:21 +03:00
Mikhail Glukhikh 4ea3df53cc Implement FIR loading for libraries (classes, supertypes, parameters)
Members aren't implemented yet
Related to KT-28788, KT-28918
2019-02-19 09:54:18 +03:00
Simon Ogorodnik 0e3fecf614 Implement fake override mapping for functions
Related to KT-29636
2019-02-19 09:53:33 +03:00
Mikhail Glukhikh bec62acf5b FIR: introduce callable member symbols & initial member scopes
Initial member scopes cover top-level, class-level, and  supers

Ad-hock version of call resolve was introduced to test them
NB: after this commit, total Kotlin resolve test cannot finish
because of scope problems in type resolve transformer

Related to KT-24078
#KT-24083 Fixed
2019-02-19 09:52:19 +03:00
Vyacheslav Gerasimov 7e1f64b712 Build: Fix generateVisitors task outputs 2019-02-18 19:58:56 +03:00
Mikhail Glukhikh f040eaff27 FIR expressions: perform some names refactoring
FirAccess -> FirQualifiedAccess
FirAccessExpression -> FirQualifiedExpression
FirPropertyAssignment -> FirVariableAssignment
Introduce lValue & rValue in FirAssignment
Introduce separate indexes in FirArraySetCall
2019-02-06 11:59:06 +03:00