iroha
iroha copied to clipboard
Optimize usecase of `fn(self) -> Self`
Initially we had optimization of case when function consume and return self.
This optimization was created with assumption that every structure passed as pointer into FFI, which not hold for non-opaque structures and transparent structures with non-opaque inner field.
We should explore possible ways to turn on this optimization depending on struct type, but it seems like we can't decide type of structure from just looking on structure impl block.