GLib merge requestshttps://gitlab.gnome.org/GNOME/glib/-/merge_requests2019-10-08T10:38:00Zhttps://gitlab.gnome.org/GNOME/glib/-/merge_requests/194WIP: Improve code generation for closure ref counting2019-10-08T10:38:00ZPunit AgrawalWIP: Improve code generation for closure ref countingThe reference counting used with closures generates very poor code on arm64. As a result the closures test takes >150 min to run to completion on a particular arm64 platform.
This small set of patches updates the ref counting used in cl...The reference counting used with closures generates very poor code on arm64. As a result the closures test takes >150 min to run to completion on a particular arm64 platform.
This small set of patches updates the ref counting used in closure to generate tighter code which results in significant speeds. The closures test now takes ~20 min on the same hardware.
Closes: #13162.63.1https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1226gclosure: avoid -Wincompatible-pointer-types compiler warning for G_CALLBACK(...2019-11-14T18:27:25ZThomas Hallergclosure: avoid -Wincompatible-pointer-types compiler warning for G_CALLBACK() cast macroThe -Wincompatible-pointer-types compiler warning [1] is very useful to catch
wrong casts for function pointers. It flags in uses where the function signature
is incompatible with the desired type.
However see for example g_source_s...The -Wincompatible-pointer-types compiler warning [1] is very useful to catch
wrong casts for function pointers. It flags in uses where the function signature
is incompatible with the desired type.
However see for example g_source_set_callback() function which expects
a GCallback function argument. Then we have sources like g_unix_fd_add(),
which expect a callback with a GUnixFDSourceFunc signature.
The cast macro was not usable for this purpose, if it doesn't silence the
cast warning.
Compare also G_SOURCE_FUNC() macro which does a similar thing [2].
The difference is that G_SOURCE_FUNC() was added exactly for this
purpose from the start. Here, the commit changes a pre-existing
G_CALLBACK() macro and silences warnings. I still think this change
is desirable.
[1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcast-function-type
[2] https://gitlab.gnome.org/GNOME/glib/commit/039fa6897bb4c5cd30caec8ee3add1a4ef612f76