Wrapping addmod/mulmod in functions (or using an Fp struct with Add/Mul traits) works at small scale but crashes sonatina's stack object allocator when composed in 57+ loop iterations with large const arrays.
This is the Poseidon hash use case. The same code works with direct addmod/mulmod calls.
Error: "missing stack object location for obj N" at evm/mod.rs:3498.
Sean noted this may be fixed on his const array branch but it's not on sonatina main yet. Filed upstream at fe-lang/sonatina#227.
Wrapping addmod/mulmod in functions (or using an Fp struct with Add/Mul traits) works at small scale but crashes sonatina's stack object allocator when composed in 57+ loop iterations with large const arrays.
This is the Poseidon hash use case. The same code works with direct addmod/mulmod calls.
Error: "missing stack object location for obj N" at evm/mod.rs:3498.
Sean noted this may be fixed on his const array branch but it's not on sonatina main yet. Filed upstream at fe-lang/sonatina#227.