- Move std_alloc, opt_alloc and custom_alloc into alloc/std,
alloc/mimalloc and alloc/custom to mirror convention of gc,
gcScheduler modules.
- Add alloc/common with common allocator API
- Add alloc/legacy with common implementation details of alloc/std and
alloc/mimalloc. alloc/custom does not depend on alloc/legacy.
- Removes experimental_memory_manager_custom as it's now unused
- Additionally, renames experimental_memory_manager module into mm
4774912f updated the patterns for the filecheck_constants_merge test,
because the commit slightly changed the code generated for TypeInfo.
But the test update was made with a copy-paste-related mistake.
As a result, the test didn't work with `-Ptest_with_cache_kind=static`.
This commit fixes this, buy reverting the unintended changes in
the filecheck patterns.
The header klib is supposed to only contain the public abi of the module
similar to jvm-abi-gen. It is intended to be used as a dependency for other
klib compilations instead of the full klib for compilation avoidance.
^KT-60807
This project was replaced by the :native:kotlin-native-utils located at
native/utils. All sources were already merged.
Merge-request: KT-MR-11847
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
Currently, when generating a TypeInfo with a vtable attached, the K/N
compiler generates two globals to the resulting LLVM module:
- "ktypeglobal:$fqName#internal" -- an internal global of the aggregate
type (TypeInfo+vtable)
- "kclass:$fqName" -- an internal or hidden alias pointing to the
TypeInfo part of that global
The reason for emitting two globals is to have everything strict-typed,
since other LLVM modules might import the kclass as a TypeInfo.
Importing an aggregate TypeInfo+vtable global as a TypeInfo global works
too, of course. It is just a little bit less clean.
The new Xcode 15 linker now emits symbols for the ktypeglobal to the
symbol table, including an STSYM. This happens for classes compiled to
cache, when the kclass is hidden, not internal.
The problem is: for some reason, such an STSYM for
"ktypeglobal:kotlin.String#internal" makes lldb find a wrong address
(0xffffffffffffffff) for "kclass:kotlin.String", despite those being
two different symbol names. This seems to be related to them having
the same address though.
The K/N lldb script, konan_lldb.py, uses "kclass:kotlin.String" to
determine if an object is a string, in order to display it properly.
Therefore, using the new Xcode 15 linker when compiling with caches
makes the debugger unable to display string variables properly. As a
side effect, this also breaks displaying array-typed variables (because
the script first checks if an object is a string).
This commit fixes this by removing ktypeglobals completely, making the
compiler emit only a kclass as an aggregate global directly.
Now, there are other ways to fix the problem. For example, making the
ktypeglobal private instead of internal, or making konan_lldb.py use a
runtime function instead of querying "kclass:kotlin.String" directly.
But it seems that LLVM aliases are not common on darwin platforms. For
example, Clang doesn't support `__attribute__((alias(...)))` on these
platforms.
So it is safer to just stop using aliases here.
^KT-61417
* Removed deprecated methods from the new atomics in kotlin.concurrent
* Changed deprecation level from WARNING to ERROR for the old atomics in kotlin.native.concurrent
* Removed FreezingIsDeprecated annotation from kotlin.concurrent.AtomicReference
See KT-58123
Merge-request: KT-MR-10650
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
Removed TODOs after updating to kotlin bootstrap version with konan.data.dir gradle property changes
Fixed warning of incorrect passing -Xkonan-data-dir arg in konanc from KGP and fixed setting konan-data-dir in SetupConfiguration#setupCommonOptionsForCaches
#KT-60660 Fixed
Merge-request: KT-MR-11299
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
Building Kotlin/Native itself involves running cinterop in the Gradle
daemon process to reduce build time.
But this optimization appears to be incorrect when reusing Gradle daemon
for subsequent builds.
This commit disables the optimization by default, keeping enabling it
possible using `kotlin.native.allowRunningCinteropInProcess=true`
project property.
For more details see ^KT-61300
* Extract argument processor and settings out of TestRunner.
This makes it possible to add external runners to the framework.
* Add methods and docs to TestCase and TestSuite classes that
describe Kotlin test methods.
CompareDistributionSignatures task is used to compare Native platform
libraries contents against a previous version.
Under the hood, it runs the klib tool to get a library contents. But it
didn't check the exit code, so if klib tool failed, the task could
mistakenly indicate that there are no differences in platform libs.
Fix this by checking the klib tool exit code and failing if it is not
zero.