diff options
author | Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com> | 2022-04-28 00:36:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 22:36:34 -0600 |
commit | 37c6db60f9ac62b8a80bf04a8146274756ee0da0 (patch) | |
tree | 29cc3ac65b9ee6d2246f4efbdf23767749fbd9bd /Python/compile.c | |
parent | 407c3afe1986f4c43cb0e68e28b90da30eebd738 (diff) | |
download | cpython-37c6db60f9ac62b8a80bf04a8146274756ee0da0.tar.gz cpython-37c6db60f9ac62b8a80bf04a8146274756ee0da0.zip |
gh-91869: Fix tracing of specialized instructions with extended args (GH-91945)
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c index 42b011ce93e..10d6307a484 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -211,13 +211,13 @@ write_instr(_Py_CODEUNIT *codestr, struct instr *instruction, int ilen) int caches = _PyOpcode_Caches[opcode]; switch (ilen - caches) { case 4: - *codestr++ = _Py_MAKECODEUNIT(EXTENDED_ARG, (oparg >> 24) & 0xFF); + *codestr++ = _Py_MAKECODEUNIT(EXTENDED_ARG_QUICK, (oparg >> 24) & 0xFF); /* fall through */ case 3: - *codestr++ = _Py_MAKECODEUNIT(EXTENDED_ARG, (oparg >> 16) & 0xFF); + *codestr++ = _Py_MAKECODEUNIT(EXTENDED_ARG_QUICK, (oparg >> 16) & 0xFF); /* fall through */ case 2: - *codestr++ = _Py_MAKECODEUNIT(EXTENDED_ARG, (oparg >> 8) & 0xFF); + *codestr++ = _Py_MAKECODEUNIT(EXTENDED_ARG_QUICK, (oparg >> 8) & 0xFF); /* fall through */ case 1: *codestr++ = _Py_MAKECODEUNIT(opcode, oparg & 0xFF); @@ -8254,6 +8254,7 @@ fix_cell_offsets(struct compiler *c, basicblock *entryblock, int *fixedmap) struct instr *inst = &b->b_instr[i]; // This is called before extended args are generated. assert(inst->i_opcode != EXTENDED_ARG); + assert(inst->i_opcode != EXTENDED_ARG_QUICK); int oldoffset = inst->i_oparg; switch(inst->i_opcode) { case MAKE_CELL: |