Commit Graph

86012 Commits

Author SHA1 Message Date
Roman Golyshev 1e91c66d19 [FIR IDE] Fix Always false condition in FirReferenceResolveHelper 2021-09-21 01:29:06 +03:00
Roman Golyshev 39116853d2 [FIR IDE] Implement pointers for JavaField and SyntheticJavaProperty symbols 2021-09-21 01:29:05 +03:00
Ilmir Usmanov b0088fd06d Minor. Ignore test on JS_IR 2021-09-20 21:29:58 +00:00
Ilmir Usmanov 91491eef06 Fixup end label of local variable if it is before start label
In that case, put end label to next label after start label.
2021-09-20 21:29:58 +00:00
pyos ade9f5a1e8 JVM: rename a couple ValueKinds to make their purpose clearer 2021-09-20 19:29:44 +02:00
pyos f786084a0a JVM_IR: mark direct uses of inline lambdas as conditionally suspend
They may or may not be inlined later.

IDK how the test passes when both modules are compiled with the old
backend - perhaps this has something to do with the fact that when `f`
is compiled with the IR backend, the call to `x()` is followed by `pop`
and `getstatic kotlin/Unit.INSTANCE`? This is probably why the original
issue in kotlinx.coroutines reports that everything works fine with
kotlinx-coroutines-core:1.4.3.

^KT-46879 Fixed
^KT-48801 Fixed
2021-09-20 19:29:44 +02:00
Igor Yakovlev 41a69ad388 [WASM] Add receiver capturing to callable references 2021-09-20 19:08:22 +03:00
Igor Yakovlev b8d11f7938 [WASM] Add text section to implement debug info 2021-09-20 19:08:21 +03:00
Dmitriy Novozhilov 8286927e8c [FIR] Support .jar output with -Xuse-fir flag
To proper support we need to fully implement main function detector,
  see KT-44557

^KT-42868 Fixed
2021-09-20 15:29:45 +03:00
Abduqodiri Qurbonzoda 9a5a3bfdfb Advance kotlin.browser and kotlin.dom packages deprecation level to ERROR #KT-39330 2021-09-20 12:28:07 +00:00
Abduqodiri Qurbonzoda 93833f7db2 Advance K/N StringBuilder.appendln() deprecation level to ERROR #KT-38754 2021-09-20 15:25:53 +03:00
Pavel Kunyavskiy c704fd6ae7 [K/N] Support stacktrace using libbacktrace 2021-09-20 11:28:08 +00:00
Pavel Kunyavskiy 4fa5be3e58 [K/N] Patch libbacktrace to support finding dsyms for framework 2021-09-20 11:28:08 +00:00
Pavel Kunyavskiy 8a6b997559 [K/N] Patch libbacktrace to work in ios simulator. 2021-09-20 11:28:07 +00:00
Pavel Kunyavskiy 45317ca221 [K/N] Patch libbacktrace for columns support 2021-09-20 11:28:07 +00:00
Pavel Kunyavskiy 91dd9dc9b0 [K/N] Add libbacktrace 2021-09-20 11:28:06 +00:00
Pavel Kunyavskiy a5f3b087a4 [K/N] Change getSourceInfo signature to allow returning several frames 2021-09-20 11:28:06 +00:00
Dmitriy Novozhilov 0923d39215 [Build] Setup useFirForLibraries flag 2021-09-20 14:18:18 +03:00
Roman Artemev 0bfc88fad0 [JS IC] Implement test infra for incremental caches 2021-09-20 12:23:36 +03:00
Roman Artemev c692b0b2e0 [JS IC] Make EPs for cache generation and test 2021-09-20 12:23:36 +03:00
Roman Artemev 7f424732bf [JS IC] Make API to store d.ts and sourceMap IC data 2021-09-20 12:23:35 +03:00
Roman Artemev f85a59b7f3 [JS IC] Write cache info in per-file mode too
- make sure that file is existed and not crashes the compiler
2021-09-20 12:23:35 +03:00
Roman Artemev a55be02007 [JS IC] Support binary ast in disk cache 2021-09-20 12:23:34 +03:00
Pavel Punegov 0b2a8c0c25 [K/N][Test] Ignore test with deprecated StringBuilder.deleteCharAt 2021-09-20 12:16:54 +03:00
Svyatoslav Scherbina b656d67bd4 [Gradle, Native, IT] Workaround NativeEmbeddableCompilerJarIT on Apple silicon
The tests fail on Apple silicon because Gradle plugin doesn't provide
run tasks for macosArm64 (KT-48649).

