Commit Graph

88293 Commits

Author SHA1 Message Date
Ilya Goncharov 0aec48876f Commit package-lock.json in kotlin-test-it 2021-12-13 12:36:57 +00:00
Ilya Goncharov 89dfc4b589 Commit yarn.lock 2021-12-13 12:36:56 +00:00
Piotr Krzeminski ad85813136 Allow running Chrome headless with '--no-sandbox' flag
Without this, one has to define a file like `karma.config.d/karma.conf.js`
with contents:

```js
config.set({
    browsers: ['ChromeHeadlessNoSandbox'],

    customLaunchers: {
        ChromeHeadlessNoSandbox: {
            base: 'ChromeHeadless',
            // Needed to work on Jenkins. Otherwise, there's an error:
            // 'Running as root without --no-sandbox is not supported. See https://crbug.com/638180.'
            flags: ['--no-sandbox'],
        }
    }
});
```

This change allows staying 100% in Gradle config for such configuration.
With growing usage of Kubernetes, this flag becomes more and more
popular.

Ideally the Karma config API in Gradle could be more flexible, so that
e.g. someone that uses Chromium could also use `--no-sandbox` flag.
However, it's some bigger change that influnces the API, so I want this
change to be simple.

Related Slack thread: https://kotlinlang.slack.com/archives/C0B8L3U69/p1639133380172400
2021-12-13 11:45:51 +03:00
Sergej Jaskiewicz 41acdefce9 [JS IR] Treat char as inline class no matter how it's declared 2021-12-13 07:36:57 +00:00
Sergej Jaskiewicz 4f13717fea [IR] Use InlineClassesUtils in lowerings instead of IrClass.isInline
We do it because sometimes we want to treat a regular class as
an inline class. For example, in the Wasm backend we treat classes
with the `@WasmAutoboxed` annotation as inline classes. Also, in
the JS IR backend the `Char` class is declared as a regular class for
compatibility reasons, but we want it to be an inline class for
performance.
2021-12-13 07:36:56 +00:00
Sergej Jaskiewicz e5993ab594 [JS IR] [Wasm] Extract InlineClassesUtils into CommonBackendContext 2021-12-13 07:36:56 +00:00
Sergej Jaskiewicz 962ca40687 [JS IR] Pass JsIrBackendContext as non-nullable in some functions 2021-12-13 07:36:55 +00:00
Pavel Kunyavskiy 3a8b4059c9 [K/N] Disable cms for targets not supporting threads 2021-12-13 05:32:11 +00:00
Pavel Kunyavskiy 42aaa86f10 [K/N] Mark finalizing extra objects to avoid double finalizing
When new mark phase finished before previous finalization is done,
extra objects are still in list, which would be passed to finalize.
This could lead to unpredictable effects.

After this commit such objects are marked by new flag and ignored by
next gc runs.
2021-12-13 05:32:11 +00:00
Pavel Kunyavskiy ebca4d793f [K/N] Implement non-blocking approach for sweep 2021-12-13 05:32:10 +00:00
Pavel Kunyavskiy df4b367296 [K/N] Add cms related targets and compiler option 2021-12-13 05:32:10 +00:00
Pavel Kunyavskiy 03299023f1 [K/N] Copy stms GC to start cms development 2021-12-13 05:32:09 +00:00
Pavel Kunyavskiy dd2849b7e7 [K/N] Extract collecting root set to utils 2021-12-13 05:32:09 +00:00
Pavel Kunyavskiy 7373183e6f [K/N] Rework scheduler type choosing 2021-12-13 05:32:08 +00:00
Pavel Kunyavskiy b22dec062c [K/N] Optimize finalizing of simple extra objects
There is no need to delay ExtraObject deletion when it doesn't have
associated object. We can just remove it while iterating on them.
2021-12-13 05:32:08 +00:00
mvicsokolova ff3abf9fc0 Set JS environments for kotlinx-atomicfu-runtime module (#4680) 2021-12-12 22:53:42 +03:00
Ilya Gorbunov a829a6743d KT-50173 Fix Regex.escapeReplacement function in JS 2021-12-12 00:27:31 +00:00
Dmitry Petrov 81c805a754 JVM_IR KT-50171 add missing parent to temporary vals for proxy fun 2021-12-11 15:51:12 +00:00
Dmitry Petrov 627d838343 JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter 2021-12-11 08:04:26 +00:00
Dmitry Petrov 94bb465e62 JVM_IR KT-50076 don't null check moved dispatch receiver parameter 2021-12-11 08:04:26 +00:00
Evgeniy.Zhelenskiy b1d1f87318 [Tests] Introduce reversible source file preprocessor 2021-12-10 18:19:17 +03:00
Evgeniy.Zhelenskiy cb4ec932d7 [Tests] Introduce replacing source transformer 2021-12-10 18:19:17 +03:00
Evgeniy.Zhelenskiy 38ff3f5a24 [Tests] Fix Android test runner 2021-12-10 18:19:17 +03:00
Evgeniy.Zhelenskiy cd1d77e760 [Tests] Regenerate tests with correct postfix 2021-12-10 18:19:17 +03:00
Evgeniy.Zhelenskiy 2874462e3a [Tests] Introduce transformers functions object 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy af73034235 [Tests] Introduce runTest with transformer to old testing framework 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy c27b647ce8 [Tests] Native tests runTest applies source transformers 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy 9b196c738f [Tests] Generify transforming tests method model 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy e62c6e3eac [Tests] All tests correct generation 2021-12-10 18:19:16 +03:00
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