diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2024-07-25 14:45:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-25 14:45:07 -0700 |
commit | d9efa45d7457b0dfea467bb1c2d22c69056ffc73 (patch) | |
tree | 82176acb7bdce074599d58ba0e82df86fc15f4dc /Python/generated_cases.c.h | |
parent | 1d607fe759ef22177b50d734ae029df3903c99e0 (diff) | |
download | cpython-d9efa45d7457b0dfea467bb1c2d22c69056ffc73.tar.gz cpython-d9efa45d7457b0dfea467bb1c2d22c69056ffc73.zip |
GH-118093: Add tier two support for BINARY_OP_INPLACE_ADD_UNICODE (GH-122253)
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r-- | Python/generated_cases.c.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 6f996f91921..c9907438ddc 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -181,8 +181,14 @@ { PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); + int next_oparg; + #if TIER_ONE assert(next_instr->op.code == STORE_FAST); - _PyStackRef *target_local = &GETLOCAL(next_instr->op.arg); + next_oparg = next_instr->op.arg; + #else + next_oparg = CURRENT_OPERAND(); + #endif + _PyStackRef *target_local = &GETLOCAL(next_oparg); DEOPT_IF(!PyStackRef_Is(*target_local, left), BINARY_OP); STAT_INC(BINARY_OP, hit); /* Handle `left = left + right` or `left += right` for str. @@ -203,9 +209,12 @@ *target_local = PyStackRef_FromPyObjectSteal(temp); _Py_DECREF_SPECIALIZED(right_o, _PyUnicode_ExactDealloc); if (PyStackRef_IsNull(*target_local)) goto pop_2_error; - // The STORE_FAST is already done. + #if TIER_ONE + // The STORE_FAST is already done. This is done here in tier one, + // and during trace projection in tier two: assert(next_instr->op.code == STORE_FAST); SKIP_OVER(1); + #endif } stack_pointer += -2; assert(WITHIN_STACK_BOUNDS()); |