Commit Graph

99029 Commits

Author SHA1 Message Date
Kirill Rakhman e81f34d4b0 [FIR2IR] Generate fake overrides for synthetic properties
This fixes "IllegalStateException: Fir2IrSimpleFunctionSymbol for
<paramName> is already bound" when creating a callable reference to a
synthetic property

^KT-56072 Fixed
2023-02-01 11:56:26 +00:00
Ivan Kochurkin b25e460beb [FIR2IR] Minor: simplify code 2023-02-01 11:42:46 +00:00
Ivan Kochurkin 6bdd0edd6c [FIR2IR] Add Fir2IrCommonMemberStorage, get rid of merge in Fir2Ir storages
Extract DescriptorSignatureComposerStub and WrappedDescriptorSignatureComposer to separate classes
2023-02-01 11:42:46 +00:00
Ivan Kochurkin c89770c450 [IR] Consider extension receivers during expect functions actualization
^KT-56199 Fixed
2023-02-01 11:42:45 +00:00
Ivan Kochurkin 0f9107c153 [FIR2IR] Remove passing excess arguments to jvm backend functions and classes
generateModuleInFrontendIRMode, runBackend

FirJvmBackendExtension, ModuleCompilerIrBackendInput
2023-02-01 11:42:45 +00:00
Ivan Kochurkin e601b01be2 [FIR2IR] Use single IrBuiltInsOverFir for all MPP source modules
^KT-56229 Fixed
2023-02-01 11:42:45 +00:00
Ivan Kochurkin 001b11f285 [FIR2IR] Use single SymbolTable and SignatureComposer for all MPP modules
Merge createModuleFragmentWithSignaturesIfNeeded and createModuleFragmentWithoutSignatures
into the createModuleFragmentWithSignaturesIfNeeded
2023-02-01 11:42:44 +00:00
aleksandrina-streltsova a5d8429515 [FIR] fix implementation status for Java fields and synthetic properties
^KTIJ-23963 Fixed
2023-02-01 11:33:01 +00:00
Dmitriy Novozhilov a5f48e295e [Build] Add configuration cache compatibility workaround for MetadataDependencyTransformationTask 2023-02-01 11:31:45 +00:00
Dmitriy Novozhilov 4e04a8bc69 Advance bootstrap to 1.9.0-dev-877 2023-02-01 11:31:44 +00:00
Vladimir Sukharev fbcb07d375 [K2/N] KT-55828 Enable already fixed and accidentally disabled tests
Merge-request: KT-MR-8605
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-02-01 10:44:26 +00:00
Mikhail Glukhikh 1d309cbbb2 Fix test data accidentally broken in cab03404 (commit clash) 2023-02-01 10:18:19 +01:00
Zalim Bashorov 95a1218996 [CODEOWNERS] Change owner of wasm intrinsics to "Kotlin Wasm"
And make "Kotlin Wasm" co-owner of /js/js.translator/testData/
2023-02-01 00:36:11 +01:00
Zalim Bashorov 58e523b890 [Wasm] Change target directory for wasm intrinsics for finer tuning code owners
Also, minor cleanup in the generator.
2023-02-01 00:35:49 +01:00
Mikhail Glukhikh cab0340497 K1: report also TYPE_MISMATCH_WARNING in JvmSyntheticAssignmentChecker
#KT-56061 Fixed
2023-01-31 22:05:18 +00:00
Mikhail Glukhikh f14effa8e8 K1: extract isAssignmentCorrectWithDataFlowInfo 2023-01-31 22:05:17 +00:00
Mikhail Glukhikh 7cc3f7de62 K1: introduce assignment checkers and convert JvmSyntheticAssignmentChecker
Related to KT-56061
2023-01-31 22:05:16 +00:00
Mikhail Glukhikh 5fc0aa769b FE: add more tests around KT-56061 2023-01-31 22:05:16 +00:00
Marco Pennekamp 17500b225d [LL FIR] Remove FIR_IDE_IGNORE test directive
^KT-50732 fixed
2023-01-31 20:28:46 +00:00
Sebastian Sellmair 06a2069d6b Bump Kotlin/Native version to 1.9.0-dev-886
^KT-56205 Verification Pending
2023-01-31 16:15:20 +00:00
Sebastian Sellmair b6ea04d789 [K/N] Don't add linkDependencies when serializing a metadata klib
^KT-56205 Verification Pending
2023-01-31 16:15:19 +00:00
Sebastian Sellmair 1978566fee [K/N] SearchPathResolver: Do not emit warning for LenientUnresolvedLibrary
^KT-56205 Verification Pending
2023-01-31 16:15:19 +00:00
Anna Kozlova 48b1456290 [CLI] create ArgumentParseErrors instances on request
spare memory for projects with big number of modules
currently 500kb for IJ monorepo of mostly empty errors
2023-01-31 16:08:23 +00:00
Kirill Rakhman f7f50ca842 [FIR2IR] Use cached IrEnumEntry when available in Fir2IrConverter
Calling createIrEnumEntry lead to "IllegalStateException:
Fir2IrEnumEntrySymbol for [declaration] is already bound" when the
IrEnumEntry was already created previously, e.g. by an annotation call
referencing it.

