Denis Zharkov
43aa1f87df
FIR: Optimize supertypes scope structure
2019-12-05 17:35:33 +03:00
Denis Zharkov
91fce215d2
FIR: Simplify super type scopes related code
...
- Get rid of unnecessary subclass
- Use more abstract type where possible
2019-12-05 17:35:33 +03:00
Mikhail Glukhikh
a6f8859a49
FIR Java: generate accessors only in override Kotlin case, make them non-synthetic
2019-11-29 18:11:27 +03:00
Mikhail Glukhikh
5275b4d0fc
Move possibleGetterNamesByPropertyName to FirSyntheticPropertiesScope
2019-11-29 18:11:26 +03:00
Mikhail Glukhikh
d15dae6ac6
FIR: use SyntheticPropertySymbol & synthetic scope instead of FirAccessorSymbol
...
Before this commit, we used FirAccessorSymbol to emulate synthetic properties.
These symbols were generated in Java use-site scope.
Now, we use synthetic scope instead which is above MemberScopeTowerLevel.
This is more performance-friendly and does not require override matching.
However, accessor symbols should be used in situation when Java accessor
overrides Kotlin property which is broken in this commit
(that's why MapEntry test is corrupted here).
Also, we should not create synthetics for pure Kotlin accessors
(that's why javaAccessorConversion test is corrupted here).
2019-11-29 18:11:25 +03:00
Mikhail Glukhikh
8a601b5a0e
FIR accessors: add protection against special names
2019-11-29 18:11:21 +03:00
Mikhail Glukhikh
b48a4ace57
FIR accessor symbols: check all possible getter name variants
2019-11-29 18:11:21 +03:00
Mikhail Glukhikh
ed6238db4b
FIR accessor symbols: support 'is' prefix
2019-11-29 18:11:20 +03:00
Mikhail Glukhikh
eb90bd0e89
FIR: correctly process accessor symbols in derived classes
2019-11-29 18:11:19 +03:00
Mikhail Glukhikh
e43a1ee1c5
FIR JvmMappedScope: substitute type parameters in Java scope with Kotlin ones
...
Without it, override mapping does not work properly.
NB: at this moment Java forEach often supersedes Kotlin forEach,
because call isn't reported as erroneous properly.
2019-11-28 13:18:11 +03:00
Mikhail Glukhikh
4f1167b16f
Move buildDefaultUseSiteMemberScope to FirSymbolProvider
2019-11-28 13:18:10 +03:00
Mikhail Glukhikh
b3056b8bf5
FIR resolve: implement JVM K/J type mapping
...
Declared member scopes are now wrapped in JvmMappedScope
2019-11-28 13:18:10 +03:00
Denis Zharkov
f659dc0bea
FIR: Add synthetic values/valueOf methods to Java classes
2019-11-27 11:20:52 +03:00
Denis Zharkov
256f5ca0a1
FIR: Support inherited default parameters
2019-11-27 11:20:52 +03:00
Denis Zharkov
9dc628bd72
Fix FirJavaElementFinder.kt.183 compilation
2019-11-22 13:01:56 +03:00
Denis Zharkov
159aefd26d
FIR: Refactor Cone types
...
- Get rid of AbbreviatedType
2019-11-20 17:57:35 +03:00
Denis Zharkov
e03162f2dd
FIR: Rename ConeClassTypeImpl -> ConeClassLikeTypeImpl
2019-11-20 17:55:23 +03:00
Denis Zharkov
f178cb6fb3
FIR: Replace trivial usages of ConeClassType with ConeClassLikeType
2019-11-20 17:55:23 +03:00
Mikhail Glukhikh
137e54db05
FIR Java (raw type bounds erasure): make better protection from recursion
2019-11-19 23:22:36 +03:00
Mikhail Glukhikh
fa739f1aae
FIR: optimize classifier scope: don't search for nonexistent symbols
2019-11-19 22:41:19 +03:00
Mikhail Glukhikh
bd71d1dc3f
FIR resolve: use lazy nested classifier scopes for Java classes
...
It's necessary because JavaSymbolProvider adds nested classifiers lazily.
Commit slows things down due to relatively slow search in symbol providers
2019-11-19 22:40:22 +03:00
Simon Ogorodnik
6e8f8f9a65
[FIR] Partially support raw types
2019-11-19 16:50:40 +03:00
Mikhail Glukhikh
3d00212e34
FIR Java: add minor comment (type parameter types)
2019-11-19 13:13:24 +03:00
Mikhail Glukhikh
19aff81b55
FIR tower resolve: make static members accessible from derived classes
2019-11-19 13:07:53 +03:00
Dmitriy Novozhilov
950d1f4fe4
[FIR] Fix enhancement of java array type
2019-11-19 10:43:46 +03:00
Mikhail Glukhikh
bd70daa3d1
FIR Java: use definitely not-null types for type parameters
...
We support & use ConeDefinitelyNotNullType more properly here
2019-11-14 19:10:59 +03:00
Denis Zharkov
b0327964b7
Fix compilation on 183 and as34
2019-11-14 11:26:11 +03:00
Denis Zharkov
3a4f9e9109
FIR: Drop FirClassLikeDeclaration::supertypesComputationStatus
...
It became unused with rewritten supertype resolution
2019-11-13 10:52:24 +03:00
Denis Zharkov
5e0e78e555
FIR: Rewrite supertype resolution
2019-11-13 10:52:24 +03:00
Mikhail Glukhikh
26281bfe89
FIR Java: use different names for anonymous parameters (p0, p1, p2, ...)
2019-11-11 17:07:57 +03:00
Mikhail Glukhikh
c657d46437
FIR Java: add nullable (instead of not-null) type parameter bounds
2019-11-11 17:07:57 +03:00
Mikhail Glukhikh
db11c14fee
FIR Java: don't add type parameter bounds multiple times
2019-11-11 17:07:57 +03:00
Mikhail Glukhikh
41c81d25a0
FIR body resolve: use nested classifier scopes only via member scopes
2019-11-08 13:42:42 +03:00
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