mirror of
https://github.com/python/cpython.git
synced 2026-01-07 16:02:55 +00:00
gh-134584: Eliminate redundant refcounting from IS_OP (GH-143171)
Eliminate redundant refcounting from IS_OP
This commit is contained in:
parent
b3f2d80569
commit
a1c6308346
9 changed files with 1061 additions and 919 deletions
|
|
@ -2779,10 +2779,14 @@ dummy_func(
|
|||
// It's always a bool, so we don't care about oparg & 16.
|
||||
}
|
||||
|
||||
inst(IS_OP, (left, right -- b)) {
|
||||
macro(IS_OP) = _IS_OP + POP_TOP + POP_TOP;
|
||||
|
||||
op(_IS_OP, (left, right -- b, l, r)) {
|
||||
int res = Py_Is(PyStackRef_AsPyObjectBorrow(left), PyStackRef_AsPyObjectBorrow(right)) ^ oparg;
|
||||
DECREF_INPUTS();
|
||||
b = res ? PyStackRef_True : PyStackRef_False;
|
||||
l = left;
|
||||
r = right;
|
||||
INPUTS_DEAD();
|
||||
}
|
||||
|
||||
family(CONTAINS_OP, INLINE_CACHE_ENTRIES_CONTAINS_OP) = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue