Commit Graph

71944 Commits

Author SHA1 Message Date
Ilmir Usmanov 952576e98f JVM_IR: Do not unbox Result parameter if it not only one inline class
parameter, since in this case, the compiler generates a bridge, where
the result is unboxed.
2021-01-20 18:30:00 +01:00
Ilmir Usmanov d48f92775b JVM_IR: Do not unbox Result parameter in invoke if there is a bridge
since the bridge unboxes it.

 #KT-44141 Fixed
2021-01-20 18:29:58 +01:00
Ilya Goncharov 0ddb603eaa [JS IR] Fix of test with method in abstract class calling extension on super type 2021-01-20 20:01:42 +03:00
Steven Schäfer 9c4f8f7e54 JVM IR: Fix signature mapping for inline classes using new mangling
When resolving inline class methods in binary dependencies we look for
methods matching both the new and the old mangling scheme. On the IR
backend the method signature has to be computed for the inline class
replacement, since the logic for signature mangling is not contained in
the method signature mapping, unlike in the old backend.
2021-01-20 17:43:41 +01:00
Mikhael Bogdanov 91717cdcdd Perform inline checks in IR tests 2021-01-20 15:23:09 +01:00
Mikhael Bogdanov 216b775095 Remove obsolete code 2021-01-20 15:23:09 +01:00
Mikhael Bogdanov 147d60523d Generate inline function arguments with parameters types
#KT-44429 Fixed
2021-01-20 15:23:08 +01:00
Ilya Goncharov 50ab9ed054 [JS IR] Add test on interface with default method calling extension method on super-interface
^KT-42176 fixed
2021-01-20 14:26:38 +03:00
Pavel Kirpichenkov 5c28762c02 Fix check for local classes in approximating string table
Take local/anonymous classes and their inner classes into account.
Simplify approximation: use first available super classifier instead
of first super class. This approximation should only happen for
private declarations that were not previously approximated by frontend.
So basically the only requirement for the approximated types is to be
denotable. Note that this only works if the types are not used later.
JVM uses a different string table implementatin as it needs exact
types of private members for reflection.

^KT-20996 Fixed
2021-01-20 11:05:53 +03:00
Pavel Kirpichenkov b66f5c8180 Drop type aliases for JS and KLIB string tables
They used to use the same approximation logic anyway
^KT-20996
2021-01-20 11:05:53 +03:00
Pavel Kirpichenkov 2f3f75b512 Fix local anonymous class name error in K2MetadataCompiler
Extract the logic of approximating to denotable class supertype
from JS/KLIB and use it in metadata compiler.

^KT-20996 In Progress
2021-01-20 11:05:53 +03:00
Pavel Kirpichenkov b82a44fa63 Add test for KT-20996 2021-01-20 11:05:53 +03:00
Ilmir Usmanov cce9469e6a JVM_IR: Do not unbox Result parameter in Result methods
#KT-44140 Fixed
2021-01-20 06:27:15 +01:00
Sergey Shanshin 10d9259df5 Returned support for nullable types by not null serializers
Fixes Kotlin/kotlinx.serialization#1265
2021-01-19 20:44:47 +03:00
Ilmir Usmanov b476f1cc3e Minor. Change test to use the feature instead of suppressing error 2021-01-19 16:03:33 +01:00
Ilmir Usmanov d1ee45b518 Add language feature for suspend functions in fun interfaces
Since in 1.5 JVM_IR is enabled by default and supports suspend functions
in fun interfaces, it is safe to enable the feature by default as well.
2021-01-19 16:03:31 +01:00
Yaroslav Chernyshev 6aa6f82c47 Fix MultiplatformModelImportingContextImpl#isOrphanSourceSet predicate 2021-01-19 17:28:15 +03:00
Svyatoslav Kuzmich cf228bebc3 Use static year range in copyright of generated FIR and tests
Dynamically calculating a year is problematic, especially in cases like
FIR where generation happens in every build. When you are working on a
last year's commit, each build creates a bunch of uncommited
 changes of updating the year in copyrights.
