Commit Graph

300 Commits

Author SHA1 Message Date
Simon Ogorodnik 3da11cc85b Use no-op substitutor instead of substitutor with empty map 2019-07-17 10:45:05 +03:00
Mikhail Glukhikh c6a09dba4e FIR: consider Java default constructors as primary ones 2019-07-11 12:40:29 +03:00
Mikhail Glukhikh 2ceffa241b FIR: make Java default constructor visibility same with class visibility 2019-07-11 12:38:53 +03:00
Mikhail Glukhikh c35d7eab70 Refactor FIR symbols to make them and their FIR element types more clear
This commit also fixes work with Java synthetic properties
2019-07-11 12:37:32 +03:00
Denis Zharkov bf0781d790 FIR: Implement fast path for classes subtyping 2019-06-20 15:42:42 +03:00
Simon Ogorodnik 2995e9fcac FIR deserializer optimization: avoid calling findKotlinClass twice
This commit influences enum entries deserialization.
In particular, now we don't deserialize enum entry members,
but deserialize its supertype correctly (see test data changes).
2019-06-19 23:04:41 +03:00
Simon Ogorodnik 2c5bd46a97 [FIR] Handle non-kotlin class results from findKotlinClassOrContent 2019-06-18 11:36:42 +03:00
Simon Ogorodnik 2f53bd24dd [FIR] Reorder providers to make builtins load first 2019-06-18 11:34:18 +03:00
Simon Ogorodnik 03c3469a14 [FIR] Enhance caches in providers 2019-06-18 11:33:11 +03:00
Simon Ogorodnik 95409b35ca [FIR] Use abstract classes for FIR scopes 2019-06-18 11:14:56 +03:00
Simon Ogorodnik 810fa9c171 [FIR] Make session & symbolProvider abstract classes 2019-06-18 11:14:55 +03:00
Simon Ogorodnik df9479b607 Cache declared member scope 2019-06-10 11:03:09 +03:00
Simon Ogorodnik 146a53f18c Change lookup tags from interfaces to abstract classes 2019-06-10 11:03:09 +03:00
Denis Zharkov 91d8f1fc88 FIR: Optimize access to FirSymbolProvider via session 2019-06-10 11:03:08 +03:00
Mikhail Glukhikh 2db8409d85 FIR: introduce & resolve spread named arguments #KT-31575 Fixed 2019-05-28 10:20:42 +03:00
Mikhail Glukhikh 806d2d628c FIR Java: correctly handle overridden Kotlin properties in use-site scope 2019-05-28 10:20:41 +03:00
Mikhail Glukhikh 56435fa283 FIR Java: add default constructors 2019-05-28 10:20:40 +03:00
Mikhail Glukhikh d0404b2c2a FIR resolve: check number of parameters when handling Java accessors 2019-05-28 10:20:38 +03:00
Mikhail Glukhikh 0aaf8c7689 Fix FIR Java enhancement of java.util.Map & similar supertypes 2019-05-28 10:17:21 +03:00
Simon Ogorodnik cef108a5ae FIR: implement qualifier resolver 2019-05-28 10:17:05 +03:00
Mikhail Glukhikh f3960c9482 Preliminary implementation of parts & facade in FIR-based compiler 2019-05-23 14:02:11 +03:00
Simon Ogorodnik 6c313895df [FIR] Do not enhance java fields to firProperty 2019-05-23 14:02:09 +03:00
Simon Ogorodnik 4bcba000fd FIR: pass name resolver to annotation deserializer separately 2019-04-30 18:45:56 +03:00
Mikhail Glukhikh f457cb099f FIR deserializer: handle context in more correct way 2019-04-30 18:45:55 +03:00
Mikhail Glukhikh d1d6b8b77a FIR Java: handle primitive arrays in annotations correctly 2019-04-30 18:45:54 +03:00
Simon Ogorodnik 9cef9e4056 Remove isMarkedNullable from FirResolvedTypeRef 2019-04-30 18:45:54 +03:00
Simon Ogorodnik 2f7ced2a8e FIR Java: bind overrides properly 2019-04-30 18:45:53 +03:00
Simon Ogorodnik e521e66c74 FIR deserializer: provide proper type for enum entries 2019-04-30 18:45:52 +03:00
Simon Ogorodnik 3e69838f48 FIR Java: map classes to make java type-parameters have correct bounds
Really, this commit implements early J2K mapping for all Java types.
It's questionable and probably wrong at least for super-types,
because, for example, we cannot resolve spliterator() in classes
derived from java.lang.Iterable
2019-04-30 18:45:51 +03:00
Simon Ogorodnik 6a0e3371ae FIR: resolve conflicts on multiple inheritance of fun with same signature 2019-04-30 18:45:50 +03:00
Simon Ogorodnik cec10dac85 FIR deserializer: remove cycle in annotations loading 2019-04-30 18:45:48 +03:00
Mikhail Glukhikh e3e7eea3fe FIR: support (partially) type annotations in JVM deserialized 2019-04-30 18:45:48 +03:00
Mikhail Glukhikh 48cd9e3251 FIR: support class annotations in JVM deserialized 2019-04-30 18:45:48 +03:00
Mikhail Glukhikh a9db64989b FIR deserializer: support enum entries and their annotation usages 2019-04-30 18:45:48 +03:00
Mikhail Glukhikh 092d10b1a8 FIR Java: fix creation & handling of type parameter symbols
Before this commit, we created type parameter symbols each time
when type parameter was referenced or created.
In this commit, we introduced class-bound Java type parameter stack
and use it to find referenced type parameter symbol.
So now they are created only when Java type parameter is created
2019-04-30 18:45:47 +03:00
Mikhail Glukhikh f8bb1d161a Fir Java: add type parameters to constructors and their return types 2019-04-30 18:45:47 +03:00
Simon Ogorodnik 9d7d358836 FIR deserializer: support properties 2019-04-30 18:45:47 +03:00
Simon Ogorodnik 8324ee7272 FIR deserializer: support type-aliases 2019-04-30 18:45:45 +03:00
Mikhail Glukhikh 7d793f6750 FIR resolve: add handling of companions as objects 2019-04-30 18:45:43 +03:00
Simon Ogorodnik 55467909da FIR deserializer: optimize KotlinDeserializedJvmSymbolsProvider 2019-04-30 18:45:40 +03:00
Simon Ogorodnik 4cb8faf666 FIR: uniquify scopes to avoid ambiguity on diamond inheritance 2019-04-30 18:45:39 +03:00
Simon Ogorodnik 3533541702 Provide class use-site scopes from FirSymbolProviders 2019-04-30 18:45:34 +03:00
Simon Ogorodnik 082e9d1cd7 FIR Java: implement knownClassNamesInPackage optimization 2019-04-30 18:45:34 +03:00
Alexander Udalov bd6e90f302 FIR: remove dependency of :compiler:fir:resolve on :compiler:cli 2019-04-30 12:01:23 +02:00
Simon Ogorodnik 879563233a FIR: optimize caching in JVM deserializer 2019-04-25 09:47:37 +03:00
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Mikhail Glukhikh 2476c0299f FIR Java: fix constructor enhancements
Before this commit,
we generated regular member functions as constructor enhancement.
Now, we generate constructors as constructor enhancement.
2019-04-23 11:41:05 +03:00
Simon Ogorodnik 8d2acd790d FIR Java: use safer cases in use-site scope to allow constructors 2019-04-23 11:21:46 +03:00
Mikhail Glukhikh cf72b13d84 Add accessor symbols & test for property overriding in Java 2019-04-23 11:15:24 +03:00
Simon Ogorodnik c3632487d0 FIR Java: improve symbol provider laziness 2019-04-23 09:49:29 +03:00