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

Refactor compiler so that the low level code generation functions operate on a basicblock* #93008

Closed
iritkatriel opened this issue May 20, 2022 · 0 comments · Fixed by #93009
Closed
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@iritkatriel
Copy link
Member

iritkatriel commented May 20, 2022

The compiler's functions that add instructions (compiler_addop, etc) take a struct compiler * arg, so they cannot be reused by the optimiser/assembler. They should be refactored so that they only take a basicblock*.

While I'm at it, I will roll compiler_check_if_end_of_block into the subsequent compiler_use_new_implicit_block_if_needed (which can look at the last instruction in the block).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
Projects
None yet
2 participants