Rolf Bjarne Kvinge
f8a19c7cbf
[runtime] Remove the declarations for mono_jit_parse_options and mono_gc_max_generation. ( #11617 )
...
We don't used these mono functions anymore.
2021-05-20 07:35:38 +02:00
Rolf Bjarne Kvinge
f38187f054
[runtime] Refactor the toggle ref code to separate MonoVM-specific code and generic logic. ( #11616 )
...
This makes it simpler to impement the toggle ref logic for CoreCLR once we can
do that.
2021-05-20 07:35:23 +02:00
Rolf Bjarne Kvinge
d60514b02b
[runtime] Postpone implementing mono_domain_set_config for CoreCLR. ( #11610 )
2021-05-20 07:33:26 +02:00
Rolf Bjarne Kvinge
a33a86a9b7
[runtime] Implement mono_get_exception_out_of_memory for CoreCLR. ( #11608 )
2021-05-20 07:33:16 +02:00
Rolf Bjarne Kvinge
022fa9c697
[runtime] Throw a runtime exception instead of execution engine exception. ( #11599 )
...
* One less Mono Embedding method used: good for CoreCLR.
* More consistent with the rest of our code / behavior.
2021-05-19 07:34:13 +02:00
Rolf Bjarne Kvinge
ab14e07146
[runtime] Implement mono_class_value_size for CoreCLR. ( #11554 )
2021-05-14 15:19:34 +02:00
Rolf Bjarne Kvinge
eab3accf26
[runtime] Implement mono_class_is_enum and mono_class_enum_basetype for CoreCLR. ( #11553 )
...
* [runtime] Implement mono_class_is_enum for CoreCLR.
* [runtime] Implement mono_class_enum_basetype for CoreCLR.
2021-05-14 15:19:23 +02:00
Rolf Bjarne Kvinge
adb355b757
[runtime] Add support for creating managed exceptions from native code for CoreCLR. ( #11538 )
2021-05-14 07:27:42 +02:00
Rolf Bjarne Kvinge
5795a62f77
[runtime] Implement mono_method_full_name for CoreCLR. ( #11536 )
2021-05-13 22:04:09 +02:00
Rolf Bjarne Kvinge
0a0a849b02
[runtime] Implement mono_class_is_nullable for CoreCLR. ( #11528 )
2021-05-13 22:03:22 +02:00
Rolf Bjarne Kvinge
83dbeda8c6
[runtime] Refactor xamarin_get_nsnumber_converter to use string comparisons instead of mono_type_get_type. ( #11530 )
...
This makes it easier for CoreCLR. Also, at least for CoreCLR, it's unlikely to
be slower, since we'd have to compute the MONO_TYPE_* value in any
compatibility function.
2021-05-13 20:56:02 +02:00
Rolf Bjarne Kvinge
64e19d2d34
[runtime] Implement mono_class_get_nullable_param for CoreCLR. ( #11531 )
2021-05-13 20:39:07 +02:00
Rolf Bjarne Kvinge
95dfc4fa39
[runtime] Implement mono_value_box for CoreCLR. ( #11533 )
2021-05-13 20:38:21 +02:00
Rolf Bjarne Kvinge
751976a769
[CoreCLR] Stub out mono_runtime_set_pending_exception for CoreCLR. ( #11521 )
...
We need additional API in CoreCLR to support pending exception properly, and
this is in progress [1]. In the meantime, stub out parts of it, so that the
process doesn't abort. This way we'll have failing tests instead (and work in
other areas can progress, since the process doesn't abort).
[1]: https://github.com/dotnet/runtime/pull/52146
2021-05-13 07:12:17 +02:00
Rolf Bjarne Kvinge
39b0ca4934
[runtime] Implement mono_reflection_type_get_type for CoreCLR. ( #11513 )
...
This also meant reviewing calling code to make sure that the return value is
released when it should be.
2021-05-12 23:37:40 +02:00
Rolf Bjarne Kvinge
b4fd5f1e63
[runtime] Implement mono_get_string_class for CoreCLR. ( #11514 )
2021-05-12 15:22:11 +02:00
Rolf Bjarne Kvinge
6e9d9b483d
[runtime] Implement mono_array_new and mono_array_length for CoreCLR. ( #11515 )
...
* [runtime] Implement mono_array_new for CoreCLR.
* [runtime] Implement mono_array_length for CoreCLR.
2021-05-12 15:21:56 +02:00
Rolf Bjarne Kvinge
af41f128de
[runtime] Implement mono_class_get_element_class for CoreCLR. ( #11500 )
2021-05-12 07:31:26 +02:00
Rolf Bjarne Kvinge
a09a7d2523
[runtime] Implement the mono_g_hash_table functions for CoreCLR. ( #11495 )
2021-05-11 22:16:41 +02:00
Rolf Bjarne Kvinge
8bb65492ec
[runtime] Implement mono_string_new and mono_string_to_utf8 for CoreCLR. ( #11492 )
...
* [runtime] Implement mono_string_to_utf8 for CoreCLR.
* [runtime] Implement mono_string_new for CoreCLR.
2021-05-11 15:16:01 +02:00
Rolf Bjarne Kvinge
feed3b2636
[runtime] Implement mono_object_unbox for CoreCLR. ( #11493 )
2021-05-11 15:15:41 +02:00
Rolf Bjarne Kvinge
5692f34d4e
[runtime] Implement mono_class_get_type for CoreCLR. ( #11494 )
...
This also meant reviewing calling code to make sure that the return value is
released when it should be.
2021-05-11 15:15:03 +02:00
Rolf Bjarne Kvinge
88b8c332a7
[runtime] Implement mono_method_get_object for CoreCLR. ( #11488 )
...
This also meant reviewing calling code to make sure that the return value is
released when it should be.
2021-05-11 07:21:18 +02:00
Rolf Bjarne Kvinge
e4fbc5198b
[runtime] Implement several xamarin_is_class_* variants for CoreCLR. ( #11481 )
...
When using the MonoVM, we compare MonoClass instances by pointer. This turns
out a bit complicated for CoreCLR, because our MonoClass instances are not
unique (there can be multiple MonoClass instances that refer to the same
type), so instead implement helper methods that do the comparison. This also
has the benefit of not requiring any memory allocations on CoreCLR.
2021-05-10 23:12:52 +02:00
Rolf Bjarne Kvinge
3623a13ab2
[runtime] Implement a managed implementation of a mono_reference_queue for CoreCLR. ( #11487 )
...
Also remove the declaration of mono_gc_reference_queue_free, it's never called.
2021-05-10 23:09:39 +02:00
Rolf Bjarne Kvinge
8fc51f7e8e
[runtime] Implement mono_type_get_object for CoreCLR. ( #11484 )
2021-05-10 15:38:13 +02:00
Rolf Bjarne Kvinge
c14fa03336
[runtime] Implement mono_class_is_[valuetype|byref] for CoreCLR. ( #11482 )
...
* [runtime] Implement mono_type_is_byref for CoreCLR.
* [runtime] Implement mono_class_is_valuetype for CoreCLR.
2021-05-10 15:10:03 +02:00
Rolf Bjarne Kvinge
d89d97d1fe
[runtime] Implement mono_class_get_name[space] for CoreCLR. ( #11483 )
2021-05-10 14:42:47 +02:00
Rolf Bjarne Kvinge
695eb003fb
[runtime] Implement mono_thread_detach_if_exiting and mono_free for CoreCLR. ( #11480 )
...
* [runtime] Implement mono_free for CoreCLR.
* [runtime] Implement mono_thread_detach_if_exiting for CoreCLR.
2021-05-10 07:25:45 +02:00
Rolf Bjarne Kvinge
f61cc98c53
[runtime] Implement mono_class_is_delegate for CoreCLR. ( #11476 )
2021-05-07 22:21:19 +02:00
Rolf Bjarne Kvinge
1a689d3b14
[runtime] Implement mono_class_from_mono_type for CoreCLR. ( #11470 )
2021-05-07 15:47:03 +02:00
Rolf Bjarne Kvinge
63db14ec7d
[runtime] Implement mono_method_signature and related signature methods for CoreCLR. ( #11465 )
2021-05-06 16:19:59 +02:00
Rolf Bjarne Kvinge
c51cba525a
[runtime] Implement mono_runtime_invoke for CoreCLR. ( #11439 )
...
* [runtime] Implement mono_runtime_invoke for CoreCLR.
* [runtime] We always need a native xamarin_mono_object_retain function.
2021-05-06 07:25:43 +02:00
Rolf Bjarne Kvinge
81300576ff
[runtime] Implement mono_object_isinst for CoreCLR. ( #11427 )
2021-05-04 20:20:46 +02:00
Rolf Bjarne Kvinge
41bf71a0e2
[runtime] Implement mono_object_get_class for CoreCLR. ( #11398 )
2021-05-04 14:31:20 +02:00
Rolf Bjarne Kvinge
0285689aa3
[runtime] Never disable exception marshalling for CoreCLR. ( #11407 )
2021-05-04 08:28:34 +02:00
Rolf Bjarne Kvinge
f0a0d08aeb
[runtime] Call into managed code to handle runtime exceptions. ( #11381 )
...
* [runtime] Call into managed code to handle runtime exceptions.
This makes things easier for CoreCLR.
There should be no significant performance hits; this code path is
exceptional, and exceptions are already very heavy-weight anyways.
* Update to use xamarin_free instead of mono_free as per review.
* Port more to managed code.
2021-05-04 08:19:46 +02:00
Rolf Bjarne Kvinge
8e9f86aad8
[runtime] Implement mono_method_get_class for CoreCLR. ( #11389 )
2021-04-30 07:53:30 +02:00
Rolf Bjarne Kvinge
43f1d02dae
[CoreCLR] Implement xamarin_gchandle_get_target. ( #11333 )
...
This also meant reviewing calling code to make sure that MonoObject*s are
released when they should be, which meant reviewing every method that returns
a MonoObject*, and release the result.
2021-04-27 14:59:03 +02:00
Rolf Bjarne Kvinge
7b5a1c251c
[runtime] There's no need to attach/detach the current thread in CoreCLR. ( #11307 )
2021-04-26 07:46:55 +02:00
Rolf Bjarne Kvinge
e2082fd04c
[CoreCLR] Implement mono_jit_exec. ( #11264 )
...
This required adding a helper method to get the assembly name for a given
MonoAssembly, since that's what CoreCLR uses to determine what to execute.
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-22 07:46:56 +02:00
Rolf Bjarne Kvinge
6d127660d5
[runtime] Move the code to wrap every managed thread with an NSAutoreleasePool to the MonoVM bridge. ( #11257 )
...
The current implementation is MonoVM-specific, and won't work with CoreCLR
(something else will have to be implemented for CoreCLR, which is tracked
here: https://github.com/xamarin/xamarin-macios/issues/11256 ).
2021-04-21 16:21:09 +02:00
Rolf Bjarne Kvinge
320527a29b
[CoreCLR] Implement mono_assembly_get_object. ( #11254 )
2021-04-21 15:00:10 +02:00
Rolf Bjarne Kvinge
7bc45c097a
[runtime] Don't start the toggle ref machinery in CoreCLR. ( #10990 )
...
The implementation will be completely different, where the hook into CoreCLR
is in managed code.
We still need to initialize the framework_peer_release_lock mutex, so move
that code out of gc_enable_new_refcount.
2021-03-30 18:06:23 -04:00
Rolf Bjarne Kvinge
77b470cfaf
[CoreCLR] Implement mono_domain_get. ( #10992 )
2021-03-30 17:46:36 -04:00
Rolf Bjarne Kvinge
a82575189b
[CoreCLR] Add support for mono_assembly_open.
...
This includes going through all uses of mono_assembly_open, and make sure the release
the returned assembly.
2021-03-25 07:32:32 +01:00
Rolf Bjarne Kvinge
18ac48c5c8
[runtime] Make it possible to implement Mono Embedding API in the CoreCLR bridge
...
By making it possible to skip the automatically generated Mono Embedding API that
just asserts.
2021-03-25 07:32:32 +01:00
Rolf Bjarne Kvinge
9153edebda
[runtime] Redirect to our objc_msgSend wrapper functions when needed for .NET code. ( #10932 )
...
This makes the mono_dllmap_insert function unnecessary for .NET, so remove it.
Ref: https://github.com/dotnet/runtime/issues/48110
Ref: https://github.com/dotnet/runtime/issues/43204
Ref: #10504
2021-03-24 09:17:35 +01:00
Rolf Bjarne Kvinge
b2248993de
[runtime] Don't register for GC callbacks with CoreCLR, this will be done in a completely different manner (through managed code). ( #10931 )
2021-03-23 07:35:38 +01:00
Rolf Bjarne Kvinge
c406cc1da7
[runtime] Don't install any logging/printing handlers for CoreCLR, there's no equivalent. ( #10927 )
...
This also means that we don't have to generate CoreCLR wrappers for the corresponding
embedding API, so adjust the generated code accordingly.
2021-03-22 15:18:37 +01:00