Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 598dbc8ae3
Use pointer-sized GCHandles everywhere. (#10597)
* Convert the GCHandles interface from 32-bit ints to pointer size types

This involves:

* Stop using some bits of the GCHandle to store extra flags, instead add an extra
  field to store those flags.
* Define a INVALID_GCHANDLE constant and use it instead of 0/NULL. This is not
  strictly required, but it makes the code more self-documenting.
* Define a GCHandle type (typedef'ed to void*) and change all variables and parameters
  to use it instead of guint32.
* Use our own xamarin_gchandle_* methods (with pointer-sized types) that wraps
  the mono_gchandle_* embedding API (which uses 32-bit types) everywhere.
* Update managed code (registrars, runtime code, etc) accordingly.

* [runtime] Make debug code compile.

* Fix typo.

* Fix signature of xamarin_create_gchandle.

Co-authored-by: Aaron R Robinson <arobins@microsoft.com>
2021-02-11 08:18:38 +01:00
Manuel de la Pena 3f0985ecac
[Runtime] Move some of the changes back to int. (#7529)
Some of the fixes done for the warnings have breaking changes. Move back
to int and ensure that we do not have any compilation errors (we are
using -Werror).

Fixes: https://github.com/xamarin/xamarin-macios/issues/7509
2019-12-11 22:17:29 -05:00
Manuel de la Pena 2e5b64893f
[Runtime] Enable the -Wshorten-64-to-32 flag and fix all warnings. (#7353)
* [Runtime] Enable the -Wshorten-64-to-32 flag and fix all warnings.

We want to enable the -Wconversion but that will raise too many warning
for a single commit. We are enabiling one by one the flags included in
-Wconversion so that we have smaller diffs.

-Wshorten-64-to-32 adds warnings when there is a implicit conversion that
loses integer precision. We are moving all the 32 to 64 conversions to
use 64. Expecially since most of the code changed is related with sizes,
legths and params counts that are never going to be negative.


Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2019-11-05 11:00:14 -05:00
Rolf Bjarne Kvinge c97d267faf
[runtime] Implement support for an arm64 dynamic registrar. (#6005)
This is required in order to execute downloaded assemblies (or any other
assembly not known at compile time) on device.
2019-05-07 07:35:39 +02:00
Rolf Bjarne Kvinge 37a280d974
[runtime] Put LOGZ directive in a header to not duplicate it everywhere. (#6001) 2019-05-06 19:29:28 +02:00
Rolf Bjarne Kvinge 4be637aa8e
[registrar] Fix marshalling of structs with a single member. (#5986) 2019-05-06 07:26:54 +02:00
Rolf Bjarne Kvinge 7ecbc7abee [registrar] Add support for the BindAs attribute. 2017-07-04 07:35:29 +02:00
Rolf Bjarne Kvinge 2d28e24837 [runtime] Handle any exceptions whenever we return from managed code. 2016-06-08 20:05:54 +02:00
Rolf Bjarne Kvinge ac418df815 Build our runtime. 2016-04-24 14:47:24 -04:00