8000 gh-105481: remove HAS_ARG, HAS_CONST, IS_JUMP_OPCODE, IS_PSEUDO_OPCODE and replace by their new versions by iritkatriel · Pull Request #105865 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
remove IS_PSEUDO_OPCODE
  • Loading branch information
iritkatriel committed Jun 16, 2023
commit 7980c7b21fe8291b6b3ab1a2b3fd4b4fce65a3bd
2 changes: 0 additions & 2 deletions Include/opcode.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Python/assemble.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ static void
write_instr(_Py_CODEUNIT *codestr, instruction *instr, int ilen)
{
int opcode = instr->i_opcode;
assert(IS_PSEUDO_OPCODE(opcode) == IS_PSEUDO_INSTR(opcode));
assert(!IS_PSEUDO_INSTR(opcode));
int oparg = instr->i_oparg;
assert(OPCODE_HAS_ARG(opcode) || oparg == 0);
Expand Down
2 changes: 0 additions & 2 deletions Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ enum {
int
_PyCompile_InstrSize(int opcode, int oparg)
{
assert(IS_PSEUDO_OPCODE(opcode) == IS_PSEUDO_INSTR(opcode));
assert(!IS_PSEUDO_INSTR(opcode));
assert(OPCODE_HAS_ARG(opcode) || oparg == 0);
int extended_args = (0xFFFFFF < oparg) + (0xFFFF < oparg) + (0xFF < oparg);
Expand Down Expand Up @@ -249,7 +248,6 @@ static int
instr_sequence_addop(instr_sequence *seq, int opcode, int oparg, location loc)
{
assert(0 <= opcode && opcode <= MAX_OPCODE);
assert(IS_PSEUDO_OPCODE(opcode) == IS_PSEUDO_INSTR(opcode));
assert(IS_WITHIN_OPCODE_RANGE(opcode));
assert(OPCODE_HAS_ARG(opcode) || HAS_TARGET(opcode) || oparg == 0);
assert(0 <= oparg && oparg < (1 << 30));
Expand Down
2 changes: 0 additions & 2 deletions Tools/build/generate_opcode_h.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

footer = """

#define IS_PSEUDO_OPCODE(op) (((op) >= MIN_PSEUDO_OPCODE) && ((op) <= MAX_PSEUDO_OPCODE))

#ifdef __cplusplus
}
#endif
Expand Down
0