Commit Graph

95616 Commits

Author SHA1 Message Date
sebastian.sellmair c332c928fc [Gradle][MPP] Refine naming for KotlinTargetHierarchyBuilder
^KT-53570 Verification Pending
2022-10-24 14:34:49 +00:00
sebastian.sellmair 1a519a8159 [Gradle][MPP] Add test cases for KotlinTargetHierarchy*
^KT-53570 Verification Pending
2022-10-24 14:34:49 +00:00
Sebastian Sellmair da8a18920d [Gradle][MPP] Mark KotlinTargetsContainer and KotlinTargetHierarchyBuilder with KotlinTargetsDsl annotation
To prevent confusing shortcuts defined on `KotlinTargetsContainer`
when declaring a KotlinTargetHierarchy:

e.g.

```kotlin
kotlin {
    targetHierarchy.default {
        common {
            ios() // <- [DSL_SCOPE_VIOLATION]
            //'fun ios(): Unit' can't be called in this context
            // by implicit receiver. Use the explicit one if necessary
        }
    }
 }
```

^KT-53570 Verification Pending
2022-10-24 14:34:48 +00:00
Sebastian Sellmair 0c114b9664 [Gradle][MPP] CommonizerHierarchicalIT: Use targetHierarchy API
^KT-53570 Verification Pending
2022-10-24 14:34:48 +00:00
Sebastian Sellmair e84dac45d7 [Gradle][MPP] Update kotlin-gradle-plugin-api api reference
^KT-53570 Verification Pending
2022-10-24 14:34:48 +00:00
Sebastian Sellmair 1823e0fad4 [Gradle][MPP] KotlinTargetHierarchyBuilderImpl: only build child groups if explicitly included
^KT-53570 Verification Pending
2022-10-24 14:34:47 +00:00
Sebastian Sellmair 487368d9df [Gradle][MPP] KotlinTargetHierarchyDescriptor: Remove function supertype
^KT-53570 Verification Pending
2022-10-24 14:34:47 +00:00
Sebastian Sellmair a8a861e1ce [Gradle][MPP] KotlinTargetHierarchyBuilder: implement w/ include & exclude predicates
^KT-53570 Verification Pending
2022-10-24 14:34:47 +00:00
Sebastian Sellmair c5d6162578 [Gradle][MPP] Implement initial KotlinTargetHierarchy APIs
^KT-53570 Verification Pending
2022-10-24 14:34:46 +00:00
Ivan Kylchik 1fc2575052 Use correct toString method in IrCompileTimeChecker for analysis 2022-10-24 13:14:16 +00:00
Ivan Kylchik 5b16b2c71e Properly verify args in string concatenation expression for interpreter
If string concatenation contains object value, then this argument
will not have explicit toString call. We must find and check toString
method manually.

#KT-54615
2022-10-24 13:14:16 +00:00
Alexander Udalov c813e03c1e Kapt+JVM_IR: do not generate nested enum as final
#KT-54187 Fixed
2022-10-24 12:48:22 +00:00
Dmitriy Novozhilov 766a51069c Advance bootstrap to 1.8.20-dev-1438 2022-10-24 12:24:40 +00:00
Alexander Korepanov 39666dafa5 [JS IR] Make JS IR IC info messages more pretty and usable 2022-10-24 12:05:05 +00:00
Anton Lakotka f5d9819c3f [Gradle] Update watchosDeviceArm64 target preset
^KT-54583 Verification Pending
2022-10-24 11:20:52 +00:00
Anton Lakotka fe2ee9886d [Gradle] watchosDeviceArm64 should not run simulator tests
This reverts commit 640ba1ec

^KT-54583 Verification Pending
2022-10-24 11:20:51 +00:00
Pavel Punegov 259d58c817 [K/N] Rename jsIr preset usage back to js
Merge-request: KT-MR-7467
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2022-10-24 10:44:23 +00:00
Artem Kobzar 14e4febb05 [K/JS] Exclude default from the regular reserved keywords to give ability to export declarations with default export ^KT-54480 Fixed
fix(KT-54480): exclude default from the regular reserved keywords to give ability to export intities with default export.

Merge-request: KT-MR-7459
Merged-by: Artem Kobzar <Artem.Kobzar@jetbrains.com>
2022-10-24 10:12:30 +00:00
Yahor Berdnikau 57578b569e Substitute stdlib-jdk7{,8} dependencies with stdlib
Only when dependencies contain kotlin-stdlib-1.8+ dependency. Such
substitution could be disabled via 'gradle.properties' by adding 'kotlin
.stdlib.jdk.variants.substitution=false'.

^KT-54136 Fixed
2022-10-24 09:21:22 +00:00
pyos 65c153a722 JVM: consider casts of null to be redundant
These should only have ever been necessary for field type inference in
coroutines, which should have been fixed by 0fc676a20c.

Unlike 903a5d69a4, this time the change is in an optimization pass.
Advantage: optimization passes have a closer to the JVM view of the
bytecode, which makes this change significantly more likely to be correct.
Disadvantage: technically we don't really guarantee optimization passes
other than FixStack will run at all. For KT-54581 this is 100% fine
since the problem itself is caused by redundant checkcast elimination in
the first place (otherwise there would've been a redundant cast to
String), but for KT-53146 this means the fix is somewhat incidental and
not necessarily guaranteed.