^KT-54079 Fixed
2023-01-31 15:40:25 +00:00
Kirill Rakhman feb6fd0e0d Revert "[FIR2IR] Temporary fix of createIrEnumEntry"
This reverts commit c9a8f433fb.

KT-54079
2023-01-31 15:40:24 +00:00
Vsevolod Tolstopyatov 79f6d4b590 Address classloader leak in a recently-introduced ClassValueCache
Root cause:
Cached in ClassValue values are prohibited to reference any java.lang.Class or ClassValue instances as they are considered as strong roots that prevent Class and ClassValue garbage collection,
creating effectively unloadable cycle.
This problem is also known as JDK-8136353.

Actions taken:
* Extract anonymous ClassValue instance into a separate static class that does not capture anything implicitly
* Wrap cached values in ClassValue into SoftReference to avoid unloadable cycles

^KT-56093 Fixed
2023-01-31 16:22:03 +01:00
Yahor Berdnikau 752de6c622 Don't override compilation freeCompilerArgs in link task
Calling '.addAll()' was replacing convention value leading for inability
to add/modify Kotlin/Native link task freeCompilerArgs via
KotlinCompilation.options.freeCompilerArgs. For now convention
was replaced by normal value.

^KT-56280 Fixed
2023-01-31 15:01:10 +00:00
Vyacheslav Gerasimov ff2db23c11 Build: Set kotlin.daemon.jvmargs in buildSrc to the same value as in the root project
#KTI-915

Merge-request: KT-MR-8589
Merged-by: Vyacheslav Gerasimov <Vyacheslav.Gerasimov@jetbrains.com>
2023-01-31 13:57:27 +00:00
Alexander Udalov 2849e45111 Kapt tests: change _ir.txt to .ir.txt
To be consistent with test data of other compiler tests.
2023-01-31 13:49:44 +00:00
Mikhail Glukhikh f0ea8ab81b FIR2IR: make IrGetValue type consistent with IrVariable type
#KT-55458 Fixed
2023-01-31 13:43:26 +00:00
Mikhail Glukhikh 1c4d9175e7 FIR2IR: add test for KT-55458 2023-01-31 13:43:26 +00:00
Mikhail Glukhikh 9378da6f27 FirElementSerializer: drop no longer necessary code for accessor annotations 2023-01-31 13:16:13 +00:00
Svyatoslav Kuzmich bebb9b1392 [Wasm] Move compiler tests to :wasm:wasm.tests module
They don't belong in K/JS test module.
2023-01-31 13:12:12 +00:00
Ilya Chernikov 46c8cbe1bb FastJarFS: fix behavior on invalid zip files
"emulate" the ZipHandler - log error and ignore invalid file
#KT-55712 fixed
2023-01-31 12:50:29 +00:00
Anna Kozlova b415aa7446 [FIR] take ready implicit unit type instead of return type calculation
and assert that symbol is not a substitution/intersection override
in the `compute` method otherwise.

Because `fakeOverrideSubstitution` should be calculated for all real
implicit types, no call to this method should actually happen.

