Commit Graph

88264 Commits

Author SHA1 Message Date
Evgeniy.Zhelenskiy f0af2487c7 [Tests] Replace @JvmInline with actual OPTIONAL_JVM_INLINE_ANNOTATION 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy 96334948f0 [Tests] Pass sample test without annotation with flag ValueClasses 2021-12-10 18:19:15 +03:00
Evgeniy.Zhelenskiy f92290dfdf [Tests] Generate runTest with transformer parameter + example 2021-12-10 18:19:15 +03:00
Nikolay Krasko faeb5d21ab Revert "[FE 1.0] Provide an API to clean compile time initializer cache for variable descriptor"
This reverts commit 0e6762acc3.
2021-12-10 16:54:55 +03:00
Nikolay Krasko 965bab2d2d Revert "Fix setCompileTimeInitializer usage in MemberDeserializer.kt"
This reverts commit 9281ab334a.
2021-12-10 16:54:55 +03:00
Aleksei.Cherepanov 8c3b1dc55a Improve performance of classloaders + small refactoring
During the initialization of the classloader, we preload some jar files, that are necessary for the compiler to work correctly. In this process of preloading classes, we unpack each jar file and look at the value of the Class-Path in its META_INF. So we will determine, which files are depends on by original jars. We will load the resulting jars in the next iteration of class preloading. Thus, we get nested classloaders. However, in practice, it turned out that the jar files needed for the second iteration were already loaded in the first iteration, so there is no point in loading them again. Moreover, if we do not find the class in the first loader, then we will not find it in the second either. However, the case, when there are some jars from Class-Path of original jars and they were not loaded by first iteration, does not change.
Aldo needed for KT-49786
2021-12-10 15:13:02 +03:00
Dmitriy Novozhilov 51473651cf Advance bootstrap to 1.6.20-dev-6737 2021-12-10 13:52:36 +03:00
Svyatoslav Scherbina 2664a4460b ObjCExport: test that completion is properly retained by continuation
Add a test that checks that Kotlin Continuation wrapping Objective-C
completion handler has strong reference to it, i.e. completion handler
doesn't get reclaimed too early.

Follow-up to 4dcfd38.
2021-12-10 10:35:36 +00:00
Svyatoslav Scherbina 59bae29d64 ObjCExport: add test for calling Unit-typed completion asynchronously
Follow-up to 4dcfd38.
2021-12-10 10:35:36 +00:00
Victor Petukhov d8366a2861 Don't use hardcoded getJdkHome's parameters as fallback in KtTestUtil.java 2021-12-10 10:23:50 +03:00
Mikhail Glukhikh e558575aec Fix FIR bootstrap: add explicit type arguments (see KT-49925) 2021-12-10 08:22:16 +03:00
Alexander Udalov a95375cd9f JVM IR: extract separate module backend.jvm.codegen
The main benefit is that now lowerings and codegen are compiled in
parallel, which speeds up the build. Hopefully, this will also improve
incremental compilation in case of implementation changes because the
rest of the compiler (cli & tests) has no "api" dependency on lowerings
and codegen.
2021-12-09 21:05:49 +01:00
Alexander Udalov 616cec8527 JVM IR: decouple JvmBackendContext from intrinsic implementation 2021-12-09 21:05:49 +01:00
Alexander Udalov 3582188faa JVM IR: move type/signature mapping to subpackage 'mapping' 2021-12-09 21:05:49 +01:00
Alexander Udalov 3c9e3b7ed4 JVM IR: remove most dependencies of common backend.jvm code on codegen 2021-12-09 21:05:48 +01:00
Alexander Udalov 166f09c409 JVM IR: move indy handle generation logic to MethodSignatureMapper
JvmInvokeDynamic.kt is a part of intrinsics which are going to be
moved into a separate module, which backend.lower won't depend on.
2021-12-09 19:59:42 +01:00
Alexander Udalov b0c5ea4717 JVM IR: remove dependencies of lowerings on codegen
Move out utilities which are used both in lowerings and codegen to
JvmIrUtils and JvmIrTypeUtils, and introduce new JvmIrCoroutineUtils and
JvmIrInlineUtils (probably can be renamed or moved somewhere more
appropriate in the future).
2021-12-09 19:59:42 +01:00
Yahor Berdnikau 8ed0c17ebd Fix warning message was not showing correct property name
Show this message only once per build.