^KT-53146 Fixed
^KT-54581 Fixed
2022-10-24 11:11:21 +02:00
vladislav.grechko 6f4a60ac91 Fix equality comparison for inline class over inline class
^KT-54536: Fixed
2022-10-21 21:17:40 +00:00
vladislav.grechko db133bedf9 Fix ClassCastException on equality comparison on inline class objects
^KT-54603: Fixed
2022-10-21 21:17:40 +00:00
Ilya Goncharov 2abceb1ca5 [Gradle, JS] Enable test when fixed problems with klib
This reverts commit 03bea0dbaa.
2022-10-21 14:56:26 +00:00
Alexander Udalov 8812f632cc Fix optimization of property delegates of platform types
The old code didn't replace the delegate field access because it was
wrapped into a TYPE_OP IMPLICIT_NOTNULL.

 #KT-54463 Fixed
2022-10-21 13:23:38 +00:00
vladislav.grechko ac74ce5f27 Minor: check absence of context receiver parameters 2022-10-21 12:57:12 +00:00
vladislav.grechko c990bbb26c Get rid of excess method in compiled inline class with custom equals
^KT-54501: Fixed
2022-10-21 12:57:11 +00:00
vladislav.grechko 70c2f2b86f Support specifying different bytecode listings for FIR and old frontend 2022-10-21 12:57:11 +00:00
Artem Kobzar 8a89b2f29f [K/JS] Remove the old interface runtime check because of bootstrapping
Merge-request: KT-MR-7457
Merged-by: Artem Kobzar <Artem.Kobzar@jetbrains.com>
2022-10-21 11:34:31 +00:00
Pavel Punegov ae7404878f [K/N][test] Add test on jar contents.
* Check jar for included entries.
* Small changes to embeddable jar smoke test.
* Delete not used test.
2022-10-21 10:33:41 +00:00
Pavel Punegov d2c58cdd27 [K/N][build] Dependencies fixes: trove4j and kotlin-compiler
* Depend on kotlin-compiler project instead of its runtimeElements only
* trove4j fixes: add as a dependency and use common version
* Strip dependencies in different projects: remove unnecessary
2022-10-21 10:33:40 +00:00
Artem Kobzar ea6b784e41 [K/JS] Exclude Enum.entries property from export to JS 2022-10-21 10:31:06 +00:00
Martin Petrov 6c0b4bcfd4 [KT-54284][Native] Produce deterministic klibs from cinterop. (#4979)
Pass in temp-file C sources to clang via stdin instead of by name.
This prevents absolute paths of temp files from being encoded in bitcode.
2022-10-21 12:16:34 +02:00
Amit Sharma 68bcff3194 Use default build-tool version in test projects 2022-10-21 09:12:46 +00:00
Ilya Chernikov 8566589cf5 Add minimal roots deduplication on classpath update
duplication was detected e.g. in some scripting scenarios
2022-10-21 06:11:42 +00:00
Ilya Chernikov b50a803b6f Make jdk root processing more robust
#KT-54337 fixed
2022-10-21 06:11:42 +00:00
Ilya Chernikov 942def5828 Preserve app env in FP tests to benefit from FastJarFS caching 2022-10-21 06:11:42 +00:00
Ilya Chernikov 7d5257c258 Preserve FastJarFS in app env and implement intermediate cleanup
FastJarFS was behaving differently than the regular CoreJarFS it
tries to replace, namely it was cleaned after each compilation
(had the lifetime tied to core env).
This commit preserve it in the app env the same way as CoreJarFS,
so it could be reused in parallel builds and preserved if automatic
cleanup of the app env is turned off,
But since FastJarFS caches also mmf handles, the additional handles
cleaning is introduced that triggers after all possibly parallel
compilations are finished.
2022-10-21 06:11:41 +00:00
Ilya Chernikov 61e9aaf113 Convert java to kotlin 2022-10-21 06:11:41 +00:00
Ilya Chernikov bccfc2ad18 Rename .java to .kt 2022-10-21 06:11:40 +00:00
Ilya Goncharov 91f75a9187 [Gradle, JS] Both mode will leave as it was with legacy base
Because of both mode will be removed too (because it is redundant when legacy is deprecated), so it is no sense to change it
2022-10-20 20:23:49 +00:00
Ilya Muradyan 352af4b245 Make the code compatible with IDE plugin 2022-10-20 16:00:42 +02:00
Ilya Muradyan 8d12342fc6 Add option for skipping calculating all names for optimizing reasons in LazyImportScope 2022-10-20 16:00:42 +02:00
Ilya Muradyan 4a58274056 Change PUBLICATION lazy to a storageManager one
Lazy computation in publication mode may lead to running of init code
many times in parallel, and it actually happens in IDE.
Instead, we stick to the option which is used for lazy computations
all across compiler code.
2022-10-20 16:00:42 +02:00
Ilya Muradyan b8260257fb [minor] Remove redundant qualifier name 2022-10-20 16:00:41 +02:00
Nikolay Lunyak c4fa1ed9d8 [FIR] Prevent StackOverflowError in FirTypeParameterSymbol 2022-10-20 13:08:11 +00:00
Nikolay Lunyak dd861515ad [FIR] KT-52157: Fix missing type parameter annotations 2022-10-20 13:08:11 +00:00
Mikhail Glukhikh 5347c3c7cc FE: add test for KT-53408 to have stable behavior here 2022-10-20 13:27:04 +02:00
Aleksei.Cherepanov b6612c2dcb Replace the Cyrillic character "C" with the Latin version in the test data 2022-10-20 12:49:56 +02:00
Oleg Bask 3302aa5017 Rename C.kt containing cyrillic characters (#4984) 2022-10-20 12:42:28 +02:00
Leonid Startsev 4cf50d7d23 Add checker for companion objects inside serializable class:
Warning for old FE, error in FIR

#KT-54441 Fixed

Merged-by: Leonid Startsev <leonid.startsev@jetbrains.com>
2022-10-20 10:18:04 +00:00