Skip to content
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

Extension Lua Instructions w/ flag can now break precompile #56

Merged
merged 1 commit into from
May 30, 2024

Conversation

DerelictDrone
Copy link
Member

When instructions in ZVM are branching, they need to set PrecompileBreak on the VM to end the compilation early, this ends the function and when the compiled block is run, any calls to VM:Jump will set VM.IP and be allowed to take effect, since VM.IP won't change as the block runs.

Uses the CB and UB flags to alter this behavior on a per instruction basis at initial load of extension.

So if you flag your function as being Conditionally Branched or Unconditionally Branched when using ext:InstructionFromLuaFunc your function will be able to call VM:Jump and have it take effect properly.

@DerelictDrone DerelictDrone merged commit 53206b3 into wiremod:master May 30, 2024
1 check failed
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.

2 participants