mirror of
https://github.com/python/cpython.git
synced 2025-08-28 20:56:54 +00:00
GH-131798: Narrow the result of _CONTAINS_OP_SET to bool in the JIT (GH-132057)
This commit is contained in:
parent
ad6a032ceb
commit
85bc489b64
4 changed files with 35 additions and 3 deletions
|
@ -477,6 +477,10 @@ dummy_func(void) {
|
|||
res = sym_new_type(ctx, &PyBool_Type);
|
||||
}
|
||||
|
||||
op(_CONTAINS_OP_SET, (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;
|
||||
|
|
6
Python/optimizer_cases.c.h
generated
6
Python/optimizer_cases.c.h
generated
|
@ -1283,9 +1283,9 @@
|
|||
}
|
||||
|
||||
case _CONTAINS_OP_SET: {
|
||||
JitOptSymbol *b;
|
||||
b = sym_new_not_null(ctx);
|
||||
stack_pointer[-2] = b;
|
||||
JitOptSymbol *res;
|
||||
res = sym_new_type(ctx, &PyBool_Type);
|
||||
stack_pointer[-2] = res;
|
||||
stack_pointer += -1;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue