Commit Graph

499 Commits

Author SHA1 Message Date
Mikhail Glukhikh 684bdc44bb FIR: add implementation of reified type parameter references
This adds support of T::class.java for reified type parameters
2019-12-17 17:28:01 +03:00
Mikhail Glukhikh 37839a181c Introduce FirIdeModuleDependenciesSymbolProvider #KT-35424 In Progress
This solves problems with inter-module dependencies, at least in small projects.
However, Kotlin project still does not see stdlib.
Also, we often have problems with untouched types during expected type checks
(FirUserTypeRef instead of FirResolvedTypeRef)
2019-12-17 10:41:24 +03:00
Dmitriy Novozhilov 4faa2c0c2c [FIR] Replace static cone types for integers with default classIds in ILT 2019-12-12 16:11:47 +03:00
Mark Punzalan f031b47363 [FIR] Fix issue with multiple smartcasts of this. 2019-12-11 16:57:41 +03:00
Mark Punzalan 692a83f7bb [FIR] Add FirCheckNotNullCall converted to CHECK_NOT_NULL intrinsic
function call.
2019-12-11 16:54:15 +03:00
Dmitriy Novozhilov b76c984b26 [FIR] Support IntegerLiteralTypes 2019-12-09 17:24:26 +03:00
Dmitriy Novozhilov 5577f0f8cb [TMP] Make context in inference components universal 2019-12-09 15:28:24 +03:00
Mikhail Glukhikh 9782ec1b1e FIR resolve phases: set BODY_RESOLVE phased properly
Before this commit, we never set this phase to declaration or file
2019-12-05 18:02:03 +03:00
Mikhail Glukhikh 8808c775a4 Introduce FirResolvedTypeRef.delegatedTypeRef to see children types in IDE
This is needed to have access to resolved children types (e.g. type arguments) from IDE
2019-12-05 18:02:02 +03:00
Dmitriy Novozhilov 38c1a50c1d [FIR] Resolve delegating constructor calls 2019-12-05 17:47:15 +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 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 f1eb0dff1f FIR: disable synthetic scope, make accessor symbols synthetic
Before this commit, we had two methods to do generally the same synthetic thing.
It's an attempt to keep only one of them.
Accessor symbols are generated in Java use-site member scopes,
at this place we know better whether we are in Java class or not.
However, we have to do this at every use-site level, which is relatively slow.
Also we could encounter problems when accessor function is overridden in Kotlin,
and accessor symbol can still contain reference to Java accessor.
2019-11-29 18:09:07 +03:00
Simon Ogorodnik e5f60253f7 [FIR] Improve path usages in generator, provide default output 2019-11-29 18:04:48 +03:00
Simon Ogorodnik 5eb5d8e515 [FIR] Separate generated tree files from non-generated sources 2019-11-29 18:04:47 +03:00
Denis Zharkov 3b7ad066fc FIR: Substitute type alias constructors properly 2019-11-27 11:20:52 +03:00
Denis Zharkov f659dc0bea FIR: Add synthetic values/valueOf methods to Java classes 2019-11-27 11:20:52 +03:00
Dmitriy Novozhilov 43e621530f [FIR] Add type parameters to FirQualifierExpression
It is needed for resolving qualifiers with type arguments
  like `Array<String>::class`
