Optimize function invocation, fix allocation cleanup
Rather than using the "toy" API g_function_info_invoke, looking up the function info each time, cache the prepared libffi cif inside Function. This applies to method invocations; constructors still fall back to a slow path. Introspection now supports a stack-allocated API for getting argument information; use it and avoid malloc'ing repeatedly in the invocation fast path. The way processing failure was handled was pretty broken; we had just a single global "failed" argument, which we set to TRUE if at any point something failed. But this would cause memory leaks if for example we failed in the middle of releasing input arguments; we'd never free the remaining args. Clean this up by introducing different variables which we use at different points. https://bugzilla.gnome.org/show_bug.cgi?id=604076
parent
5c8e08bc