-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
split compiler.c into compiler and codegen #121404
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
Comments
iritkatriel
added
the
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
label
Jul 5, 2024
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Jul 5, 2024
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Jul 8, 2024
iritkatriel
added a commit
that referenced
this issue
Jul 8, 2024
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Jul 9, 2024
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Jul 9, 2024
iritkatriel
added a commit
that referenced
this issue
Jul 10, 2024
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this issue
Jul 11, 2024
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this issue
Jul 11, 2024
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Jul 22, 2024
…ler_body up to compiler_codegen
iritkatriel
added a commit
that referenced
this issue
Jul 22, 2024
…dy up to compiler_codegen (#122127)
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Jul 23, 2024
iritkatriel
added a commit
that referenced
this issue
Jul 24, 2024
nohlson
pushed a commit
to nohlson/cpython
that referenced
this issue
Jul 24, 2024
nohlson
pushed a commit
to nohlson/cpython
that referenced
this issue
Jul 24, 2024
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Aug 14, 2024
…e into codegen and compiler parts
iritkatriel
added a commit
that referenced
this issue
Aug 15, 2024
… codegen and compiler parts (#123021)
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Aug 15, 2024
…e into codegen and compiler parts
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Aug 15, 2024
…e direct usages by the macros
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Aug 15, 2024
…e direct usages by the macros
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Aug 15, 2024
…e direct usages by the macros
iritkatriel
added a commit
that referenced
this issue
Aug 23, 2024
iritkatriel
added a commit
that referenced
this issue
Aug 23, 2024
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Aug 27, 2024
iritkatriel
added a commit
that referenced
this issue
Aug 27, 2024
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Aug 27, 2024
iritkatriel
added a commit
that referenced
this issue
Aug 27, 2024
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Aug 30, 2024
… codegen functions
iritkatriel
added a commit
that referenced
this issue
Aug 30, 2024
… first and compiler functions second (#123510)
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Sep 1, 2024
…mpiler doesn't use codegen macros
iritkatriel
added a commit
that referenced
this issue
Sep 2, 2024
… doesn't use codegen macros (#123575)
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Sep 3, 2024
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Sep 3, 2024
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Sep 3, 2024
iritkatriel
added a commit
that referenced
this issue
Sep 9, 2024
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Sep 10, 2024
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Sep 15, 2024
iritkatriel
added a commit
that referenced
this issue
Sep 15, 2024
savannahostrowski
pushed a commit
to savannahostrowski/cpython
that referenced
this issue
Sep 22, 2024
efimov-mikhail
added a commit
to efimov-mikhail/cpython
that referenced
this issue
Oct 8, 2024
iritkatriel
pushed a commit
that referenced
this issue
Oct 8, 2024
efimov-mikhail
added a commit
to efimov-mikhail/cpython
that referenced
this issue
Oct 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
compile.c is one of the largest source files in python (at about 8000 lines). Most of the code is code generation functions (the AST traversals). Most of the complexity is in the compiler data structure management.
In this work I will split out the code generation functions into a separate file so that they are independent of the compiler internals (access the compiler through an opaque reference and a well defined API). First I will transform the codegen functions so that they no longer access internals of
struct compiler
orstruct compiler_unit
. Then I will rename compile.c to codegen.c (to preserve commit history for the codegen functions) and copy out the compiler implementation code to a new file (compile.c, so the entry point is where people are used to finding it).The benefits will be that (1) codegen code is simpler (2) the complexity of compile.c is more manageable as it will probably only span 2-3K lines of code (3) it becomes possible to share parts of the compiler with alternative compiler implementation.
Linked PRs
The text was updated successfully, but these errors were encountered: