Commit Graph

147 Commits

Author SHA1 Message Date
Abduqodiri Qurbonzoda 54994a289f Support all digit chars on JS and Native #KT-46002 2021-05-27 06:56:52 +03:00
Alexander Shabalin 858e3584a9 Disable escape analysis with the new MM 2021-05-25 10:06:40 +00:00
Vasily Levchenko 669985f853 [debug][stacktrace][mac] more tracing for stacktrace debugging 2021-05-21 11:52:08 +00:00
Alexander Shabalin 73533e4b19 Make NoOp GC support multiple mutators 2021-05-21 06:31:09 +00:00
Alexander Shabalin eac3f507b6 Make Kotlin_initRuntimeIfNeeded switch to native state 2021-05-20 13:48:49 +00:00
Pavel Kunyavskiy e4ecb3745b [K/N] Debug util for checking if object is global constant 2021-05-20 08:29:22 +00:00
Alexander Shabalin 3388ca2536 Support ObjC blocks in the new MM 2021-05-19 07:31:12 +00:00
Alexander Shabalin 94076300ec Implement a bit more of GC object interface 2021-05-19 07:29:27 +00:00
Svyatoslav Scherbina 570d860217 Native: deprecate SymbolName annotation 2021-05-18 17:29:00 +03:00
Igor Chevdar 3b3318ab06 [K/N][codegen] Refactored interface calls
Removed old impl for debug builds
Fixes https://youtrack.jetbrains.com/issue/KT-44547 as a side effect
2021-05-18 18:58:14 +05:00
Elena Lepilkina 18462445b7 [K/N][stdlib] Fixed lookaround regexes (KT-45932) 2021-05-12 09:02:24 +00:00
Ilya Matveev 1be39cb505 [K/N] Replace thread_local with THREAD_LOCAL_VARIABLE
For some reason using C++'s thread_local modifier
causes crashes during TLS access on runtime initialization
Kotlin dlls on Windows. This patch replaces the thread_local
modifier with __thread which doesn't have this problem
2021-05-06 14:10:22 +00:00
Ilya Matveev 4d346d3735 [K/N][New MM] Support thread state switching
Including

* Support thread state switching in codegen
* Introduce and use GCUnsafeCall annotation
* Switch thread state in C++ runtime code

Also

* Register current thread in Mark&Sweep tests
* Store MemoryState in Worker instance
* Set worker tid in WorkerInit
2021-05-06 14:10:21 +00:00
Ilya Matveev 0b46ed3cde [K/N][New MM] Add thread state asserts to reference updates 2021-05-06 14:10:20 +00:00
Alexander Shabalin 5e456ed82b Put GC implementations into separate modules.
The mm module now compiles separately for each GC implementation.
2021-05-04 10:23:16 +00:00
Vasily Levchenko 1ae41443a2 [kotlin-native][build] clean task fix 2021-04-22 11:16:55 +00:00
Abduqodiri Qurbonzoda eedc4d8c3f [K/N] Fix measureTimeMillis and measureNanoTime doc 2021-04-19 19:14:34 +03:00
Abduqodiri Qurbonzoda aa04f60df4 [K/N] Fix Floating.toInt/toLong doc 2021-04-19 19:14:33 +03:00
Abduqodiri Qurbonzoda 4c66c1c137 [K/N] Fix Primitive.shl/shr/ushr doc 2021-04-19 19:14:32 +03:00
Abduqodiri Qurbonzoda 19ecb78531 [K/N] Fix Primitive.rem doc 2021-04-19 19:14:30 +03:00
Abduqodiri Qurbonzoda 2cfbad9477 [K/N] Fix Primitive.div doc 2021-04-19 19:14:29 +03:00
Abduqodiri Qurbonzoda 8a1855e4da [K/N] Fix Range.isEmpty doc 2021-04-19 19:14:27 +03:00
Abduqodiri Qurbonzoda fb4ddd2f6e [K/N] Fix StringBuilder.deleteRange doc 2021-04-19 19:14:23 +03:00
Abduqodiri Qurbonzoda 76b297fd73 [K/N] Fix StringBuilder.clear doc 2021-04-19 19:14:21 +03:00
Abduqodiri Qurbonzoda 597b18582a [K/N] Fix Char.isISOControl doc 2021-04-19 19:14:19 +03:00
Abduqodiri Qurbonzoda e83ceb9d40 [K/N] Fix String.replace doc 2021-04-19 19:14:11 +03:00
Abduqodiri Qurbonzoda 3a8d1c4b5e Remove redundant @OptIn 2021-04-16 19:01:28 +03:00
Svyatoslav Scherbina d531df1643 Native: add KotlinThrowable.asError() to the generated Obj-C framework
This method can be useful when overriding a throwing Kotlin method in
Swift or Obj-C. In this case, a user can call asError to wrap Kotlin exception
to (NS)Error and then throw it to Kotlin, which will unwrap it back.

