GH-131798: Narrow the result of _CONTAINS_OP_SET to bool in the JIT (GH-132057)

This commit is contained in:
Tomas R. 2025-04-06 00:56:01 +02:00 committed by GitHub
parent ad6a032ceb
commit 85bc489b64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 35 additions and 3 deletions

View file

@ -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;