^KT-48826 Fixed
2021-12-09 17:05:07 +00:00
Alexander Korepanov bf57e33713 [JS IR] Add an implicit cast to int32 for the shru operator
^KT-20791 Fixed
2021-12-09 14:10:03 +00:00
Victor Petukhov 9281ab334a Fix setCompileTimeInitializer usage in MemberDeserializer.kt 2021-12-09 17:07:07 +03:00
Alexander Korepanov a34c97ebd5 [JS IR] Generate context dependent names for anonymous objects and classes. 2021-12-09 13:56:25 +00:00
Artem Kobzar b1643075f2 fix(KT-50040): remove the corresponding symbol from top-level accessors. 2021-12-09 13:39:35 +00:00
Elena Lepilkina 611c402e59 [K/N] Fix building mimalloc with TSAN 2021-12-09 13:25:33 +00:00
Victor Petukhov 0e6762acc3 [FE 1.0] Provide an API to clean compile time initializer cache for variable descriptor 2021-12-09 16:15:24 +03:00
Tianyu Geng f197fc93db Analysis API: add test for KtDiagnosticsProvider 2021-12-09 15:56:52 +03:00
Tianyu Geng cd3827ca2e FIR checker: make FirMemberFunctionsChecker a function checker
There is no reason why this checker needs to be a class checker.
2021-12-09 15:56:50 +03:00
Tianyu Geng d80b809a40 FIR checker: remove inappropriate usage of FirFileChecker
This to conform with the contract expected by LL API that no file
checker should report diagnostics on its contained declarations
2021-12-09 15:56:47 +03:00
Dmitry Petrov 3017397960 JVM_IR fix string concatenation performance issues
KT-50080 KT-50084 KT-50140
2021-12-09 15:32:13 +03:00
Ivan Kochurkin fa41e0f5a9 [FIR2IR] Minor: reuse calculated expression 2021-12-09 12:31:25 +00:00
Ivan Kochurkin 522d2064bb [FIR2IR] Initialize fake overrides for callable references 2021-12-09 12:31:24 +00:00
Ivan Kochurkin f68c8f8f01 [FIR] Fix visibility issues with private members within inner and anonymous scopes ^KT-49992 Fixed 2021-12-09 12:31:24 +00:00
Ivan Kochurkin 800d594a4f [FIR] Check adding default error messages for all diagnostics ^KT-49973 fixed
Also, check for duplicates
2021-12-09 12:31:23 +00:00
Ivan Kochurkin 9f8387c76a [FIR] Fix 1.(fun Int.() = 1)() call fir conversion 2021-12-09 12:31:23 +00:00
Sergej Jaskiewicz 2fd8119a10 [JS IR] Add a test for converting arrays to String 2021-12-09 11:02:28 +00:00
Mikhael Bogdanov 7e99ba30f3 Remove obsolete USAGE_OF_JVM_DEFAULT_THROUGH_SUPER_CALL diagnostic
#KT-47000
2021-12-09 11:30:06 +01:00
Mikhail Glukhikh e591f79533 FIR2IR: fix origins for anonymous functions & lambdas 2021-12-09 13:26:41 +03:00
Mikhail Glukhikh a6d4f9c3b0 FIR: don't change explicitly given anonymous function type 2021-12-09 13:26:40 +03:00
Mikhail Glukhikh 533e802c8d FIR: support JVM_DEFAULT_WITH_COMPATIBILITY_* diagnostics (FE 1.0 sync) 2021-12-09 13:26:40 +03:00
Mikhail Glukhikh 178290eac3 FIR: drop JVM_DEFAULT_THROUGH_INHERITANCE diagnostic (FE 1.0 sync) 2021-12-09 13:26:39 +03:00
Mikhail Glukhikh e1ca5fe344 FIR2IR: apply suspend conversions also to varargs 2021-12-09 13:26:38 +03:00
Mikhail Glukhikh 8c7f659a32 Black box: drop WITH_RUNTIME or replace with WITH_STDLIB 2021-12-09 13:26:38 +03:00
Mikhail Glukhikh 0f4647d95e Black box: update/set FIR status for some new tests 2021-12-09 13:26:37 +03:00
Mikhail Glukhikh 9b42fab9de FIR2IR: properly support combinations of SAM/suspend conversions 2021-12-09 13:26:36 +03:00
Mikhail Glukhikh e574d3be27 FIR2IR: move SAM conversion operations to AdapterGenerator 2021-12-09 13:26:34 +03:00
Mikhail Glukhikh 5b058cfcdc FIR2IR: support RawType internal annotation 2021-12-09 13:26:32 +03:00
Jinseong Jeon f8a6ab9536 FIR LC: populate DefaultImpls if an interface has default implementations 2021-12-09 11:04:25 +01:00
Tianyu Geng b52dc15aa7 Analysis API: remove dispatch receiver type from XXXSubstitutionOverridesUnwrappingTest 2021-12-09 11:01:52 +01:00
Tianyu Geng 9153db2ecc FE1.0 Analysis API: rewrite KtFe10CallResolver 2021-12-09 11:01:52 +01:00
Tianyu Geng f1bd3597f8 FE1.0 Analysis API: make KtSymbol only reference declaration-site subst-overrides
This is the FE1.0 counterpart of fa8bb47bdf
2021-12-09 11:01:52 +01:00
Pavel Kunyavskiy b3be835c6f [K/N] Fix bug for function references with extension receiver
Was introduced while refactoring in 4b49356a
2021-12-09 09:45:49 +00:00