Commit Graph

25884 Commits

Author SHA1 Message Date
Alexander Udalov 5259af157a JVM IR: workaround correspondingPropertySymbol absence after deep copy 2019-09-16 14:57:21 +02:00
Alexander Udalov b782cf6bdb JVM IR: workaround KotlinTypeMapper usages in boxing optimization on inline classes 2019-09-16 14:57:21 +02:00
Alexander Udalov c425bd0e0b JVM IR: do not use KotlinTypeMapper in BuilderFactoryForDuplicateSignatureDiagnostics 2019-09-16 14:57:21 +02:00
Alexander Udalov 3a0c41dca4 JVM IR: do not use KotlinTypeMapper indirectly in CallableReferenceLowering 2019-09-16 14:57:21 +02:00
Alexander Udalov 26874a6e1e JVM IR: do not use KotlinTypeMapper in MethodSignatureMapper 2019-09-16 14:57:20 +02:00
Alexander Udalov ee976020bc JVM IR: add KotlinTypeMapperBase, do not use KotlinTypeMapper in metadata serialization 2019-09-16 14:57:20 +02:00
Alexander Udalov bd8ea9412d JVM IR: implement MethodSignatureMapper.mapFunctionName directly 2019-09-16 14:57:20 +02:00
Alexander Udalov 36c242764f JVM IR: implement MethodSignatureMapper.mapSignature directly
As well as mapFieldSignature, mapReturnType, mapAsmMethod and smaller
methods. This removes yet another dependency on KotlinTypeMapper in the
IR backend.
2019-09-16 14:44:16 +02:00
Alexander Udalov 46ced326b8 JVM IR: minimize usages of some methods in MethodSignatureMapper
Also do not pass useless parameters such as OwnerKind which is always
IMPLEMENTATION in the IR backend
2019-09-16 14:44:16 +02:00
Alexander Udalov 4dc1d61c38 JVM IR: do not remove overridden symbols in BridgeLowering
This information might be needed in subsequent lowerings or codegen. For
example, it'll be needed in MethodSignatureMapper to determine that we
need to box primitive return type if one of overridden functions has a
non-primitive return type.

