Abduqodiri Qurbonzoda
718965227e
Advance deprecation level of K/N StringBuilder renamed functions to ERROR #KT-46101
2021-09-16 19:45:04 +03:00
Igor Chevdar
e194a07358
[tests] Added some tests
2021-09-16 10:54:14 +00:00
Igor Chevdar
cc75b45479
[K/N][IR] Fix for https://youtrack.jetbrains.com/issue/KT-47669
...
Outer this references should be lowered before inliner
2021-09-16 10:54:14 +00:00
Elena Lepilkina
bdb61ec5d7
[K/N] Run inline property accessors later to inline all cases including devirtualized
2021-09-15 12:29:03 +00:00
Svyatoslav Scherbina
b32ab48596
Native: add tests for autorelease optimization in ObjCExport
...
The compiler should do its best to avoid putting objects to autorelease
pools.
2021-09-15 11:48:17 +00:00
Svyatoslav Scherbina
8c923f6504
Native: optimize autorelease in ObjCExport calls to Kotlin
...
Use objc_autoreleaseReturnValue to eliminate the autorelease operation
for return value if the caller is optimized (usually it is).
This required moving autorelease operation from Kotlin -> ObjC ref
conversion to bridge epilogue.
To achieve this, also make ObjCExport Kotlin ref -> ObjC ref dynamic
converters return retained reference (instead of autoreleased one).
To reflect this, rename the corresponding entities in the code.
2021-09-15 11:48:16 +00:00
Svyatoslav Scherbina
75a3070067
Native: implement autoreleaseAndRet for ObjCExportCodeGenerator
...
This operation is equivalent to "autorelease and then return",
but it supports Obj-C runtime autorelease optimization for return value:
if the caller is optimized (which is usually true), then no autorelease
will happen at runtime.
2021-09-15 11:48:15 +00:00
Svyatoslav Scherbina
e00fd6b9b3
Native: allow subclassing FunctionGenerationContext
...
This allows one to have domain-specific generator without polluting
the global namespace.
Also introduce builders and do minor refactoring.
2021-09-15 11:48:15 +00:00
Alexander Shabalin
d03a7993ed
[K/N] Implement GCScheduler
2021-09-14 13:53:36 +00:00
Svyatoslav Scherbina
ae349846e1
Native: support writing unit tests for Interop/Indexer
2021-09-14 10:42:16 +00:00
Igor Chevdar
8464b15d27
[K/N][IR] Fix for https://youtrack.jetbrains.com/issue/KT-48559
...
Aligned SAM conversion lowering with the JVM's one
Also refactored other places with erasure
2021-09-13 16:49:39 +05:00
Igor Chevdar
23a02be169
[K/N][IR] Fix for https://youtrack.jetbrains.com/issue/KT-48527
2021-09-13 16:41:37 +05:00
Pavel Kunyavskiy
51c85e7f86
[K/N] Safer handling of bridges function in dce
2021-09-10 15:58:42 +00:00
Mikhail Glukhikh
007cf2ce7c
Rename AnalysisFlags.useExperimental to optIn
2021-09-10 16:29:18 +03:00
Mikhail Glukhikh
3febabe977
Use OPT_IN instead of EXPERIMENTAL in diagnostic names
2021-09-10 16:29:13 +03:00
Pavel Kunyavskiy
7e58660ce2
[K/N] Emmit error on using @SymbolName with new mm
2021-09-10 07:46:39 +00:00
Pavel Kunyavskiy
ca9ec76c08
[K/N] Replace SymbolName with GCUnsafeCall in interop
2021-09-10 07:46:39 +00:00
Svyatoslav Scherbina
01272cace3
[K/N] don't rely on expression type when lowering value constructor calls
...
Because of generics, these types don't exactly match the actual types in
generated code, and autoboxing can't fix this because this happens after
it.
^KT-48381 Fixed
2021-09-09 13:56:36 +00:00
Elena Lepilkina
aaf666e0e1
[K/N] Turn on mimalloc by default for experimental MM
2021-09-09 13:41:37 +00:00
Vladimir Ivanov
8ba164163c
[K/N] cinterop: ignore CXIdxEntity_CXXClass in ObjC header
...
Unexpected behavior is caused by `@class` declaration in ObjC context.
This entity is not used in CPP context either.
2021-09-09 09:37:05 +00:00
Mikhail Glukhikh
ffbd574a08
Use -opt-in instead of -Xopt-in in comments and scripts
2021-09-08 23:43:55 +03:00
Igor Chevdar
8ad540953e
[K/N][optmz] Fix for https://youtrack.jetbrains.com/issue/KT-48380
2021-09-09 00:32:41 +05:00
Igor Laevsky
37874b1937
WASM: Lower expression bodies into block bodies
2021-09-08 19:56:27 +03:00
Elena Lepilkina
cb067e160b
[K/N] Updated RSS limit for new version of mimalloc
2021-09-08 13:53:18 +00:00
Igor Chevdar
e057e5ffac
[K/N][optmz] New strategy for resolving divergence of escape analysis
2021-09-08 18:48:55 +05:00
Igor Chevdar
aad2a3303f
[K/N][optmz] More debug output for escape analysis
2021-09-08 18:48:50 +05:00
Roman Artemev
78cd45f937
[KLIB] Resolve deserialization on for each file separately
...
Needs for IC
2021-09-07 20:41:28 +03:00
Igor Chevdar
e67a78abaf
[K/N][codegen] Fix for https://youtrack.jetbrains.com/issue/KT-48543
...
Sometimes an interface contains final methods, they shouldn't be in its itable
cause they can't be called virtually
2021-09-07 12:04:26 +05:00
Abduqodiri Qurbonzoda
97eb28144f
Introduce Common readln() and readlnOrNull() top-level functions #KT-48456
2021-09-05 15:31:11 +00:00
Dmitriy Dolovov
df208dc060
[Native][tests] Fix failing 'interop_objc_smoke_noopgc' test
2021-09-03 14:53:10 +03:00
Ilya Matveev
ce377e4a33
[K/N][tests] Enable dynamic tests for targets other than hosts
2021-09-03 06:11:10 +00:00
Dmitriy Novozhilov
69c3831865
Rename Deprecation to DeprecationInfo
2021-09-02 15:04:07 +03:00
Alexander Udalov
0213c25c9b
Remove obsolete check for language version and IR backends
2021-09-01 16:30:41 +02:00
Pavel Kunyavskiy
98e4d67900
[K/N] Add opt-in flag to use debug info from native libs
...
Unfortunately, llvm removes full debug info from module on any error.
Different version debug info in bitcode is not always compatible, also
it adds this debug info additional requirements on generated debug info.
So this feature is quite unstable and shouldn't be enabled by default,
although it has almost no downsides when worked correctly.
2021-09-01 08:35:21 +00:00
Pavel Kunyavskiy
9f6df5f54b
[K/N] Disable debug info for old-style global initializers
2021-09-01 08:35:20 +00:00
Pavel Kunyavskiy
5529713ebe
[K/N] Fix debug info in lazy initializers
2021-09-01 08:35:20 +00:00
Pavel Kunyavskiy
7f988bd442
[K/N] Refactor function generation to make it more debug-info friendly
2021-09-01 08:35:19 +00:00
Dmitriy Dolovov
b506704a2b
[Native][tests] Fix failing 'runtime_basic_init' test
...
This test should have it's own test data file.
Previously it used 'hello3.kt' test data file shared with 'hello3' test which uses golden data. This caused a conflict.
2021-09-01 10:14:17 +03:00
Dmitriy Dolovov
bf82db5ee2
[Native][tests] Move input data outside of Gradle build file
2021-09-01 10:14:06 +03:00
Dmitriy Dolovov
1a863106e6
[Native][tests] Move golden data outside of Gradle build file
2021-09-01 10:14:01 +03:00
Dmitriy Dolovov
c2e2d3a43e
[Native][tests] workers5 - remove redundant test annotations
2021-09-01 10:13:55 +03:00
Dmitriy Dolovov
51f30ed995
[Native][tests] localDelegatedPropertyLink - don't use golden data
2021-09-01 10:13:50 +03:00
Sergey Bogolepov
d4c91c96d3
[K/N] Fix objc_acr_contract test in two_stage mode
2021-08-31 12:52:42 +00:00
Sergey Bogolepov
587146679d
[K/N] Add tests for -Xbinary=freezing=...
2021-08-30 12:33:04 +00:00
Sergey Bogolepov
4b5a7c6646
[K/N] Add binary option to disable freezing
...
We don't want to deprecate freezing at all, but it is possible
that freezing, new memory model and lazy global initialization
combination might not work in some cases. It might be a problem
when such case appears in 3rd-party library that user can't fix.
To mitigate this problem this commit introduces `freezing` binary
option. It has three variants:
* Full - ol' good behavior.
* Disabled - well, no freezing at all.
* ExplicitOnly - a compromise when user want to freeze something
themselves, but something is messed up during globals initialization.
2021-08-30 12:33:03 +00:00
Svyatoslav Scherbina
5bdfa14a37
Native: make -Xbinary=memoryModel= equivalent to -memory-model=
...
In particular, the former now enables lazy initialization and hook-based
worker exception handling too, as intended.
2021-08-29 07:35:32 +00:00
Igor Chevdar
ce44403d1b
[K/N][IR][codegen] Made lazy init logic JVM-like
...
Now a file will be initialized only if a top level function has been called
rather than any function like was before the commit
2021-08-27 18:22:52 +05:00
Igor Chevdar
e6be5e4266
[K/N][codegen][runtime] Removed remnants of main thread init logic
2021-08-27 18:22:51 +05:00
Ilya Matveev
463bc22bf3
[K/N] Enable callbackOnSeparateThread test since KT-44283 is fixed
2021-08-26 14:46:07 +00:00
Ilya Matveev
99bd26c2ef
[K/N][Runtime] Switch thread states in termination handlers
2021-08-26 14:46:07 +00:00