Skip to content

Conversation

@dbalatoni13
Copy link
Contributor

@dbalatoni13 dbalatoni13 commented Mar 25, 2025

Will solve #1418. Decided to push my work so far, so we can discuss it as I work.

@dbalatoni13 dbalatoni13 requested a review from bates64 as a code owner March 25, 2025 18:11
asm.data,
context,
compiler,
compiler.language,
Copy link
Contributor Author

@dbalatoni13 dbalatoni13 Mar 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have this problem that the scratch's language is only decided below, when it gets serialized, so for now I just passed the compiler's default language to the decompiler at scratch creation. Do you have an idea how we could determine the language beforehand?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of putting together the --target flag manually, we could do the same what we do with compilers, just pass through the one defined in the preset (or scratch when the user decompiles after creation).

Copy link
Member

@ethteck ethteck Mar 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should probably have default language for compilers* and then bite the bullet and dedicated field on the scratch...? if it makes the most sense. I try to avoid adding fields to Scratch, but maybe this one is actually worth it

* I know we currently have compiler.language but we seem to rarely override it from C, where it should most likely be C++ for any gc/wii compilers.

@dbalatoni13 dbalatoni13 marked this pull request as draft March 25, 2025 20:42
@ethteck ethteck linked an issue Mar 26, 2025 that may be closed by this pull request
@dbalatoni13
Copy link
Contributor Author

I'm like 80% done with the feature. Have to get it to work and then we can start testing. :)

@dbalatoni13
Copy link
Contributor Author

dbalatoni13 commented Mar 26, 2025

We have some things that are all queried from the backend and filtered on the frontend like useCompilersForPlatform and some that are filtered on the backend. I'm adding a feature that gives you a dropdown to choose a decompiler (as there might be more in the future), for this I did the filtering for available ones based on the arch, type and language on the backend as I didn't see a point of having a list of all decompilers on the frontend, is this solution fine?

@dbalatoni13
Copy link
Contributor Author

dbalatoni13 commented Mar 26, 2025

Have to remove TODO comments.
Bugs: options don't load if there is no decompiler available
TODOs:

  • pass the flags to m2c
  • fix decompiler tests
  • formatting
  • test decompiler flags in presets
  • fix translation of knr
  • hide decompiler section if there aren't any available
  • test, test, test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language flag is missing for MWCC

2 participants