for the case using dynamic parameters in internal functions:
pub fn foo(arr: String) {
// here we are using `calldataload`
bar(arr)
}
fn bar(arr: String) {
// do sth ...
}
Solution
We are loading parameters of internal function from memory in zink, the memory slots are allocated in compilation but for dynamic variables, we'll use the pre-calculated slot & MSIZE to implement this
NOTE: if the above solution doesn't work, try to figure out a better one, otherwise totally align to solidity's implementation
Describe the feature
for the case using dynamic parameters in internal functions:
Solution
We are loading parameters of internal function from memory in zink, the memory slots are allocated in compilation but for dynamic variables, we'll use the pre-calculated slot &
MSIZE
to implement thisNOTE: if the above solution doesn't work, try to figure out a better one, otherwise totally align to solidity's implementation