^KT-45127 Fixed
2021-04-15 08:21:30 +00:00
Abduqodiri Qurbonzoda 39731fd493 Merge Stdlib generators 2021-04-12 16:51:24 +03:00
Abduqodiri Qurbonzoda 98d31a1813 Expand KDoc of inc() and dec() operators #KT-43701 2021-04-10 03:23:04 +03:00
Sergey Bogolepov 9b1498abad Use runtime bitcode to get size of primitive types
As an alternative to explicitly setting type size in konan.properties or
backend code we can "ask" LLVM about it.
Unfortunately, there is no Clang/LLVM API for it,
so we use a trivial workaround:
Create dumb function in runtime code, and then extract info about
return type size using LLVM.
2021-04-08 16:51:47 +03:00
Abduqodiri Qurbonzoda a4839b8548 [K/N] Migrate runtime to new case conversion api 2021-04-08 03:22:04 +03:00
Abduqodiri Qurbonzoda a697bc43b9 [K/N] Remove redundant @OptIn targeting new case conversion api 2021-04-08 03:22:00 +03:00
Abduqodiri Qurbonzoda 7f0e1ac08d [K/N] Deprecate old Char and String case conversion api #KT-43023 2021-04-08 03:21:58 +03:00
Ilya Gorbunov 7cd306950a Deprecate Char-to-Number conversions in stdlib (Native)
- Synchronize code of Ranges, Progressions, ProgressionIterators
- Suppress deprecations in regex implementation code

KT-23451
2021-04-07 18:30:21 +03:00
Abduqodiri Qurbonzoda b18cd24b81 [K/N] Advance deprecation level of FP to lesser than Int types to ERROR #KT-30360 2021-04-07 15:43:06 +03:00
Ilya Gorbunov 22ca412dd2 Fix case-insensitive character-wise comparison KT-45496
- Step 1: add failing tests
- Step 2: fix common case insensitive Char.equals
- Step 3: fix case insensitive String.equals in K/JS
- Step 4: enable unicode case folding in K/JS Regexes and
  string replacement (KT-45928)
- Step 5: fix case insensitive char comparison in K/N in String functions
  String.replace, equals, compareTo with ignoreCase
2021-04-07 14:43:41 +03:00
Abduqodiri Qurbonzoda 7a6cddf6fe [K/N] Advance String(CharArray) deprecation level to ERROR 2021-04-07 00:23:32 +03:00
Abduqodiri Qurbonzoda 8300180261 [K/N] Remove AfterEach and BeforeEach typealiases in kotlin-test 2021-04-07 00:23:24 +03:00
Abduqodiri Qurbonzoda 91d42fe345 [K/N] Advance deprecation level of subarrayContentToString to ERROR 2021-04-06 18:44:22 +03:00
Abduqodiri Qurbonzoda 7fdf7c6175 [K/N] Move declarations from Text.kt to Strings.kt and StringBuilder.kt 2021-04-06 18:44:20 +03:00
Abduqodiri Qurbonzoda 71afd112c6 [K/N] Remove old String and utf8 conversion api #KT-31343 2021-04-06 18:43:41 +03:00
Ilya Gorbunov 35ae913a5e Stabilize new string and char case conversion API KT-45873 2021-04-03 10:39:17 +03:00
Ilya Gorbunov 8b85bae020 Stabilize Char-to-Int conversions KT-45874 2021-04-03 10:30:50 +03:00
Ilya Gorbunov fa7460ba48 Store Duration value as a multi-range Long
Now precision loss happens at bigger durations.

This changes the binary API due different underlying type of Duration.
2021-04-02 17:43:20 +03:00
Alexander Shabalin 71397a06fb Add Stop-the-World Mark & Sweep GC for single-threaded programs.
GC implementation for testing purposes

* Only works for a single mutator
* Runs on the same thread as the mutator
* Runs every nth checkpoint and after every m bytes are allocated
* Runs finalizers after sweeping on the mutator thread.
2021-04-02 12:13:44 +00:00
Elena Lepilkina 393aaac2b9 [Native] Removed old gradle properties for kotlin repo and versions 2021-04-02 05:42:13 +00:00
Alexander Shabalin 770401801b Implement freezing in the new MM
Currently, it uses suboptimal storage for the freeze bit. This'll be revised later when we finalize stack objects handling in the new MM.
2021-03-26 15:00:14 +00:00
Svyatoslav Scherbina ce239ccc3e Native runtime: remove unused dependency on common/src/hash
No longer required after c8633d8bda.
2021-03-22 16:03:30 +00:00
Svyatoslav Scherbina 8b3ff11a2b Provide CName annotation in common stdlib as optional 2021-03-22 09:20:05 +00:00