gh-125039: Make this_instr/prev_instr const in cases generator (GH-125071)

This commit is contained in:
Tomas R. 2024-10-09 14:54:39 +02:00 committed by GitHub
parent 3024b16d51
commit 6b533a659b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 79 additions and 78 deletions

View file

@ -450,7 +450,7 @@ class TestGeneratedCases(unittest.TestCase):
"""
output = """
TARGET(OP) {
_Py_CODEUNIT *this_instr = frame->instr_ptr = next_instr;
_Py_CODEUNIT* const this_instr = frame->instr_ptr = next_instr;
(void)this_instr;
next_instr += 4;
INSTRUCTION_STATS(OP);
@ -503,7 +503,7 @@ class TestGeneratedCases(unittest.TestCase):
next_instr += 6;
INSTRUCTION_STATS(OP);
PREDICTED(OP);
_Py_CODEUNIT *this_instr = next_instr - 6;
_Py_CODEUNIT* const this_instr = next_instr - 6;
(void)this_instr;
_PyStackRef left;
_PyStackRef right;
@ -536,7 +536,7 @@ class TestGeneratedCases(unittest.TestCase):
}
TARGET(OP1) {
_Py_CODEUNIT *this_instr = frame->instr_ptr = next_instr;
_Py_CODEUNIT* const this_instr = frame->instr_ptr = next_instr;
(void)this_instr;
next_instr += 2;
INSTRUCTION_STATS(OP1);