snarkVM
snarkVM copied to clipboard
[Feature] Support `ternary` over composite data types.
🚀 Feature
The AVM only supports ternary operations on LiteralTypes.
In Leo, when a ternary operation is performed over a 1-D array, the compiler rewrites it into N ternaries over each of the elements and a cast to aggregate the result.
By supporting this in the AVM we can:
- reduce the amount of bytecode generated, enabling programs that would have otherwise exceeded the program size limit.
- make AVM bytecode generated by Leo easier to audit.