Commit Graph

470 Commits

Author SHA1 Message Date
Jinseong Jeon 18953c4717 FIR: transform resolved arrayOf call inside annotation to FirArrayOfCall 2020-05-27 11:38:34 +03:00
Juan Chen adba0a03a6 [FIR] Create builtin primitive array types for properties
If the primary constructor has a vararg parameter, the corresponding
property has an array type. This commit creates the builtin array
types for such properties if the vararg element type is primitive,
e.g., CharArray instead of Array.
2020-05-26 14:08:47 +03:00
simon.ogorodnik dbc564e74e [FIR2IR] Approximate types for lambdas before passing to serialization 2020-05-25 21:24:39 +03:00
simon.ogorodnik b92194229c [FIR] Add fir copy function generation 2020-05-25 21:24:38 +03:00
Dmitriy Novozhilov 96da6d35c5 [FIR] Add processor for transforming statuses with plugins 2020-05-24 18:04:47 +03:00
Dmitriy Novozhilov 9a8d520b85 [FIR] Remove first version of class generation transformer 2020-05-24 18:04:46 +03:00
Dmitriy Novozhilov 846db641be [FIR] Make ArrayMap iterable 2020-05-24 18:04:45 +03:00
Dmitriy Novozhilov 74353d8bc9 [FIR] Introduce FirAnnotatedDeclaration 2020-05-24 18:04:44 +03:00
Pavel Kirpichenkov 0b33e9430b [NI] Report unstable smart cast directly instead of using SmartCastManager
Fix compilation errors, revealed by this fix.

SmartCastManager is unnecessary for error reporting, intermediate diagnostics from the NI contain all required infromation.
When SmartCastManager is used it leads to missing unstable smart casts in case of expressions with captured types.
This happens, because data flow info is recorded for original expression without captured types, which is used as a key.
DataFlowValues created from receivers with captured types can't be used to retrieve that info.

^KT-39010 Fixed
2020-05-21 17:09:10 +03:00
Dmitriy Novozhilov 0544369503 [FIR] Add transformImports to FirFile 2020-05-20 10:40:57 +03:00
Mark Punzalan 425ce8c3ab [FIR] Use flexible type lower bound when approximating type for
IntegerLiteral.
2020-05-19 15:42:49 +03:00
Denis Zharkov 27aa0040be FIR: Cache supetypes scopes when building callable scopes for qualifier 2020-05-15 16:04:44 +03:00
Denis Zharkov cd149957ee FIR: Filter out irrelevant local scopes during resolution 2020-05-15 16:04:44 +03:00
Denis Zharkov cee38e0800 FIR: Implement FirScopeProvider.getStaticScope
It will be used in the following commits
2020-05-15 16:04:44 +03:00
Mikhail Glukhikh 457fb09e3a [FIR] Use tower to resolve delegated constructors, set dispatch receiver 2020-05-12 16:57:07 +03:00
Dmitriy Novozhilov ad09eb5416 [FIR] Add ability to rewrite attributes in FirDeclarationAttributes 2020-05-08 15:10:13 +03:00
Dmitriy Novozhilov 239837fd14 [FIR] Introduce FirDeclarationAttributes for FirDeclaration 2020-05-08 15:10:12 +03:00
Dmitriy Novozhilov b348ae689a [FIR] Introduce different implementations of ArrayMapOwner
- ComponentArrayOwner for services
- AttributeArrayOwner for attributes like userdata or type attributes
2020-05-08 15:10:12 +03:00
Dmitriy Novozhilov 78b8a7b388 [FIR] Store extensions by plugin key 2020-05-08 15:10:01 +03:00
Dmitriy Novozhilov 728e0604ac [FIR] Add prototype of first generation phase 2020-05-08 15:09:59 +03:00
Dmitriy Novozhilov 4ed6d7fddb [FIR] Add stage for resolving annotations from plugins 2020-05-08 15:09:59 +03:00
Dmitriy Novozhilov f9c37cfa6c [FIR] Add transformAnnotationTypeRef to FirAnnotationCall 2020-05-08 15:09:59 +03:00
Dmitriy Novozhilov bb645a7962 [FIR] Add transformSuperTypeRefs to FirClass 2020-05-08 15:09:58 +03:00
Dmitriy Novozhilov bad4497970 [FIR] Add transformDeclarations to FirFile 2020-05-08 15:09:58 +03:00
Dmitriy Novozhilov 4b580b4e06 [FIR] Refactor FirResolvePhase.requiredToLaunch 2020-05-08 15:09:58 +03:00
Dmitriy Novozhilov 3d30ba9c19 [FIR] Add ability to register user defined annotations for plugins 2020-05-08 15:09:58 +03:00
Jinseong Jeon 7b01cf7b04 FIR: handle labeled super reference properly 2020-05-07 12:02:56 +03:00
Dmitriy Novozhilov 41545cd2b4 [FIR] Initialize origin in all places with creating of declarations 2020-05-07 09:42:20 +03:00
Dmitriy Novozhilov e515b1c823 [FIR] Add origin field to FirDeclaration 2020-05-07 09:42:20 +03:00
Mikhail Glukhikh 07e9b9517a [FIR] Extract interface FirEffectiveVisibility 2020-04-29 17:25:12 +03:00
Dmitriy Novozhilov e6d8e67a3a [FIR] Generify ComponentArray 2020-04-28 21:05:06 +03:00
Dmitriy Novozhilov a4a58a9d74 [FIR] Get rid of FirSession.service 2020-04-28 21:05:06 +03:00
Denis Zharkov b62400124a FIR: Support DEBUG_INFO_CALL calls in tests 2020-04-21 09:48:03 +03:00
Mikhail Glukhikh 29114fe7b5 FIR: leave 'isSuspend' in functional & resolved type references only 2020-04-20 17:05:38 +03:00
Jinseong Jeon 88f81b9b71 FIR: record 'suspend' function modifier in type references 2020-04-20 17:05:28 +03:00
Dmitriy Novozhilov 276754260a [FIR] Add replaceCalleeReference to all FirResolvable
Also improve tree generator: now it generates abstract overrides
  for `replace` functions and correctly generates replace for fields
  with overriden type
