Commit Graph

33188 Commits

Author SHA1 Message Date
Iaroslav Postovalov 8a7bc2ef6f Rename continuation fields according the convention and count them in IR 2020-12-23 19:45:13 +01:00
Iaroslav Postovalov 165ba85337 Remove useless OptIn annotation 2020-12-23 19:45:09 +01:00
Iaroslav Postovalov 6f34f00c61 Do not generate the field for unused parameters in suspend lambdas 2020-12-23 19:45:04 +01:00
Ilmir Usmanov f49cf2d5ca IC Mangling: correctly mangle inline default functions
#KT-43682 Fixed
2020-12-23 18:13:09 +01:00
Ilya Kirillov 9a86d2e10c FIR IDE: do not mark declaration with some lazy resolve phase if only some children are resolved to that phase
Otherwise, we will not be able to resolve parent one
2020-12-23 17:16:19 +01:00
Ilya Kirillov 1e2536402d FIR: render constructor resolve phase in FirRenderer when renderDeclarationResolvePhase is requested 2020-12-23 17:16:18 +01:00
Ilya Kirillov 85c65e20b3 FIR: add meaningful error message when type ref is unresolved 2020-12-23 17:16:17 +01:00
Ilya Kirillov 6ad396f417 FIR: use transformer creator from existing return type calculator when creating a new one 2020-12-23 17:16:16 +01:00
Ilya Kirillov a30d9e0ed3 FIR: add fake source fir element to it parameter symbol 2020-12-23 17:15:56 +01:00
Georgy Bronnikov b35d4134a7 Psi2IR: workaround for IR-based descriptors
Since KotlinTypes involving IR-Based descriptors are distinct from KotlinTypes
involving original descriptors of the same declarations, subtyping check
breaks in InsertImplicitCasts.
2020-12-23 18:50:53 +03:00
Georgy Bronnikov 99c874ba8a IR: use NullDescriptorRemapper in DeepCopySymbolRemapper 2020-12-23 18:50:52 +03:00
Georgy Bronnikov c5961da780 IR: remove WrappedDescriptors altogether 2020-12-23 18:50:52 +03:00
Georgy Bronnikov e9f45e23f2 IR: NullDescriptorsRemapper 2020-12-23 18:50:52 +03:00
Georgy Bronnikov 3683cd0f7b IR: fix IrBasedTypeAliasDescriptor 2020-12-23 18:50:52 +03:00
Georgy Bronnikov 076272f7ca FIR2IR: avoid descriptors computing hashCode
When synthesizing the hashCode function for data classes, descriptors
were used, in partcular, memberScope for primitive classes.
IrBasedDescriptors have no member scope, so we compute the hashCode
function based on IR structures.
2020-12-23 18:50:52 +03:00
Georgy Bronnikov b07dccb8d7 Fir2IR: remove wrapped descriptors 2020-12-23 18:50:52 +03:00
Georgy Bronnikov b05400154d IR: remove IrSymbolDeclaration 2020-12-23 18:50:52 +03:00
Georgy Bronnikov d714adacae IR: removing WrappedDescriptors from symbols 2020-12-23 18:50:51 +03:00
Georgy Bronnikov 989d4350b1 IR: make descriptor optional in IrSymbol 2020-12-23 18:50:51 +03:00
Jinseong Jeon aaa3f2e2c1 FIR2IR: correct IR origin for substitution overrides
#KT-44054 Fixed
2020-12-23 16:13:05 +03:00
Jinseong Jeon 34dbbdce07 FIR2IR: use lookupTag or class to getLocalClass, not classId
Before this commit, we sometimes tried to fetch anonymous object by id,
getting sometimes a wrong result because it's singleton.
Now we use lookupTag or FIR class itself instead.

#KT-44050 Fixed
2020-12-23 16:12:58 +03:00
Dmitry Petrov 632f5af442 Minor: kt21014.kt - add JVM_TARGET 1.8 2020-12-23 11:25:36 +03:00
Jinseong Jeon 73576c80e4 FIR2IR: calculate IR parent for Java field ahead
so as to cache type parameters from the parent if the field's return
type is one of type parameters.

