The EVM backend panics when lowering a function call with more than 16 arguments:
thread 'main' panicked at crates/codegen/src/stackalloc/stackify/sym_stack.rs:247:9:
call operand count exceeds SWAP16
fn many_params(
_ a1: u256, _ a2: u256, _ a3: u256, _ a4: u256,
_ a5: u256, _ a6: u256, _ a7: u256, _ a8: u256,
_ a9: u256, _ a10: u256, _ a11: u256, _ a12: u256,
_ a13: u256, _ a14: u256, _ a15: u256, _ a16: u256,
_ a17: u256,
) -> u256 {
let sum = a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8
sum + a9 + a10 + a11 + a12 + a13 + a14 + a15 + a16 + a17
}
pub contract Crash {
init() {}
recv TestMsg {
Test {} -> u256 {
many_params(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
}
}
}
16 params works. 17 panics.
This blocks typed EC pairing wrappers (BN254 4-pair pairing needs 24 u256 args) and any function with a wide parameter list. The workaround is to pass data through memory instead of as function arguments.
Description
The EVM backend panics when lowering a function call with more than 16 arguments:
Minimal Reproduction
16 params works. 17 panics.
Impact
This blocks typed EC pairing wrappers (BN254 4-pair pairing needs 24 u256 args) and any function with a wide parameter list. The workaround is to pass data through memory instead of as function arguments.
Expected behavior
The compiler should either:
Environment