Remove varargs from g_assert and g_assert_not_reachable. (#17254)
commit8718b75b7a89f04e2423d11a009f11b37ef802df
authorJay Krell <jaykrell@microsoft.com>
Wed, 9 Oct 2019 20:56:06 +0000 (9 13:56 -0700)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 9 Oct 2019 20:56:06 +0000 (9 22:56 +0200)
tree05443760d75d820c167d76f8de9c55b0a2bcc493
parent7df7ceb6d30ebf2a9e4856f155839906c0c64797
Remove varargs from g_assert and g_assert_not_reachable. (#17254)

Remove varargs from g_assert and g_assert_not_reachable (save 200+ bytes per frame in wasm interp).

g_assertf unchanged.

I have a strong suspicion, this will save approximately 432 - sizeof (InterpFrame) bytes of stack
per function call in the WebAssembly interpreter.

It will not significantly benefit or hurt any other system.
Systems with disabled asserts will receive a small size improvement.

WebAssembly has no provision for varargs.
Emscripten emulates it.
It appears the emulation allocates room in the frame per outgoing varargs call.
No stack packing.
So each g_assert takes space.

Alternative would be to discourage or disable or remove asserts.
mono/eglib/glib.h
mono/eglib/goutput.c