2021-01-19 17:17:31 +03:00
Svyatoslav Kuzmich ba8223218f [Wasm] Add inline property accessors optimization 2021-01-19 17:08:58 +03:00
Svyatoslav Kuzmich 2aa3c197a3 [Wasm] Use non-persistent IR to speed up tests 2021-01-19 17:08:05 +03:00
Ilya Kirillov 11a3126c8c FIR: copy class supertypes list on iterating while calculating supertypes
This list is backed by mutable list and during iterating on it
we can resolve supertypes of that class via IDE light classes
as IJ Java resolve may resolve a lot of stuff by fir light classes
This causes ConcurrentModificationException
2021-01-19 14:34:57 +01:00
Vyacheslav Gerasimov a0ad85e20d Build: Disable caching of test tasks
Until `KTI-464 Test tasks with failed tests are cached` is resolved
2021-01-19 14:19:05 +03:00
Sergey Bogolepov 284d42fd2b Use camelCase for cacheKind control property
Because it is more intuitive for end-users.
2021-01-19 17:31:45 +07:00
pyos 29f95c7df2 FIR: improve inference of implicit type arguments in casts
Type parameters do not necessarily match one-to-one, or preserve order.
2021-01-18 18:01:03 +03:00
sebastian.sellmair acdc1f532b Rewrite CommonizerTask params to fix ^KT-42098 2021-01-18 14:57:18 +00:00
Shagen Ogandzhanian 23332bac13 More precise message for "this test can be unmuted" 2021-01-18 12:51:23 +01:00
Vladimir Dolzhenko 6331a135c8 Add LightClassUtil.getLightClassMethodsByName to avoid resolving all lightClassMethods and filtration later on 2021-01-18 11:13:16 +00:00
Ilmir Usmanov 167bfcf6ea Minor. Remove accidentally added bunch file 2021-01-18 10:14:11 +01:00
Sebastian Sellmair bf5feb1b4a Remove KotlinMetadataTarget's KotlinTargetComponent in favour of KotlinSoftwareComponent.kt
^KT-44322 fixed
2021-01-18 08:49:30 +00:00
Mikhail Glukhikh 9a5791ad6d FIR: use correct context for enum entry resolve
Now the same resolve context is used for enum entries and
for constructors.
2021-01-18 08:34:46 +03:00
Mikhail Glukhikh f85fc47383 FIR: introduce separate companion object resolve context
Before this commit, during the resolve of companion objects we used
the same context than for any nested class. However, during companion
object resolve we should not have companion object receiver itself
accessible in any case (in particular, it should not be accessible
in constructor). So in this commit we introduced separate context
for this purpose.
2021-01-18 08:32:06 +03:00
Mikhail Glukhikh f282c3e547 Cleanup: FirTowerResolveTask 2021-01-18 08:28:49 +03:00
Mikhail Glukhikh 9f06c1a500 FIR cleanup: runResolverForDelegatingConstructor 2021-01-18 08:28:37 +03:00
Mikhail Glukhikh 6cee4e968e [FIR] Don't call componentX for anonymous destructuring entry 2021-01-18 08:28:15 +03:00
Mikhail Glukhikh 795bd26eaf FIR bootstrap: don't use -Werror in useFIR mode 2021-01-18 08:28:05 +03:00
Mikhail Glukhikh 3787018e40 [FIR] Fix parameter index storage in contract serializer 2021-01-18 08:28:01 +03:00
Mikhail Glukhikh 12caf5d743 Fix test BE JvmBoxRunner to be able to see FIR BB tests exceptions 2021-01-18 08:27:51 +03:00
Dmitry Petrov 0c463d3260 KT-44378 don't generate no-arg constructor for sealed classes 2021-01-15 22:31:01 +03:00
Dmitriy Dolovov ee93efc19d [Commonizer] Avoid leaking non-commonized types as arguments in short-circuited TAs 2021-01-15 22:01:56 +03:00
Ilya Kirillov 8fa848bed3 FIR IDE: fix testdata after rebase 2021-01-15 17:23:12 +01:00
Ilya Kirillov 459c919072 FIR IDE: introduce JAVA_SYNTHETIC_PROPERTY symbol origin 2021-01-15 17:23:12 +01:00
Ilya Kirillov a5e6c1d82b FIR IDE: implement new getTopLevelFunction(/property)Symbols in FirModuleWithDependenciesSymbolProvider 2021-01-15 17:23:11 +01:00
Ilya Kirillov 450ab33f16 FIR IDE: do not highlight by-name argument as parameter 2021-01-15 17:23:11 +01:00
Ilya Kirillov 16cd2f08fe FIR: preserve delegatedTypeRef when transforming FirFunctionTypeRef 2021-01-15 17:23:11 +01:00
Ilya Kirillov b405cbb1ff FIR IDE: consider synthetic functional interfaces to have LIBRARY origin 2021-01-15 17:23:10 +01:00
Ilya Kirillov 981f932033 FIR IDE: ignore synthetic references in reference resolve 2021-01-15 17:23:10 +01:00
Ilya Kirillov 087840122a FIR: mark FirBuiltinSymbolProvider with ThreadSafeMutableState
It has mutable cache in BuiltInsPackageFragment
2021-01-15 17:23:09 +01:00
Ilya Kirillov 56bd6a30b3 FIR IDE: introduce delegated symbol origin 2021-01-15 17:23:09 +01:00
Ilya Kirillov 2a9779cd89 FIR IDE: resolve reference to intersection override member to overridden members 2021-01-15 17:23:09 +01:00
Ilya Kirillov 95eb701f75 FIR: introduce symbols for intersection override 2021-01-15 17:23:08 +01:00