8000 fix: recursive generation of basic blocks by Fidget-Spinner · Pull Request #29 · pylbbv/pylbbv · GitHub
[go: up one dir, main page]

Skip to content

fix: recursive generation of basic blocks #29

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
Jun 12, 2023

Conversation

Fidget-Spinner
Copy link
@Fidget-Spinner Fidget-Spinner commented Jun 11, 2023

Closes #28

This allows basic blocks to not be generated contiguously. It does so by adding another CACHE entry to allow for jumping to a new successive basic block.

@Fidget-Spinner Fidget-Spinner requested a review from JuliaPoo June 11, 2023 12:32
@Fidget-Spinner
Copy link
Author
Fidget-Spinner commented Jun 11, 2023

Great. Now help(1) fails with a different error (a broken assertion). This is because of an inconsistency of states when entering and leaving a recursive function. Basically the following happens:

1st call to f (lasti saved as the tier 1 instruction)
2nd call to f (recursive)
...
nth call to f(lasti saved as the tier 2 instruction)
... bubbles back up
leaves 2nd call to f
leaves 1st call to f (lasti now out of sync since it is tier 1 instruction but actually tier 2 instruction is already available)

We are making progress. I need to fix this somewhere else.

Tracked in #30.

@JuliaPoo
Copy link

This is great ^-^

@JuliaPoo JuliaPoo merged commit 33988cf into pylbbv Jun 12, 2023
@Fidget-Spinner Fidget-Spinner deleted the fix/recursive_generation branch June 12, 2023 15:30
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.

recursive calls break one of our codegen invariants
2 participants
0