Workaround this by making the tests execute link task instead of run.
2021-09-20 08:36:25 +00:00
Alexander Dudinsky 064cffc89c Move mavenLocal() to the first place 2021-09-20 08:36:25 +00:00
Alexander Dudinsky 7db1b6fe01 Fix some tests in Gradle Integration Tests Native Mac Arm64 2021-09-20 08:36:25 +00:00
Alexander Dudinsky c4a9d7b74d Fix Gradle Integration Tests Native Mac x64 2021-09-20 08:36:24 +00:00
Alexander Dudinsky 85f985b9d1 Fix test name for multiModulesHmpp project
^KT-48696 Fixed
2021-09-20 11:28:08 +03:00
Alexander Dudinsky 165b80cf02 New test for multiModulesHmpp project
^KT-48696
2021-09-20 08:22:50 +00:00
Ilya Matveev 35ff131608 fixup! fixup! [K/N][New MM] Disallow getting thread data for detached threads 2021-09-20 07:28:58 +00:00
Ilya Matveev 474b2fc90e [K/N][New MM] Fix getting current thread data in thread suspension 2021-09-20 07:28:57 +00:00
Ilya Matveev bfc4ff6343 [K/N][New MM] Disallow getting thread data for detached threads
This patch fixes a performance degradation introduced by
99bd26c2ef (Switch thread states
in termination handlers).
2021-09-20 07:28:57 +00:00
Igor Chevdar 3a4e8e7a61 [K/N][IR] Used .isFakeOverride instead of a special origin 2021-09-18 19:46:09 +05:00
Steven Schäfer dc568426bd Parcelize: Allow IgnoredOnParcel annotations on object properties 2021-09-18 00:26:16 +02:00
Steven Schäfer ae27be16eb AsmLikeInstructionListingTest: Print owner for FieldInsnNode 2021-09-18 00:25:58 +02:00
Igor Laevsky e23b4df519 [WASM] Remove workaround for frontend bug 2021-09-17 19:17:45 +03:00
Alexander Udalov 987a346015 JVM IR: support cyclic module dependencies
The only way to make the compiler compile several modules with a
dependency loop is via the "build file", given by -Xbuild-file and used
in the JPS (IntelliJ built-in build system) plugin.

For the old frontend/backend it works like this: we _analyze_ sources of
all modules once, as if it's one big module, and then for each module,
we _generate_ (invoke backend) only sources of that module. Backend
needs to be invoked separately per-module because every module has its
own destination directory specified in the build file.

For JVM IR, this separation into just two steps, analyze and generate,
was problematic because there's psi2ir, which works like frontend, in
that it needs the global analysis result to be able to create and link
IR correctly. So, in case of JVM IR, we need to run psi2ir on the whole
module after analysis and before generation.

In this change, psi2ir is run on the whole module via
`CodegenFactory.convertToIr` (which does nothing in the old backend),
and then parts of the resulting IR module are extracted according to the
original separation of the combined module into individual modules via
`getModuleChunkBackendInput` by matching IrFile against KtFile. And
then, backend is run for each such module.

 #KT-45915 Fixed
 #KT-48668 Fixed
2021-09-17 17:39:49 +02:00
Alexander Udalov 5d6ca27c93 JVM IR: introduce CodegenFactory.convertToIr
The steps of psi2ir and JVM backend need to be separated in the API
because in case of cyclic module dependencies (which are allowed in JPS)
psi2ir should be run first on all sources, and then JVM backend on each
module separately. `CodegenFactory.convertToIr` does nothing in the old
backend.

Also, move the ignoreErrors to GenerationState for simplicity.
2021-09-17 17:39:48 +02:00
Dmitriy Novozhilov bfeb9c219d [FE 1.0] Correctly set USED_AS_EXPRESSION for unreachable catch clauses
^KT-48806 Fixed
2021-09-17 18:38:19 +03:00
Tianyu Geng 9ca8d39240 FIR IDE: use KtVariableWithInvokeFunctionCall for extension invoke 2021-09-17 17:27:53 +02:00
Tianyu Geng c19ed07fd1 FIR IDE: add cache in KtFirCallResolver 2021-09-17 17:27:52 +02:00
Tianyu Geng d2ed203528 FIR IDE: Add substitutor to KtCall 2021-09-17 17:27:52 +02:00
Tianyu Geng 9f0f1781c9 FIR IDE: add validity token to KtCall 2021-09-17 17:27:52 +02:00
Tianyu Geng 245c4082cd FIR IDE: add KtSubstitutor 2021-09-17 17:27:52 +02:00
Nikolay Lunyak ba8dc49a31 [FIX] Move backing field bytecodeListing tests to a separate folder 2021-09-17 15:29:35 +03:00
Nikolay Lunyak 54067628ff [FIX] Add a checker for unsupported explicit backing fields 2021-09-17 14:36:39 +03:00
Nikolay Lunyak 7921e64540 [FIX] Add the ExplicitBackingFields language feature 2021-09-17 14:36:39 +03:00
Dmitry Gridin 9ceb477523 [light classes] fix cache value creation
Cause: we are implicitly wrapping `jvmDefaultMode` that leads to
incorrect result

^KTIJ-19042 Fixed
^EA-357501 Fixed
2021-09-17 03:49:38 +00:00
Tianyu Geng 765cad8448 FIR checker: substitute type parameters in dispatch receiver type
Consider the following code:

```
fun test(a: List<String>) {
  a.first()
}
```

The dispatch receiver type of `first` in this case is `List<T>` before
this change. After this change, it's `List<String>`.

In addition, this change also replace the dispatch receiver type with
the more specific type if available. For example, consider the following

```
class MyList: ArrayList<String>()

fun test(a: MyList) {
  a.get(0)
}
```
The dispatch receiver type of `get` is `MyList`, instead of
`ArrayList<String>`. That is, a fake override is created in this case.
2021-09-17 01:59:06 +03:00