kassane / rsDemangle-zig

rust demangle on zig
Apache License 2.0
0 stars 0 forks source link

`translate-c`: can't handle goto #1

Open kassane opened 2 years ago

kassane commented 2 years ago

Ref:

kassane commented 2 years ago

I will try to follow up with some alternative with the goal of bringing a fully zig (libc non-dependent) solution.

Then I will try to link to the zig project replacing libc++(LLVM). Example project:

cc: @eddyb

kassane commented 1 year ago

Currently zig is still not translating goto and labelstmt. Therefore it was necessary to remove it from the original code and try to retranslate it to zig.

And it worked normally with the zig translated version. However, there are still dependencies on the C API. The next step, to refactor the code so that it no longer depends on the C API.

kassane commented 1 year ago

During the initial refactoring process it was still missing to replace these implementations equivalently in zig std. https://github.com/kassane/rsDemangle-zig/blob/ead421690c997f13119e003daaf58ad11455c4de/src/demangle.zig#L1066-L1069 Also, the malloc and free obtained by std.c.

kassane commented 1 year ago

Any suggestions? Please! @kubkon

kassane commented 1 year ago

I believe that some anyopaque pointers will need to be removed for zig types. During this process will include in some steps the comptime type to speed up some redefinitions.