Mono on WASM relies on trampolines for a fixed pre-defined set of
method signatures in order for the interpreter to call native
functions.
As a workaround for this limitation, Godot has been passing long,
ulong, float and double as pointers in internal calls.
This patch should allow Godot to provide its own trampolines, which
can be generated automatically at compile time thanks to templates.
This patch is made against the Mono tag mono-6.12.0.111. The
following commit is expected to break this patch:
mono/mono@174aeaa31c
It will need to be updated once we upgrade the a newer Mono
version in the official Godot builds.
Mono's Boehm GC was replaced with a newer one on latest versions, and the new
one already has this patch.
This change won't be a problem for older versions as we don't build boehm anyway.