GH-123232: Factor BINARY_SLICE and STORE_SLICE to handle stats properly for tier 2. (GH-123381)

This commit is contained in:
Mark Shannon 2024-08-27 10:49:39 +01:00 committed by GitHub
parent 89328f7b12
commit 54a05a4600
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 229 additions and 197 deletions

View file

@ -797,7 +797,6 @@
PyObject *slice = _PyBuildSlice_ConsumeRefs(PyStackRef_AsPyObjectSteal(start),
PyStackRef_AsPyObjectSteal(stop));
PyObject *res_o;
OPCODE_DEFERRED_INC(BINARY_SLICE);
// Can't use ERROR_IF() here, because we haven't
// DECREF'ed container yet, and we still own slice.
if (slice == NULL) {
@ -827,7 +826,6 @@
v = stack_pointer[-4];
PyObject *slice = _PyBuildSlice_ConsumeRefs(PyStackRef_AsPyObjectSteal(start),
PyStackRef_AsPyObjectSteal(stop));
OPCODE_DEFERRED_INC(STORE_SLICE);
int err;
if (slice == NULL) {
err = 1;