Igor Chevdar
bea82ba2cd
[K/N][stdlib] Added @EagerInitialization annotation
...
It is needed in the lazy top level properties initialization strategy to
revert to the previous strategy at least for the transition period
2021-07-19 17:23:35 +05:00
Andrey Kuleshov
26a71af6b3
[Native, All platforms] HotFix of the incorrect parsing of long strings to Float and Double ( #4492 )
...
### What's done:
- Fixed incorrect logic of String.toFloat() and String.toDouble().
Long string without any digits were treated as Float or Double:
"this string does not look as float isn't it?".toFloat() == "Infinity".
- Fixed incorrect parsing of floating point constants "NaN" and "Infinity":
String values like "NaNPICEZy" or "InfinityN" were treated as valid numbers.
- Merged parsing logic for Double and Float:
Removed the code duplication, unified methods, made the code more Kotlin-like, not C++-like.
- Updated tests:
Removed useless tests that checked nothing, updated tests with regression scenarios.
2021-07-15 14:47:55 +07:00
Pavel Kunyavskiy
92789984e0
[K/N] Make SafeContinuation thread-safe
2021-07-14 09:03:31 +00:00
Ilya Matveev
922aad6865
[K/N] Add exp10 and exp10f to good function list for call checker
...
Clang may replace a call to `pow (10.0, x)` with a call to `exp10(x)`
(or `__exp10` on MacOS).
We use this function in float parsing logic, so this function should
be added to the good function list.
2021-07-14 04:49:04 +00:00
Elena Lepilkina
9503627864
Changed an order of processing loops in ForLoopsLowering
2021-07-13 09:22:11 +00:00
Elena Lepilkina
3cabfb6a85
[K/N][New MM] Rare GC calls to optimize swiftinterop benchmarks
2021-07-12 12:27:05 +00:00
Alexander Shabalin
274dabb61d
Collect stacktraces without allocating kotlin objects.
2021-07-12 08:49:33 +00:00
Alexander Shabalin
fca89c2118
Backport span from C++20
...
Does not support ranges and construction from arbitrary contiguous iterators as both need C++20 concepts for an adequate implementation.
2021-07-12 08:48:20 +00:00
Ilya Gorbunov
3f6e2be687
Duration: do not use scientific format for large values
...
The largest duration value formatted in ns with maximal decimals
would fit in 40 chars.
2021-07-12 04:39:25 +00:00
Ilya Gorbunov
28a0698463
Regex.matchAt/matchesAt #KT-34021
2021-07-10 21:31:19 +03:00
Pavel Kunyavskiy
eec8fdf16a
[K/N] Implement isExperimentalMM intrinsic
2021-07-09 08:53:07 +00:00
Svyatoslav Scherbina
2d0dbf9729
Native: improve ObjCExport thread state switching
2021-07-07 13:53:27 +00:00
Pavel Kunyavskiy
70ca222806
[K/N] Disable external calls checker for wasm target
2021-07-05 18:49:09 +00:00
Pavel Kunyavskiy
fc75486611
[K/N] Debug tool for checking state at call points of unknown functions
...
After linking runtime, llvm-ir is modified to add checker function
call at all points where unknown function, which can possibly run long
is called. This function checks Native state is set, to avoid long locks
at gc.
2021-07-05 08:35:23 +00:00
Pavel Kunyavskiy
271fc35082
[K/N] Minor debug info fix
2021-07-05 08:35:22 +00:00
Pavel Kunyavskiy
4c2d518cf5
[K/N] Move ClearCurrentThreadData() out of TestSupport
2021-07-05 08:35:21 +00:00
Pavel Kunyavskiy
65bebd3058
[K/N] Support AddressToSymbol using dladdr, if availible
2021-07-05 08:35:20 +00:00
Pavel Kunyavskiy
1db2903e4f
[K/N] Add utilities to check if thread is registered now
2021-07-05 08:35:19 +00:00
Alexander Shabalin
c286a9d8c6
Extract StackTrace from Exceptions
2021-07-01 07:23:47 +00:00
Alexander Shabalin
092750e215
Fix race in Lazy for the new MM
2021-06-29 06:29:57 +00:00
Alexander Shabalin
455625bcee
Use FreezableAtomicReference in unhandled exception hook
2021-06-29 06:29:57 +00:00
Alexander Shabalin
28b6427d3e
Make FreezableAtomicReference atomic when unfrozen for the new MM.
2021-06-25 21:18:37 +00:00
Alexander Shabalin
cc71069a3a
Do not require freezing for Worker.executeAfter on experimental MM
2021-06-24 07:57:23 +00:00
Svyatoslav Scherbina
5d5628f56e
Native: apply ObjCExport virtual adapters from interfaces of supers
...
Previously they were skipped, and this was an incorrect optimization:
even if super class implements the interface too, this doesn't mean
that virtual adapters provided by that interface are inherited
by non-exported subclass that needs them;
for example, this doesn't happen when the super class is exported
(i.e. Obj-C class is not created at runtime).
Remove incorrect optimization instead of making it more sophisticated,
because it is useless anyway.
^KT-46431 Fixed
2021-06-22 09:29:29 +00:00
Alexander Shabalin
b7fbe09ef4
Fix Experimental MM tests on mingw
2021-06-22 08:58:00 +00:00
Alexander Shabalin
7079ad49bc
Add a test on attaching new threads while collecting
2021-06-21 12:26:01 +00:00
Svyatoslav Scherbina
b961812efd
Native: fix thread state when calling ObjC completion for Kotlin suspend
2021-06-21 09:37:25 +00:00
Svyatoslav Scherbina
2a54f1c610
Improve exception messages for kotlin.native.concurrent.* operations
2021-06-18 13:51:21 +00:00
Ilya Matveev
94384ce2ca
[K/N][Runtime] Add a lock method to thread registry
2021-06-18 12:20:04 +00:00
Ilya Matveev
cece652412
[K/N][Runtime] Separate thread registering and making it 'Runnable'
...
The new GC will require threads to suspend right after registering
if Stop-The-World is requested. This patch changes the initial
thread state to kNative and adds a separate state switch right
after thread registering. This switch suspends if it is necessary.
2021-06-18 12:20:03 +00:00
Alexander Shabalin
e240b8a8ee
Add a separate aggressive GC mode
2021-06-18 12:03:02 +00:00
Alexander Shabalin
91a852d3fd
Fix integer conversion on 32-bit
2021-06-17 14:16:16 +00:00
Alexander Shabalin
7ae59856cb
Add internal MemoryUsageInfo object
...
Currently it only provides peak RSS usage for iOS, Linux, macOS and Windows.
2021-06-16 21:34:04 +00:00
Abduqodiri Qurbonzoda
59031543e2
Throw on invalid AbstractMutableList.addAll index #KT-47211
2021-06-16 11:59:46 +00:00
Sergey Bogolepov
7550351702
[Native] Fix runtime code according to Clang 11 warnings
2021-06-11 12:17:00 +00:00
Svyatoslav Scherbina
79d4047e86
Native: improve thread state switching for Obj-C interop
2021-06-11 07:35:49 +00:00
Svyatoslav Scherbina
85ab4f68df
Native: support reentrant mode for CalledFromNativeGuard
2021-06-11 07:35:48 +00:00
Alexander Shabalin
cf47d95aa5
Rename SingleThreadMarkAndSweep into SameThreadMarkAndSweep
2021-06-10 09:59:38 +00:00
Alexander Shabalin
9ebba93dd9
Make SingleThreadMarkAndSweep support multiple threads
2021-06-10 09:59:37 +00:00
Dmitriy Dolovov
2b161581ca
K/N: Use class FQN in default toString() implementation
...
^KT-47167
2021-06-10 11:02:21 +03:00
Dmitriy Dolovov
d42ff069f6
[Native][IR] Move verbose RTTI for local classes and anonymous objects
...
^KT-45304
2021-06-10 11:02:16 +03:00
Ilya Matveev
f08d473d3c
[K/N][Runtime tests] Support << operator for thread states
2021-06-08 12:44:13 +00:00
Elena Lepilkina
2cb3a20733
[K/N] Added functions for set/get array operatorswithout bounds check
2021-06-08 11:59:56 +00:00
Abduqodiri Qurbonzoda
fdd9287836
Get rid of platform differences in Regex.split() doc
2021-06-08 00:32:33 +00:00
Abduqodiri Qurbonzoda
0b521b5183
Get rid of platform differences in Regex.findAll() doc
2021-06-08 00:32:32 +00:00
Abduqodiri Qurbonzoda
91d1baf3b5
Get rid of platform differences in Array.orEmpty() doc
2021-06-08 00:32:30 +00:00
Abduqodiri Qurbonzoda
cc3c33b8ae
Get rid of platform differences in Collection<T>.toTypedArray() doc
2021-06-08 00:32:29 +00:00
Abduqodiri Qurbonzoda
c64592665b
Get rid of platform differences in MutableList.sortWith() doc
2021-06-08 00:32:29 +00:00
Abduqodiri Qurbonzoda
a9946b01e6
Get rid of platform differences in MutableList.sort() doc
2021-06-08 00:32:28 +00:00
Abduqodiri Qurbonzoda
225be54c61
Get rid of platform differences in Regex.find doc
2021-06-08 00:32:27 +00:00