Skip to content

Commit 652286a

Browse files
committed
mark tier2 ops
1 parent 72e8ab8 commit 652286a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Lib/test/test_capi/test_opt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3937,7 +3937,7 @@ def testfunc(n):
39373937
for _ in range(n):
39383938
c = a + b # result type is list (known)
39393939
d = b + c # rhs (c) is known list, lhs (b) is not -> _GUARD_BINARY_OP_EXTEND_LHS
3940-
total += d[0]
3940+
total += d[2]
39413941
return total
39423942

39433943
res, ex = self._run_with_optimizer(testfunc, TIER2_THRESHOLD)

Python/bytecodes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -961,15 +961,15 @@ dummy_func(
961961
res = PyStackRef_FromPyObjectSteal(temp);
962962
}
963963

964-
op(_GUARD_BINARY_OP_EXTEND_LHS, (descr/4, left, right -- left, right)) {
964+
tier2 op(_GUARD_BINARY_OP_EXTEND_LHS, (descr/4, left, right -- left, right)) {
965965
PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
966966
_PyBinaryOpSpecializationDescr *d = (_PyBinaryOpSpecializationDescr*)descr;
967967
assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5);
968968
assert(d && d->guard == NULL && d->lhs_type != NULL);
969969
EXIT_IF(Py_TYPE(left_o) != d->lhs_type);
970970
}
971971

972-
op(_GUARD_BINARY_OP_EXTEND_RHS, (descr/4, left, right -- left, right)) {
972+
tier2 op(_GUARD_BINARY_OP_EXTEND_RHS, (descr/4, left, right -- left, right)) {
973973
PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
974974
_PyBinaryOpSpecializationDescr *d = (_PyBinaryOpSpecializationDescr*)descr;
975975
assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5);

0 commit comments

Comments
 (0)