Commit Graph

27007 Commits

Author SHA1 Message Date
Dmitriy Novozhilov e7f8c8e155 [TEST] Regenerate tests after previous commit 2019-12-12 16:11:45 +03:00
Dmitriy Novozhilov 5b1f96ba1b [TEST] Add ability to exclude some testdata with pattern in test generator 2019-12-12 16:11:42 +03:00
Dmitriy Novozhilov ae15fa7676 [FIR] Fix outputs for logs of modularized test 2019-12-12 16:11:42 +03:00
Georgy Bronnikov bb301f8aca JVM_IR: fix wrong check in skipping captured vars 2019-12-12 15:38:18 +03:00
Mikhael Bogdanov 26032e4297 Split exception table on finally insertion before non-local return
in nested try blocks without finally

 #KT-31653 Fixed
2019-12-12 13:33:40 +01:00
Mikhael Bogdanov c335015c05 Generate proper exception table
Don't forget to split nested try blocks without finally block
 on generating finally blocks from outer ones.

 #KT-31923 InProgress
2019-12-12 13:33:39 +01:00
Igor Chevdar 078cfc02a5 [IR] Removed wrong validation
IrEnumConstructorCall behaves differently whether it is inside IrEnumEntry or not.
Remove the validation for now.
2019-12-12 15:05:47 +03:00
Alexander Udalov 5f367278c1 Psi2ir: support generic properties in class delegation
Since property accessor descriptors (unlike corresponding IR elements)
do not have type parameters, we need to take them from the corresponding
property to ensure the correct IR for delegated property accessors.
2019-12-12 15:02:32 +03:00
Alexander Udalov 025360edc4 JVM IR: lookup symbols by name in ProgressionHandlers in known classes only
Alternatively, we could improve the lookup utilities and their usages to
always find the exact override of a symbol from
Collection/Iterable/CharSequence/etc, but since we need to load the
original symbol anyway in cases when the loop subject's type is a type
parameter, we might as well simplify everything and always reference the
original symbol.

Also improve exception message and removed unused declarations in
IrBackendUtils.kt.
2019-12-12 14:55:47 +03:00
Dmitriy Dolovov 18117ed1f3 [Commonizer] Serialize commonized metadata for KLIB writer
- introduce EmptyDescriptorTable
- wipe out unused BindingContext from KlibMetadataSerializer
2019-12-12 14:52:02 +03:00
Dmitriy Dolovov ce376f49fd [Commonizer] CLI for Kotlin/Native KLIBs 2019-12-12 14:51:55 +03:00
Dmitriy Dolovov a74e364849 [Commonizer] Support Kotlin/Native forward declarations 2019-12-12 14:51:29 +03:00
Dmitriy Novozhilov 53480c2266 [FIR] Fix fir2ir testdata broken in 4777dd6 2019-12-12 10:04:12 +03:00
Pavel Kirpichenkov d9ef7d0c8a [NI] Update / mute diagnostics
Update diagnostics for new inference.
'Not enough information for parameter' should not be reported for
fake calls and functions with error return type, muted in tests.
2019-12-11 17:53:43 +03:00
Simon Ogorodnik ebc1562b32 Filter out non-xml model files in modularized test 2019-12-11 17:21:02 +03:00
Simon Ogorodnik 48a05e3688 Support prefixed modularized test-data installation 2019-12-11 17:21:01 +03:00
pyos 498b41b148 JVM_IR: do not do invokeinterface on Object methods
This works on HotSpot, but might confuse other VMs.
2019-12-11 15:09:37 +01:00
Ilmir Usmanov df0a86ea57 Add NOP as first instruction in coroutine's try blocks
#KT-35035 Fixed
2019-12-11 15:01:41 +01:00
Mark Punzalan 4777dd652b [FIR] Add tests to catch issues with smartcasting of accesses to functions
and properties (type information is stored for the symbol and ALL accesses
to the same symbol are smartcasted).
2019-12-11 16:57:41 +03:00
Mark Punzalan f031b47363 [FIR] Fix issue with multiple smartcasts of this. 2019-12-11 16:57:41 +03:00
Mark Punzalan 91f97fa611 [FIR] Support FirCheckNotNullCall in HTML dump. 2019-12-11 16:54:15 +03:00
Mark Punzalan 6e00df06e8 [FIR] Add data flow analysis for FirCheckNotNullCall. 2019-12-11 16:54:15 +03:00
Mark Punzalan 692a83f7bb [FIR] Add FirCheckNotNullCall converted to CHECK_NOT_NULL intrinsic
function call.
2019-12-11 16:54:15 +03:00
Mikhael Bogdanov 8225c5a9ce Remove obsolete logic to IS_BUILT_WITH_ASM6 2019-12-11 13:49:34 +01:00
victor.petukhov a92f58b1ac Revert "NI: Prefer nullable lower bound to flexible one when substitution of type variable is performed ^KT-32435 Fixed"
This reverts commit 09c2b92b
2019-12-11 15:32:46 +03:00
Ilya Chernikov 354be2b14f [minor] Change expression evaluation cli argument to -Xexpression 2019-12-11 12:20:49 +01:00
Yan Zhulanow ce21a55943 Debugger: Add IR-powered ranking tests 2019-12-11 20:04:03 +09:00
Mikhail Glukhikh 038ec8edcf Rethrow ProcessCanceledException in FIR resolve
Before this commit, we catched all exceptions at some points
and wrap them. For ProcessCanceledException it's incorrect,
because IDE logic does not expect wrapping of ProcessCanceledException
2019-12-11 13:01:38 +03:00
Victor Petukhov 09c2b92b1d NI: Prefer nullable lower bound to flexible one when substitution of type variable is performed
^KT-32435 Fixed
2019-12-11 12:15:02 +03:00
pyos 78dfcef160 JVM_IR: move generateParameterNames to FunctionCodegen.kt 2019-12-11 08:19:55 +01:00
pyos 13a2879b78 JVM_IR: generate more correct parameter metadata 2019-12-11 08:19:55 +01:00
Igor Yakovlev 6792d22c31 Fix minor bugs for UL methods and parameters representation
Remove INSTANCE field for local object declarations
Remove private suspend functions create from UL
Add correct extension function parameter name
Add support for setparam annotation modifier
2019-12-10 18:26:08 +03:00
Georgy Bronnikov 094de9fb5e IR: Do not capture variables from method calls in ClosureAnnotator
To call a method of a class, you never need to supply any values of
local variables (they would always be provided to the constructor).
2019-12-10 17:31:12 +03:00
Mikhail Glukhikh 344bc33096 [FIR TEST]: add problematic test with WeakHashMap.get ambiguity 2019-12-10 16:25:01 +03:00
Denis Zharkov f0298aad77 FIR: Refine SAM support for methods with names from j.l.Object 2019-12-10 14:21:21 +03:00
Denis Zharkov e89c777fc6 FIR: Create DefinitelyNotNull only for annotated types 2019-12-10 14:21:21 +03:00
Mikhail Glukhikh edf5675415 [FIR TEST]: add problematic test with covariant array as receiver 2019-12-10 12:58:40 +03:00
Mikhail Glukhikh 7d62e3ce56 FIR: fix hasTopLevelClassOf optimization in deserialized provider
Before this commit, we answered 'no top level class' if Java class finder
could not calculate known class names. However, it's incorrect,
because this situation means 'don't actually know'.

