Commit Graph

94012 Commits

Author SHA1 Message Date
Victor Petukhov 0198eeeafe [Compiler tests] Remove -Dkotlin.ni flag from tests 2022-08-02 10:29:41 +00:00
Victor Petukhov 9beb279964 [FE CLI] Remove -Xnew-inference in the compiler cli module settings 2022-08-02 10:29:40 +00:00
Victor Petukhov 34a05105ef [FE 1.0] Get rid of NewResolutionOldInference 2022-08-02 10:29:39 +00:00
Victor Petukhov d89fa8dea9 [FE 1.0] Get rid of OldResolutionCandidate and its usages 2022-08-02 10:29:39 +00:00
Victor Petukhov 9be181f1ad [FE 1.0] Remove constraint system tests
These tests used the old type inference constraint system, so it didn't cover the current compiler logic almost at all

It'd be fine to implement similar test for the new type inference constraint system

^KT-52699
2022-08-02 10:29:38 +00:00
Victor Petukhov 8500ee08a8 [FE 1.0] Remove CONSTRAINT_SYSTEM_FOR_OVERLOAD_RESOLUTION analysis flag
The constraint system for the old type inference is going to be removed.
Also, `CONSTRAINT_SYSTEM_FOR_OVERLOAD_RESOLUTION` isn't used in the production
2022-08-02 10:29:38 +00:00
Victor Petukhov 8227c4b603 [FE 1.0] Use the new type intersection emptiness check
Also introduced compatibility mode to preserve compatibility for is/as/equality checks

^KT-29316 Related
2022-08-02 10:29:37 +00:00
Victor Petukhov bc1c2adae1 [FE 1.0] Use the new type intersection to intersect types 2022-08-02 10:29:36 +00:00
Victor Petukhov 941a33a184 [FE 1.0] Get rid of GenericCandidateResolver 2022-08-02 10:29:35 +00:00
Victor Petukhov 4ea08a59db [FE 1.0] Get rid of CandidateResolver 2022-08-02 10:29:35 +00:00
Victor Petukhov afaf20aea3 [FE 1.0] Get rid of deprecated interceptCandidates in CallResolutionInterceptorExtension 2022-08-02 10:29:34 +00:00
Victor Petukhov 2c7a442cbd [FE 1.0] Get rid of the old inference call completer 2022-08-02 10:29:34 +00:00
Victor Petukhov 1c91e3a606 [FE 1.0] Get rid of the old builder inference support 2022-08-02 10:29:33 +00:00
Victor Petukhov bd665dc5d9 [FE 1.0] Get rid of old inference stuff from CallResolver 2022-08-02 10:29:32 +00:00
konstantin.tskhovrebov 8c2a2b8569 [KT-53337] Cocoapods: warn if cocoapods plugin uses default framework linking type. 2022-08-02 09:54:48 +00:00
konstantin.tskhovrebov 8a7b399dbe [KT-53339] KMM: skip embedding for static frameworks. 2022-08-02 09:47:02 +00:00
Svyatoslav Scherbina ad1b10cdb0 Native: switch to "Native" thread state for some Obj-C runtime calls
A lot of calls to Objective-C runtime are potentially blocking. This
commit adds a number of thread state switches to ensure these Obj-C
runtime calls happen in "Native" thread state.

Also, remove a bunch of such functions from CallsChecker exclude list.
2022-08-02 09:24:02 +00:00
Svyatoslav Scherbina 2e8c25aeff Native: rewrite Kotlin_Interop_getObjCClass in Objective-C
This allows calling it in "Native" thread state.
2022-08-02 09:24:01 +00:00
Svyatoslav Scherbina dc27391cc7 Native: remove close from CallsChecker exclude list
The tests pass without it.
2022-08-02 09:24:00 +00:00
Svyatoslav Scherbina 31434550e0 Bump Kotlin/Native version to 1.8.0-dev-1158 2022-08-02 07:25:07 +00:00
Mikhael Bogdanov 90f8f8e14e Support inner classes in -Xjdk-release
#KT-52823 Fixed
2022-08-02 04:56:20 +00:00
Alexander Shabalin 8a71d75ee9 [K/N] Update setUnhandledExceptionHook documentation ^KT-52908 2022-08-01 19:53:23 +00:00
Alexander Shabalin 41d6dc5914 [K/N] Allow to unset unhandled exception hook ^KT-49228 2022-08-01 19:53:21 +00:00
Mikhail Glukhikh 187fe6d50a K1: fix error message of EXPECTED_PARAMETER_TYPE_MISMATCH(_WARNING) 2022-08-01 17:00:19 +02:00
Alexander Shabalin 8b2f761c75 [K/N] Compile each cpp file separately.
Merge-request: KT-MR-6711
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-08-01 14:13:22 +00:00
Dmitry Gridin 9b925efdaf [light classes] ultraLightClass: cleanup code
^KT-53097
2022-08-01 13:56:39 +00:00
Dmitry Gridin e8d74d8224 [light classes] convert jvmDefaultMode from KtUltraLightSupport to extension
^KT-53097
2022-08-01 13:56:38 +00:00
Dmitry Gridin 716efa60df [light classes] drop redundant receiver from createTypeFromCanonicalText
^KT-53097
2022-08-01 13:56:38 +00:00
Dmitry Gridin 1514d5f563 [light classes] drop redundant KtLightClassForSourceDeclaration#forceUsingOldLightClasses
^KT-53097
2022-08-01 13:56:37 +00:00
Dmitry Gridin be45a329d6 [light classes] drop redundant KtLightSimpleModifierList
^KT-53097
2022-08-01 13:56:36 +00:00
Dmitry Gridin 9606d49379 [light classes] drop redundant KtUltraLightSupport from annotations
^KT-53097
2022-08-01 13:56:35 +00:00
Dmitry Gridin 4f18e7091b [light classes] analysis-api-fir: migrate from :compiler:backend to :compiler:backend.common.jvm
^KT-53097
2022-08-01 13:56:35 +00:00
Dmitry Gridin 1708b4fe48 [light classes] move light-classes-base module to analysis
^KT-53097
2022-08-01 13:56:34 +00:00
Svyatoslav Scherbina 1b131332ab [Native][tests] Simplify handling opt-ins in the test launcher
For a box test, the test engine generates a test launcher -- a function
that calls `box` function. The latter might require an opt-in. To deal
with this, the test engine was using some heuristics to detect possibly
used opt-ins and applied them to the test launcher.