For invoke in lambda classes specifically though, we need to remove this
override from the specialized invoke because otherwise we'd call a boxed
version in the bridge (see 73d2ae961c). In this change, we still keep
the override on a bridge though just for the sake of IR consistency.
2019-09-16 14:44:16 +02:00
Alexander Udalov 45929f57b6 Minor, add test on name mangling of private multi-file part members 2019-09-16 14:44:16 +02:00
Alexander Udalov 9d257a1ed8 JVM IR: generate call to checkNotNull in IrCheckNotNull since 1.4
#KT-22275
2019-09-16 12:33:01 +02:00
Dmitriy Novozhilov c8d087d744 [FIR] Tests. Save failed tests into testdata 2019-09-16 10:58:51 +03:00
Igor Yakovlev 27accbb089 Fix KotlinLintTestGenerated.testParcel + extensions registrations fixes 2019-09-13 19:40:31 +03:00
Vladimir Dolzhenko c3265a8bf0 Decrease Light classes code generation in multithreaded cases by guarding KotlinClassInnerStuffCache, LightClassDataHolder.ForClass cache values calculation with lock 2019-09-13 15:10:09 +02:00
Vladimir Dolzhenko d3d85d50ab Rewrite KotlinClassInnerStuffCache into Kt, p2 2019-09-13 15:09:02 +02:00
Vladimir Dolzhenko 6146b0eb53 Rewrite KotlinClassInnerStuffCache into Kt, p1 2019-09-13 15:08:40 +02:00
Dmitriy Novozhilov 8614323f80 [FIR] Tests. Update some outdated testdata 2019-09-13 12:21:59 +03:00
Dmitriy Novozhilov b76b4b0229 [FIR] Pass flow to local functions 2019-09-13 12:21:59 +03:00
Dmitriy Novozhilov e1947e6884 [FIR] Don't create synthetic calls for when with only one branch 2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov 43a873a2ec [FIR] Make SimpleFlow (old implementation) implement abstract Flow 2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov 60343c721c [FIR] Make Flow and LogicSystem abstract
It's needed for simple changing of different Flow implementations
2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov c19da5846c [FIR] Fix processing inPlace lambdas as named arguments 2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov 3ff185d36c [FIR] Dummy fix of lambda functions inside init block
Init still works not well, but now they at least don't fail
2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov 0e0e6da917 [FIR] Fix passing flow throw loops 2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov f77a414e93 [FIR] Fix passing flow throw try expression 2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov be58e95b2b [FIR] Replace Flow with DelegatingFlow 2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov 44571fbd8f [FIR] Minor. Extract methods used DataFlowInfo from DataFlowInferenceContext 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov 65edf73bee [FIR] Add node for enter to body of when branch 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov 531c2b9617 [FIR] Add supprot of InvocationKind.UNKNOWN for in-place lambdas 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov 2f6f07bc7d [FIR] Remove callbacks from stacks in DFA 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov beaab19eb9 [FIR] Replace ControlFlowGraphNodeBuilder with extensions on ControlFlowGraphBuilder 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov 15ff86fc50 [FIR] Refactor DataFlowVariables
Make inheritors of DataFlowVariable public, replace flags in DFV with types
2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov f9d45d2f2a [FIR] Some minor fixes in DFA after review 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov 6b7aa21b8f [FIR] Minor. Remove useless creating data flow variables for value parameters 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov cb1322eaef [FIR] Add smartcasts on implicit receivers 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov f8459f8201 [FIR] Fix result type of const expressions with expected type 2019-09-13 10:42:17 +03:00
Dmitriy Novozhilov 546bbceeea [FIR] Reduce coping of flow and inline default value of it 2019-09-13 10:42:17 +03:00
Dmitriy Novozhilov c2180b9361 [FIR] Move reporting of errors in modularized tests in separate log file 2019-09-13 10:42:17 +03:00
Simon Ogorodnik 375920da58 [FIR] Add gradle property for extending jvmArgs of modularized test 2019-09-12 18:06:47 +03:00
Dmitry Petrov cb13dd3cdd Add psi2ir tests for 'break' and 'continue' inside 'when' 2019-09-12 15:11:01 +03:00
Dmitry Petrov f3837e91e3 Add BE tests for 'break' and 'continue' inside 'when' 2019-09-12 15:11:01 +03:00
Dmitry Petrov f06f6f4660 Allow 'break' and 'continue' inside 'when' in 1.4+ 2019-09-12 15:11:00 +03:00
Pavel Kirpichenkov 55cb9561c2 Provide better error messages for read-only delegate
Split error reporting into two parts for incorrect and missing candidates.
Missing function error is not reported on provideDelegate.
Update error factory and default message for error.
Update error texts in quick fix test data.

#KT-16526 Fixed
2019-09-12 14:58:21 +03:00
Mikhail Zarechenskiy 7472c789c6 Add tests for obsolete issues
#KT-28001 Obsolete
 #KT-30236 Obsolete
2019-09-12 12:03:01 +03:00
Natalia Selezneva 8f2aaf62c2 Implement modification stamp for ScriptInitializer
This should influence ResolveElementCache to correctly update caches
because it rely on modifications stamps of the declaration
Before this change file.modificationStamp was used for script initializers in file, so they all became outdated after some change in file
2019-09-12 09:56:42 +03:00
Alexander Udalov d6cb857c97 JVM IR: don't use descriptors to map suspend function types 2019-09-11 23:33:11 +02:00
Alexander Udalov 34d2d7374c Do not use KotlinTypeMapper in enum values/valueOf intrinsic
Remove KotlinTypeMapper from inlineIntrinsics.kt completely
2019-09-11 23:33:11 +02:00
Alexander Udalov 8cdec31990 Do not use KotlinTypeMapper in coroutine inline intrinsics 2019-09-11 23:33:11 +02:00
Alexander Udalov d16bdded7f JVM IR: reuse JVM code for reified type parameter mappings instead of copy-paste 2019-09-11 23:33:11 +02:00