To precise semantics, function name was also inverted
2019-12-10 12:58:39 +03:00
Mikhail Glukhikh 83ccd7dd1c FIR: implement separate diagnostic collector/reporter for IDE 2019-12-10 12:58:38 +03:00
Mikhail Glukhikh fbf1dbf2da FIR: introduce error message renderer 2019-12-10 12:58:38 +03:00
Mikhail Glukhikh e07b85ff34 FIR Java providers: insert some protection against ProcessCanceledException 2019-12-10 12:57:57 +03:00
Dmitriy Novozhilov 00112d4227 [FIR] Copy receiver of delegateProvider in fir building
There was a problem that receiver of `delegateProvider` and `expression` field
  of `FirWrappedDelegateExpression` was the same object, so after some changes in
  FirCallCompletionResultsWriterTransformer (where call was partially completed and then
  copied) there was a problem with resolve of `delegateProvider`, because reference of it's
  receiver had resolved reference, but type arguments were unsubstituted (see
  `testCommonCaseForInference`).

Maybe there is a better solution. E.g. we can transform type arguments in completion, so we don't need coping of function call at all
2019-12-10 12:25:42 +03:00
Dmitriy Novozhilov 51560f2f17 [FIR] Fix order of resolving children of FirProperty 2019-12-10 12:25:42 +03:00
Dmitriy Novozhilov e281d224a3 [FIR] Fix testdata broken in b76c984b 2019-12-10 12:25:42 +03:00
Dmitriy Novozhilov a89e9966e6 [FIR] Fix call completion of complex constant expressions with integer contants 2019-12-10 12:25:42 +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
Dmitriy Novozhilov 4f3ff84d30 [FIR] [TMP] Complete lambdas that are not part of some call 2019-12-09 15:02:41 +03:00
Dmitriy Novozhilov e560a67a89 [FIR] Resolve this reference in delegating constructors 2019-12-09 15:01:54 +03:00
Dmitriy Novozhilov 583e07b3e4 [FIR] Don't analyze properties twice 2019-12-09 13:31:39 +03:00