2020-04-17 12:37:28 +03:00
Dmitriy Novozhilov fa1e5f9593 [FIR] Add transformations for delegated constructor call 2020-04-17 12:37:28 +03:00
Mikhail Glukhikh d906c814cf [FIR] Fix lookup tag creation for values() & valueOf() 2020-04-15 19:32:53 +03:00
Georgy Bronnikov 7ea4ac9e9a [FIR] Regenerate FIR tree 2020-04-15 16:26:44 +03:00
Georgy Bronnikov a1a2da3c0f Revert "IR: put resolution of unbound type parameter symbols behind a language version flag"
This reverts commit 9634e6fba3.
2020-04-15 15:58:44 +03:00
Georgy Bronnikov 9634e6fba3 IR: put resolution of unbound type parameter symbols behind a language version flag 2020-04-15 15:51:20 +03:00
Dmitriy Novozhilov d718b596bc [FIR] Add transform declaration and companion to regular class 2020-04-15 11:13:00 +03:00
Dmitriy Novozhilov 17c6122987 [FIR] Make STATUS resolve phase as required for body resolve 2020-04-15 11:12:59 +03:00
Dmitriy Novozhilov 452fb3e723 [FIR] Add stage for resolve contract desription 2020-04-15 11:12:59 +03:00
Dmitriy Novozhilov cef6cd765c [FIR] Make ConeEffectDeclaration an abstract class 2020-04-15 11:12:58 +03:00
Dmitriy Novozhilov eef9b87047 [FIR] List for unresolved effects to resolved contract node 2020-04-15 11:12:57 +03:00
Dmitriy Novozhilov 4e1bf5f1e2 [FIR] Add extracting contracts in raw fir builder and light tree builder 2020-04-15 11:12:57 +03:00
Dmitriy Novozhilov 25cee12421 [FIR] Add contracts to FIR renderer 2020-04-15 11:12:57 +03:00
Dmitriy Novozhilov 50627f2c83 [FIR] Add contract renderer 2020-04-15 11:12:57 +03:00
Dmitriy Novozhilov a89e0123c7 [FIR] Add fir node for raw contract description 2020-04-15 11:12:56 +03:00