2019-11-25 14:44:44 +03:00
Denis Zharkov db24d4ac9a FIR: Drop ConeTypeAliasLookupTag 2019-11-20 18:02:08 +03:00
Denis Zharkov 159aefd26d FIR: Refactor Cone types
- Get rid of AbbreviatedType
2019-11-20 17:57:35 +03:00
Dmitriy Novozhilov 35dd1cf75a [FIR] Fix binding return expression to function 2019-11-19 10:43:46 +03:00
Dmitriy Novozhilov 99da7272f5 [FIR] Change children order in FirConstructor 2019-11-19 10:43:45 +03:00
Mikhail Glukhikh 63f38bb28a FIR [rendering only]: render fake overrides for properties 2019-11-14 19:10:58 +03:00
Dmitriy Novozhilov 11063a25a8 [FIR] Replace FirEmptyDiagnostic with FirStubDiagnostic
FirStubDiagnostic hold reason from original diagnostic
It's useful in HTML fir dump
2019-11-14 18:33:46 +03:00
Denis Zharkov 3a4f9e9109 FIR: Drop FirClassLikeDeclaration::supertypesComputationStatus
It became unused with rewritten supertype resolution
2019-11-13 10:52:24 +03:00
Dmitriy Novozhilov e910653d6f [FIR] Add pretty rendering of functional types 2019-11-08 12:12:39 +03:00
Dmitriy Novozhilov 18dc652404 [FIR] Get rid of operation in FirVariableAssignment
`FirVariableAssignment` is creates only for expressions `x = y`
For other assign operators there is a `FirOperatorCall`
2019-11-08 12:12:39 +03:00
Mikhail Glukhikh 60e6d2e521 Resolve local declaration statuses & types inside bodies in FirBodyResolveTransformer 2019-11-06 13:19:10 +03:00
Mikhail Glukhikh d6daf321a2 FIR: render implicit built-in type references as resolved ones 2019-11-06 13:19:08 +03:00
Dmitriy Novozhilov 01f09af608 [FIR] Fix generated name for FirErrorNameReferenceImpl 2019-11-01 13:24:57 +03:00
Dmitriy Novozhilov 528e538b2a [FIR] Remove duplicating diagnostics from error function calls 2019-11-01 13:24:57 +03:00
Dmitriy Novozhilov 0428916d3c [FIR] Add error nodes to default transformer and visitors 2019-11-01 10:25:35 +03:00
Dmitriy Novozhilov a501e514c9 [FIR] Add meaningful diagnostics in all error elements 2019-11-01 10:25:35 +03:00
Dmitriy Novozhilov 7503449e8d [FIR] Add kind to diagnostics reported by RawFirBuilder 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 Glukhikh d4af35d794 FIR: add substitution for Java fields 2019-10-30 12:55:37 +03:00
Mikhail Glukhikh 7dee1cd9d2 Build member scope for FirAnonymousObject correctly 2019-10-29 16:27:41 +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
Dmitriy Novozhilov b93357be48 [FIR] Support assignment operators 2019-10-29 13:03:13 +03:00
Dmitriy Novozhilov fd852ec07d [FIR] Add deserialization of contracts 2019-10-29 13:03:12 +03:00
Dmitriy Novozhilov 18c3d1c140 [FIR] Add contract description classes to fir 2019-10-29 13:03:12 +03:00
Denis Zharkov 7ae3eda37f FIR: Rename FirResolvedRealCallableReference -> FirResolvedCallableReference
^KT-32725 In Progress
2019-10-28 17:07:19 +03:00
Denis Zharkov 1564e72b59 FIR: Rename FirResolvedCallableReference -> FirResolvedNamedReference
^KT-32725 In Progress
2019-10-28 17:07:18 +03:00
Denis Zharkov 006e475a99 FIR: Support callable references partially
^KT-32725 In Progress
2019-10-28 17:04:48 +03:00
Denis Zharkov cdb2bb2b45 FIR: Prepare tree for callable references resolution
^KT-32725 In Progress
2019-10-28 17:04:44 +03:00
Mikhail Glukhikh e14b63dfe1 FIR Java enhancement: get rid of FirAnnotationCall.resolvedFqName 2019-10-24 13:04:27 +03:00
Mikhail Glukhikh bb60a8f334 Code cleanup: get rid of FirPosition 2019-10-23 19:28:40 +03:00
Mikhail Glukhikh 17b966daaa Unify API of FirScope.processClassifiersByName (use ProcessorAction) 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