#KT-44032 Fixed
2020-12-23 09:10:52 +03:00
Mikhail Glukhikh 107a825c5f Make FileDescriptorForVisibilityCheck subtype of PackageFragmentDescriptor
#KT-20548 Fixed
2020-12-23 00:11:08 +03:00
Dmitry Petrov 3ae8521f12 Minor: drop kt21014.kt (SIGSEGV on HotSpot 6.0_45-b06) 2020-12-22 19:56:54 +03:00
Dmitry Petrov f647233189 Minor: drop empty bunch file 2020-12-22 16:10:50 +03:00
Dmitry Petrov 796d821776 JVM_IR box tests for JDK9 2020-12-22 16:09:48 +03:00
Dmitry Petrov c9d330207b JVM_IR no nullability annotations on SAM wrapper constructor parameters 2020-12-22 16:09:46 +03:00
Dmitry Petrov 4780c73e40 Ignore anonymous inner classes in LightAnalysisMode tests 2020-12-22 16:09:45 +03:00
Dmitry Petrov 0dff583070 JVM KT-36984 SAM wrappers are anonymous inner classes 2020-12-22 16:09:45 +03:00
Dmitry Petrov 57dd9fc87a JVM_IR KT-36984 SAM wrappers are anonymous inner classes 2020-12-22 16:09:45 +03:00
Dmitry Petrov 443cd0fc2c Tests for issues fixed in JVM_IR 2020-12-22 16:07:06 +03:00
Denis.Zharkov 5e5b236ef8 Extract record related parts into smaller bunch files for 201 2020-12-22 14:58:05 +03:00
Jinseong Jeon e05d26b9b0 FIR2IR: cache type parameters in delegated property
#KT-44030 Fixed
2020-12-22 12:05:31 +03:00
Jinseong Jeon 78fa8814c4 FIR: unwrap f/overrides when determining mutability of property reference
#KT-44010 Fixed
2020-12-22 12:04:56 +03:00
Dmitriy Novozhilov 554fa358e8 [FIR] Fix calculating offsets of light tree source elements for local declarations 2020-12-21 18:34:58 +03:00
Dmitriy Novozhilov 298e27bdac [Test] Migrate AbstractExtendedFirDiagnosticsTest to new infrastructure 2020-12-21 18:34:57 +03:00
Dmitriy Novozhilov a276d05917 [Test] Generate FIR tests with new infrastructure in :analysis-tests module 2020-12-21 18:34:56 +03:00
Dmitriy Novozhilov 537e4f0bb4 [Test] Move existing fir tests on old infrastructure to :legacy-fir-tests module 2020-12-21 18:34:55 +03:00
Dmitriy Novozhilov 1f258c28fc [Test] Extract main compiler test generator to separate project
This is needed because now we have different tests modules with different
  test frameworks (JUnit3 and JUnit5) which has no dependencies between
  each other. So for keeping all test generation config in one place
  we need module which may rely on all independent test modules
2020-12-21 18:34:54 +03:00
Jinseong Jeon d753d21dee FIR2IR: don't add SAM conversion for explicit subtype cases 2020-12-21 18:01:27 +03:00
Jinseong Jeon 7df289746c FIR: fix invoke lookup for SAM resolution 2020-12-21 18:01:26 +03:00
Jinseong Jeon 3bca6ae893 FIR: allow lower bound of flexible type when finding contributed invoke 2020-12-21 18:01:25 +03:00
Jinseong Jeon 4a24f0fab3 FIR2IR: use FirSamResolverImpl to get function type for possible SAM type 2020-12-21 18:01:23 +03:00
Jinseong Jeon d5a6991b2d FIR: extend SAM conversion to subtype of functional type 2020-12-21 18:01:22 +03:00
Mikhail Glukhikh c6a40b2322 Optimize/simplify FirJvmTypeMapper.defaultType 2020-12-21 17:35:51 +03:00
Mikhail Glukhikh 3ab5b57594 Optimize/simplify FirJvmTypeMapper.representativeUpperBound 2020-12-21 17:35:51 +03:00
Mikhail Glukhikh 42b590d07c Optimize/simplify FirSealedClassConstructorCallChecker 2020-12-21 17:35:51 +03:00
Mikhail Glukhikh c94c71cc50 Optimize/simplify ConeClassLikeLookupTag.getNestedClassifierScope 2020-12-21 17:35:50 +03:00
Mikhail Glukhikh 7add186616 Optimize/simplify FirClass<*>.findNonInterfaceSupertype 2020-12-21 17:35:50 +03:00