Commit Graph

11 Commits

Author SHA1 Message Date
Alexander Shabalin
7e04bb4bf1 [K/N] Refactor unhandled exception handling API
* Do not reset unhandled exception hook
* Add processUnhandledException to perform default unhandled exception
  processing
* Add terminateWithUnhandledException to report the unhandled exception
  and terminate the program
* Use the default unhandled exception processing in entrypoint, interop
  boundaries and in Worker.executeAfter
* Add -Xworker-exception-handling to control exception processing of
  Worker.executeAfter. By default its the old behaviour with the old MM,
  and new behaviour with the new MM.
2021-08-10 08:22:55 +00:00
Alexander Shabalin
c286a9d8c6 Extract StackTrace from Exceptions 2021-07-01 07:23:47 +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
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
Vladimir Ivanov
fd02802028 [Native] Export KDoc into generated native header 2021-03-09 16:50:23 +03:00
Alexander Shabalin
3a5c6480a3 Track current exception (#4701) 2021-02-24 11:00:05 +01:00
Alexander Shabalin
a38e64a7c8 Update runtimeDefinitions after toolchain upgrade (#4714) 2021-02-24 11:00:05 +01:00
Alexander Shabalin
d5ca285a79 Move unhandledExceptionHook to kotlin code (#4704) 2021-02-24 10:53:42 +01:00
Alexander Shabalin
32e3deace1 Enable unused-function warning for runtime (#4628) 2021-01-19 13:37:36 +03:00
Alexander Shabalin
0dfc99ab1a Add MoveOnly and Pinned (#4526) 2020-11-28 21:06:58 +01:00
Stanislav Erokhin
f624800b84 Move everything under kotlin-native folder
I was forced to manually do update the following files, because otherwise
they would be ignored according .gitignore settings. Probably they
should be deleted from repo.

Interop/.idea/compiler.xml
Interop/.idea/gradle.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_1_0_3.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_0_3.xml
Interop/.idea/modules.xml
Interop/.idea/modules/Indexer/Indexer.iml
Interop/.idea/modules/Runtime/Runtime.iml
Interop/.idea/modules/StubGenerator/StubGenerator.iml
backend.native/backend.native.iml
backend.native/bc.frontend/bc.frontend.iml
backend.native/cli.bc/cli.bc.iml
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.kt
backend.native/tests/link/lib/foo.kt
backend.native/tests/link/lib/foo2.kt
backend.native/tests/teamcity-test.property
2020-10-27 21:00:28 +03:00