Otherwise, it can be problematic to create a session
which would contain the full designation path:
`provider.getFirCallableContainerFile(symbol)`
returns `firFile` of a super class which might be from module `a`,
when declaration and its outer classes are from module `b`.

^KTIJ-24105
2023-01-31 11:21:17 +00:00
aleksandrina-streltsova f3cbc1b2d4 [Analysis API] Add API for obtaining scope with synthetic properties
^KTIJ-22359 Fixed
2023-01-31 11:02:18 +00:00
Svyatoslav Kuzmich e517df1533 [Wasm] Mark JsAllowImplementingFunctionInterface with OTHER kind
This fixes test failures when advancing bootstrap.

When a language feature has UNSTABLE_FEATURE kind, enabling it causes
the compiler to mark the compiled library with the pre-release flag.

JsAllowImplementingFunctionInterface feature is enabled by default in
Wasm backend. So effectively, all Wasm klibs are marked with the
pre-release flag, including the standard library.

Pre-release checks were enabled recently and cause compiler errors.

To fix the problem, this commit changes the feature kind to OTHER, which
doesn't enforce the pre-release flag.

Merge-request: KT-MR-8582
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2023-01-31 10:18:08 +00:00
Nikita Nazarov fe5a8f664a Add debug information for inline function parameters (#5050)
Add debug information for inline function parameters

Previously during debugging Kotlin/Native applications you couldn't inspect the inline function or inline lambda parameters. This happened because the debug information for them wasn't generated at all. To fix this issue we have to store the information about which expressions were inlined instead of which parameters. This commit adds a new mapping, which allows storing the required information during the inlining phase. The mapping is then reused during the bitcode generation phase to add the debug information for inline function parameters.

^KT-55440
2023-01-31 11:02:48 +01:00
Vladimir Dolzhenko edf9c3a2f5 Add more diagnostic info
Resolver could be GCed if there is no any valid hard reference to it.
Some impl of PackageFragmentProvider (like DelegatingPackageFragmentProvider)
keep hard ref to resolver.
For the sake of investigation it is worth to know what kind of PFP is there.

#EA-725255

Merge-request: KT-MR-8581
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2023-01-31 09:09:28 +00:00
Kirill Rakhman 5e56845ce0 Analysis API: Add tests for KT-54648 2023-01-31 08:39:43 +00:00
Kirill Rakhman 63a908cff8 FIR, Assign plugin: Update for KT-54648 2023-01-31 08:39:43 +00:00
Kirill Rakhman 1eb18f13bd FIR: Fix test data after making LHS of assignment an expression
KT-54648
2023-01-31 08:39:43 +00:00
Kirill Rakhman ace47c06a5 FIR: Make LHS of FirVariableAssignment a FirExpression
This way references can even be resolved for erroneous assignments
(e.g. function call, if expression, ... on LHS)

^KT-54648 Fixed
2023-01-31 08:39:42 +00:00
Kirill Rakhman e9b8d6db80 Add words to dictionary 2023-01-31 08:39:41 +00:00
Kirill Rakhman 4e9ae3b5e3 Reformat FirExpressionsResolveTransformer 2023-01-31 08:39:41 +00:00
Dmitriy Novozhilov a084bcbbb5 [FIR] Expand expected types before ILT approximation
^KT-56176 Fixed
2023-01-31 07:53:12 +00:00
Dmitriy Novozhilov 4941fcd10e [FIR] Report PRIVATE_CLASS_MEMBER_FROM_INLINE on qualifiers of companions
^KT-56172 Fixed
^KT-55179
2023-01-31 07:53:12 +00:00
Dmitriy Novozhilov 522eec8c51 [FIR] Fix reporting PRIVATE_CLASS_MEMBER_FROM_INLINE on members of companion
^KT-56172
^KT-55179
2023-01-31 07:53:12 +00:00
Dmitriy Novozhilov d856ae1f35 [FIR] Move common members in symbols up in the hierarchy 2023-01-31 07:53:11 +00:00
Dmitriy Novozhilov a83caec94f [FE 1.0] Implement deprecation PRIVATE_CLASS_MEMBER_FROM_INLINE_WARNING warning
^KT-55179
^KT-56171 Fixed
2023-01-31 07:53:11 +00:00