Biohazrd
Biohazrd copied to clipboard
Consider reworking constant array support to (optionally?) emit nested types
Somewhat related: https://github.com/InfectedLibraries/Biohazrd/issues/137
Having constant arrays being shared isn't going to work well when you're using multiple Biohazrd libraries anyway. It might also be a good idea to support (optionally?) referencing the ConstantArrayEnumerator<T>
from a NuGet package. Having them pooled is also annoying when you use Biohazrd to split a C++ library's interop library across multiple assemblies.
It might not be a bad idea to have type reduction emit special ConstantArrayTypeReference
s and let a separate transformation worry about how to make them emittable. (That would also support things like emitting C# basic types as C# fixed-size arrays.)