Unit test for reverse trampolines (callbacks) with aggregate types.
This test file verifies that infix can correctly create and execute reverse trampolines for functions that take or return aggregate types (structs, unions, etc.) by value. This is a critical test of the reverse-call JIT-compiler and the ABI implementation's ability to correctly marshal arguments from their native locations (registers/stack) into the generic format for the C handler.
The test covers:
- Small Structs: A Point struct, which is typically passed in registers. Both the type-safe callback and generic closure models are tested.
- Large Structs: A LargeStruct, which is passed/returned by reference via a hidden pointer, testing the stub's ability to handle this ABI rule.
- Structs with Arrays: A Vector4 struct, which may be an HFA on some platforms.
- Unions: A Number union, testing the handling of this aggregate type.
- Packed Structs: A PackedStruct with non-natural alignment, testing that the raw bytes are correctly marshalled regardless of internal layout.