-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
GH-111485: Factor out tier 2 code generation from the rest of the interpreter code generator #112968
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few nits. Please also use black on all files you touched.
@@ -138,145 +57,6 @@ def declare_variables(inst: Instruction, out: CWriter) -> None: | |||
out.emit(f"{type}{var.name};\n") | |||
|
|||
|
|||
def emit_to(out: CWriter, tkn_iter: Iterator[Token], end: str) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you make any changes to the code that you moved to generators_common.py or stack.py? Or is it strictly a move?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is strictly a move
@@ -17,3 +33,143 @@ def write_header(generator: str, source: str, outfile: TextIO) -> None: | |||
// Do not edit! | |||
""" | |||
) | |||
|
|||
|
|||
def emit_to(out: CWriter, tkn_iter: Iterator[Token], end: str) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a method on CWriter
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that, but it tracks the parentheses in the tkn_iter
input, which seems out of scope for a writer.
…he interpreter code generator (pythonGH-112968)
…he interpreter code generator (pythonGH-112968)
Uh oh!
There was an error while loading. Please reload this page.