mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
gh-115687: Split up guards from COMPARE_OP (GH-115688)
This commit is contained in:
parent
a2bb8ad144
commit
dcba21f905
9 changed files with 249 additions and 163 deletions
6
Python/executor_cases.c.h
generated
6
Python/executor_cases.c.h
generated
|
@ -2100,8 +2100,6 @@
|
|||
oparg = CURRENT_OPARG();
|
||||
right = stack_pointer[-1];
|
||||
left = stack_pointer[-2];
|
||||
if (!PyFloat_CheckExact(left)) goto deoptimize;
|
||||
if (!PyFloat_CheckExact(right)) goto deoptimize;
|
||||
STAT_INC(COMPARE_OP, hit);
|
||||
double dleft = PyFloat_AS_DOUBLE(left);
|
||||
double dright = PyFloat_AS_DOUBLE(right);
|
||||
|
@ -2123,8 +2121,6 @@
|
|||
oparg = CURRENT_OPARG();
|
||||
right = stack_pointer[-1];
|
||||
left = stack_pointer[-2];
|
||||
if (!PyLong_CheckExact(left)) goto deoptimize;
|
||||
if (!PyLong_CheckExact(right)) goto deoptimize;
|
||||
if (!_PyLong_IsCompact((PyLongObject *)left)) goto deoptimize;
|
||||
if (!_PyLong_IsCompact((PyLongObject *)right)) goto deoptimize;
|
||||
STAT_INC(COMPARE_OP, hit);
|
||||
|
@ -2150,8 +2146,6 @@
|
|||
oparg = CURRENT_OPARG();
|
||||
right = stack_pointer[-1];
|
||||
left = stack_pointer[-2];
|
||||
if (!PyUnicode_CheckExact(left)) goto deoptimize;
|
||||
if (!PyUnicode_CheckExact(right)) goto deoptimize;
|
||||
STAT_INC(COMPARE_OP, hit);
|
||||
int eq = _PyUnicode_Equal(left, right);
|
||||
assert((oparg >> 5) == Py_EQ || (oparg >> 5) == Py_NE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue