This commit adds finalizers to the custom allocator. Compared to the
existing solution:
* The finalizer queue is replaced by an AtomicStack<ExtraObjectData>.
* All objects with finalizers get meta objects attached. This was not
previously the case for CleanerImpl, but is now needed to link objects
together in the finalization queue.
* The finalizer queue is built during SweepExtraObjects, instead of
during regular sweeping.
* Cleaners are executed by the finalizer thread, and no longer by a
separate worker thread.
Co-authored-by: Troels Lund <troels@google.com>
Merge-request: KOTLIN-MR-592
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
Review: https://jetbrains.team/p/kt/reviews/8360
MetadataComparisonTest was the only one in build-tools module who
depended on util-klib, that's why we can drop build-tools -> util-klib
dependency
MetadataComparisonTest is no longer needed, that's why we can drop it.
The dependency drop is a one step forward in dropping
`kotlin.srcDir("../compiler/util-klib/src")` line in
`buildSrc/build.gradle.kts`. Adding source roots in `buildSrc` is hacky
and can lead to frustrations (e.g. KT-55874). That's why it's desirable
to drop buildSrc -> util-klib hacky dependency.
Unfortunatelly, I couldn't drop buildSrc -> util-klib dependency,
because:
1. buildSrc depends on kotlin-native/shared/src/library/kotlin +
buildSrc depends on kotlin-native/tools/kotlin-native-gradle-plugin +
maybe smth else
2. kotlin-native/shared/src/library/kotlin depends on util-klib +
kotlin-native/tools/kotlin-native-gradle-plugin depends on util-klib +
maybe smth else
4a2a77d9b9 introduced a regression
where for bound references to functions generic over their receiver
the generated class was also generic even if the function reference
itself only contained concrete types. This is fixed here.
This way inheritors of such class would be able to override category
members the same way they can in Objective-C. Also, API surface of
interop libraries should become a little more stable.
To avoid adding unnecessary included categories to index, we need
to track their location. Also, we can't just implement TypeDeclaration
interface because category is not a type. Thus, we extract `location`
property from TypeDeclaration to LocatableDeclaration and implement it
in ObjCCategory.
It allows to list Objective-C classes that should include
corresponding categories from the same file.
The current implementation is super-simple and slow, but
it is OK since it is not intended to be a general-purpose
solution for now.
- Move out getAnalyzerServices from FirFrontendFacade to TestSetupUtils
- Simplify DependencyListForCliModule. Now it takes BinaryModuleData as input
- FirOutArtifact contains several FirOutputArtifactPart
- Simplify FirFrontendFacade