mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
GH-131798: Narrow the result of _CONTAINS_OP_DICT to bool in the JIT (GH-132269)
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
This commit is contained in:
parent
71009cb835
commit
d753d8aed7
4 changed files with 36 additions and 3 deletions
|
@ -485,6 +485,10 @@ dummy_func(void) {
|
|||
res = sym_new_type(ctx, &PyBool_Type);
|
||||
}
|
||||
|
||||
op(_CONTAINS_OP_DICT, (left, right -- res)) {
|
||||
res = sym_new_type(ctx, &PyBool_Type);
|
||||
}
|
||||
|
||||
op(_LOAD_CONST, (-- value)) {
|
||||
PyObject *val = PyTuple_GET_ITEM(co->co_consts, this_instr->oparg);
|
||||
int opcode = _Py_IsImmortal(val) ? _LOAD_CONST_INLINE_BORROW : _LOAD_CONST_INLINE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue