mirror of
https://github.com/python/cpython.git
synced 2026-04-20 02:40:59 +00:00
gh-146393: Use recorded type instead of instance in BINARY_OP (#148569)
This commit is contained in:
parent
0012686d92
commit
5c3decad66
8 changed files with 1042 additions and 1013 deletions
|
|
@ -5725,7 +5725,7 @@ dummy_func(
|
|||
DEAD(rhs);
|
||||
}
|
||||
|
||||
macro(BINARY_OP) = _SPECIALIZE_BINARY_OP + _RECORD_TOS + _RECORD_NOS + unused/4 + _BINARY_OP + POP_TOP + POP_TOP;
|
||||
macro(BINARY_OP) = _SPECIALIZE_BINARY_OP + _RECORD_TOS_TYPE + _RECORD_NOS_TYPE + unused/4 + _BINARY_OP + POP_TOP + POP_TOP;
|
||||
|
||||
pure replicate(2:4) inst(SWAP, (bottom, unused[oparg-2], top --
|
||||
bottom, unused[oparg-2], top)) {
|
||||
|
|
@ -6178,6 +6178,10 @@ dummy_func(
|
|||
RECORD_VALUE(PyStackRef_AsPyObjectBorrow(nos));
|
||||
}
|
||||
|
||||
tier2 op(_RECORD_NOS_TYPE, (nos, tos -- nos, tos)) {
|
||||
RECORD_VALUE(Py_TYPE(PyStackRef_AsPyObjectBorrow(nos)));
|
||||
}
|
||||
|
||||
tier2 op(_RECORD_NOS_GEN_FUNC, (nos, tos -- nos, tos)) {
|
||||
PyObject *obj = PyStackRef_AsPyObjectBorrow(nos);
|
||||
if (PyGen_Check(obj)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue