Commit Graph

88317 Commits

Author SHA1 Message Date
Ilya Chernikov ec2d6ea5f1 Restore script testing on both backends, fix some tests 2021-12-14 13:39:19 +03:00
Ilya Chernikov 670575696f Remove forced old backend for script compilation, using common default 2021-12-14 13:39:19 +03:00
Ilya Chernikov 6d6de9dd76 Implement tests for script instance capturing in the host tests 2021-12-14 13:39:18 +03:00
Ilya Chernikov 10c5071eda Implement backend error reporting on unsupported script capturing
#KT-30616 fixed
#KT-43995 fixed
#KT-19424 fixed
#KT-49443 fixed
2021-12-14 13:39:17 +03:00
Ilya Chernikov cb5e451e05 Implement script instance capturing in script lowering
for regular classes only. Reimplementing the main behavior of the
old BE and implementing few cases on top of it.
#KT-19423 fixed
2021-12-14 13:39:17 +03:00
Ilya Chernikov 87952d63a3 Rollback script related LDL changes...
to reimplement them properly in the script lowering
2021-12-14 13:39:16 +03:00
Hung Nguyen 586fa8af64 KT-45777: Shrink classpath snapshot incrementally
Currently, we shrink classpath snapshots at 2 steps:
  - Classpath diffing: Shrink the current classpath snapshot against
    the previous lookup symbols
  - Classpath snapshot saving: Shrink the current classpath snapshot
    against the current lookup symbols

With this commit, the shrinking at the second step is now incremental.
The shrinking at the first step is still non-incremental.
2021-12-14 13:10:08 +03:00
Steven Schäfer 4f3debdec6 [KAPT] Correct error types in annotations (KT-32596) 2021-12-14 11:31:25 +03:00
Yahor Berdnikau 701446ad25 Pin 'debug.keystore' in two additional android plugins
Also pin it for 'com.android.feature' and 'com.android.test' plugins.

^KT-45745 In Progress
2021-12-13 22:36:27 +03:00
Roman Artemev 312cbb6613 [JS IR IC] Add tests to check cache invalidation via fast path 2021-12-13 20:57:53 +03:00
Roman Artemev b719865c25 [JS IR IC] Implement fast path invalidation check
Compute library md5 hash and check it first with cached one. If hashes
are equal it means that cache is up-to-date and no additional checks are
needed

 - store library hashes (flat + trans) into cache info file
 - change invalidator return value
2021-12-13 20:57:52 +03:00
Roman Artemev 5ba6ca4c16 [TEST] Support module step directives in TestModel parser 2021-12-13 20:57:51 +03:00
Dmitry Petrov e47871f98b JVM_IR KT-50215 KT-50076 extra test 2021-12-13 20:34:57 +03:00
Ilya Goncharov 6adcbe081e [JS IR] Consider erasing type parameters in return type in js signatures 2021-12-13 16:16:59 +00:00
Ilya Goncharov 4f1a10d72e [JS] Uncomment test on afterTest 2021-12-13 15:29:27 +00:00
Dmitriy Dolovov e0daa96cae [Build] Avoid resetting of DefaultTestFilter.commandLineIncludePatterns 2021-12-13 18:14:43 +03:00
Ivan Kylchik b131c52889 Drop all usages of WITH_RUNTIME directive 2021-12-13 18:07:11 +03:00
Evgeniy.Zhelenskiy 1874318954 [Tests] Windows regeneration does not change tests 2021-12-13 17:54:15 +03:00
Dmitry Petrov df460a842b JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter 2021-12-13 14:13:34 +00:00
Dmitry Petrov 6f148c594f Revert "JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter"
This reverts commit 627d838343.
2021-12-13 14:13:33 +00:00
Mikhail Glukhikh df50a8141f FirCallCompleter: unwrap definitely not-null type properly
#KT-50180 Fixed
2021-12-13 16:24:59 +03:00
Mikhail Glukhikh febf336d23 IrConstTransformer: transform constants also inside call children 2021-12-13 16:24:59 +03:00
Mikhail Glukhikh 66231baa06 FIR2IR: pass annotationMode through arrayOf calls properly
#KT-50163 Fixed
2021-12-13 16:24:59 +03:00
Mikhail Glukhikh 09585d116e FirTypeIntersectionScope: fast success in isMoreSpecific 2021-12-13 16:24:58 +03:00
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