8000 GH-93678: reduce boilerplate and code repetition in the compiler by iritkatriel · Pull Request #93682 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-93678: reduce boilerplate and code repetition in the compiler #93682

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 18 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
trivial stuff
  • Loading branch information
iritkatriel committed Jun 10, 2022
commit 9b5dc34b512317fe6a0ff5915a622cb5040b935c
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Refactor the compiler's code-gen functions to reduce boilerplate and
repetition.
Refactor the compiler to reduce boilerplate and repetition.
6 changes: 2 additions & 4 deletions Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,9 @@ is_relative_jump(struct instr *i)
}

static inline int
is_block_push(struct instr *instr)
is_block_push(struct instr *i)
{
int opcode = instr->i_opcode;
return IS_BLOCK_PUSH_OPCODE(opcode);
return IS_BLOCK_PUSH_OPCODE(i->i_opcode);
}

static inline int
Expand Down Expand Up @@ -385,7 +384,6 @@ struct compiler_unit {
struct location u_loc; /* line/column info of the current stmt */
};


/* This struct captures the global state of a compilation.

The u pointer points to the current compilation unit, while units
Expand Down
0