Skip to content

Fix branch table logic #776

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

Merged
merged 1 commit into from
Mar 7, 2025
Merged

Fix branch table logic #776

merged 1 commit into from
Mar 7, 2025

Conversation

ia0
Copy link
Member

@ia0 ia0 commented Mar 7, 2025

The main changes are:

  • Do not create a branch table entry for unreachable code. This saves space and permits a uniform treatment of branches.
  • Use the correct stack length for the Loop branch target (we're taking the branch before being in the label, so the current stack needs to be added).
  • Take the Else source and target branches at the correct time (i.e. when the stack is the expected one such that the stack length is correctly computed).

@ia0 ia0 requested review from zhouwfang and ia0-review March 7, 2025 10:07
The main changes are:
- Do not create a branch table entry for unreachable code. This saves space and permits a uniform
  treatment of branches.
- Use the correct stack length for the Loop branch target (we're taking the branch before being in
  the label, so the current stack needs to be added).
- Take the Else source and target branches at the correct time (i.e. when the stack is the expected
  one such that the stack length is correctly computed).
@ia0 ia0 merged commit 9f89c67 into google:dev/fast-interp Mar 7, 2025
19 checks passed
@ia0 ia0 deleted the pop-cnt branch March 7, 2025 10:22
@zhouwfang
Copy link
Contributor

#46

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.

3 participants