This commit provides an alternative solution -- it uses
`@Suppress("OPT_IN_USAGE_ERROR")` annotation for the test launcher. This
way, it doesn't have to guess which opt-ins to apply.
2022-08-01 15:24:15 +02:00
Svyatoslav Scherbina 09c131afd2 [Native][tests] Add standalone test for KClass package names
To ensure that after introducing `ReflectionPackageName` annotation,
we still have tests that check KClass package names without it.
2022-08-01 15:24:15 +02:00
Svyatoslav Scherbina c1853a0218 [Native][tests] Introduce NATIVE_STANDALONE directive
This directive makes the test standalone, i.e. disables grouping it with
other tests into a single compilation, and in particular disables
package renaming for the test.

Also, remove the old hard-coded way to mark tests standalone.
2022-08-01 15:24:10 +02:00
Svyatoslav Scherbina d50b0693b2 [Native][tests] Don't make typeOf tests standalone
The test engine detected tests using typeOf and made them "standalone",
i.e. disabled test grouping and thus package renaming for them, to keep
the reflection information intact.

Now, with `ReflectionPackageName` annotation, this is not required
anymore.
2022-08-01 15:23:38 +02:00
Svyatoslav Scherbina cee0731cef [Native][tests] Keep reflection package name when renaming packages
The test engine renames packages in test files to allow group many tests
into single compilation for performance reasons.

As a result, reflection APIs return different package names. To deal
with this, the test engine uses certain heuristics to detect tests using
reflection APIs, and disables grouping (and thus package renaming) for
them.

This commit provides an alternative solution for the same problem --
now the test engine instructs the compiler to use original package names
for reflection information, by means of the introduced
`ReflectionPackageName` annotation.
2022-08-01 15:23:32 +02:00
Svyatoslav Scherbina 38723816b7 [Native][tests] Fix file annotation patching in test files
Previously, the test engine was copying @file:OptIn annotations from
each file to all the other files inside the same test data, and also was
removing other file annotations in certain cases.

Now it only adds the opt-ins specified with `!OPT_IN` directives, and
doesn't remove anything.
2022-08-01 15:23:19 +02:00
Artem Kobzar 0cef573a7b [K/JS] test(@JsExport): add few more tests on export after ExportModel discussion meeting. 2022-08-01 12:17:35 +00:00
Pavel Mikhailovskii 76f92eac69 Trivia. A better wording in a documentation comment. 2022-08-01 11:51:37 +02:00
Mads Ager e46540729c Fix equality for generated test files.
They were compared based on the name of the file only disregarding
the module. Therefore, the test framework would only patch
package declarations for one file with a given name even if there
were multiple files with that name in different packages.
2022-08-01 08:57:17 +00:00
Mads Ager 59c2bde10a [K/N] Unmute passing tests. 2022-08-01 08:57:16 +00:00
Igor Yakovlev c2d62b37e6 [WASM] Enable stdlib tests 2022-07-29 19:50:31 +02:00
Yahor Berdnikau 21b8e1a0c8 Fix Kapt generate stubs doesn't know about java sources from main task
Restore configuration to set to KaptGenerateStubsTask java sources
set to related KotlinCompile task.

^KT-52761 Fixed
2022-07-29 16:52:47 +00:00
Roman Golyshev bcd6a54ffb [Analysis API FIR] Fix small mistake in KDocReferenceResolver
`owner` is a PSI element, it can never be an instance of
`KtConstructorSymbol`

Also, make `MutableCollection` an extension receiver instead of context
receiver for the consistency
2022-07-29 17:13:52 +02:00
Artem Kobzar fb32af1c02 [K/JS] feat: eliminate usage of kotlin.reflection if there is just raw js class usage. 2022-07-29 14:22:19 +00:00
Artem Kobzar b9189be728 [K/JS] fix(KT-46643): prevent removal of setter for overridden external field. 2022-07-29 12:41:17 +00:00
Ilya Goncharov 1c39042e7a [Gradle, JS] Compatibility breaking changes for css and scss support
This reverts commit 487e854f60.

^KT-53367 fixed
2022-07-29 12:35:57 +00:00
Pavel Kunyavskiy 51651aef74 [K/N] Basic support of thread sanitizer for generated code 2022-07-29 11:15:18 +00:00