-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for unintentional removal of some leave
instructions
#96
Conversation
One issue I can see is if a transpiler is looking for the leave it will most likely not check that it's the last leave of the two, which can lead to unexpected behaviour. I believe this was the intent for deduplicating the leaves in the first place. |
That's not going to happen. These instructions are added after all transpilers have already been applied, and repatching takes original instructions anyway EDIT: I think this deduplication was intended to clean up potential errors on the part of the user, like moving labels or blocks unintentionally. But from my point of view it just ends up causing more problems for those who know what they are doing. Even though this is easily bypassed by adding a |
In that case this should work, yeah. @mgreter can you confirm if this fixes the issue for you? |
Can confirm, this also fixes the issue I was having as well. |
Seems OK to me, as it is basically the same fix I had initially proposed, just without the proposed fix to cleanup the added leave statements in https://github.com/BepInEx/HarmonyX/pull/77/files. So for me, good to go! |
Stumbled upon another case of an issue due to this deduplication while patching state machines, this seems to cause more issues than it was originally solving. Is there any ETA on merging/releasing this? |
I'm basically only waiting for more people to test this. |
The None of the patches we are using seem to break by this PR. |
I just ran some tests and everything seems to be working with this PR and latest stable bep5. I'll merge this once the #79 situation is resolved. |
Changes are exactly as expected, IL is functionally the same just with more jumps
My vision of #65 fix. Yes, this will keep 2
leave
instructions, but it's jump anyway, no harm done. Upstream harmony makes it this way.And, if someone wants to, they can find a way to remove these duplicates without offset shifting later on