gh-109256: allocate opcode IDs for internal opcodes in their own range by iritkatriel · Pull Request #109269 · python/cpython
iritkatriel
changed the title
gh-09256: allocate opcode IDs for internal opcodes in their own range
gh-109256: allocate opcode IDs for internal opcodes in their own range
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, in general.
test_dis will need fixing up, of course.
As you need to fix test_dis anyway could you make RESUME opcode 1? If it is to have a special number, it might as well be memorable.
map_op(1, "RESUME") next_opcode = 2
Looks good, in general.
test_diswill need fixing up, of course.As you need to fix
test_disanyway could you makeRESUMEopcode 1? If it is to have a special number, it might as well be memorable.map_op(1, "RESUME") next_opcode = 2
RESUME has an arg though, so I thought it should be after HAVE_ARGUMENT? Unless we want to special case it.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Should save a fair bit of future churn.
Merge conflicts need fixing, obviously.