Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP] Struct encoder #2433
Currently, we can only reduce duplication if all encoders are handled in a single pass of the JULIA parser, because only then we can have different JULIA functions referencing themselves. This is only possible if the ABI encoder has a label we can jump to. This requires the following refactorings:
Each call to
Furthermore, we have to have a way to reference a label in a piece of JULIA code from outside of that JULIA code and this also has to be possible before that code is even parsed.
I think the best solution to this problem is to provide a string as a hint to
By the way, an example encoder now looks as follows:
I.e. it has very detailed "convert" and "cleanup" calls which makes it very visible what happens and those can also probably be easily inlined.