mirror of
https://github.com/python/cpython.git
synced 2026-04-20 02:40:59 +00:00
gh-131798: Constant-fold _CONTAINS_OP_DICT for frozendict (GH-148548)
This commit is contained in:
parent
52a7f1b7f8
commit
e0b56f006c
3 changed files with 84 additions and 1 deletions
|
|
@ -771,6 +771,10 @@ dummy_func(void) {
|
|||
b = sym_new_type(ctx, &PyBool_Type);
|
||||
l = left;
|
||||
r = right;
|
||||
if (sym_is_not_container(left) &&
|
||||
sym_matches_type(right, &PyFrozenDict_Type)) {
|
||||
REPLACE_OPCODE_IF_EVALUATES_PURE(left, right, b);
|
||||
}
|
||||
}
|
||||
|
||||
op(_LOAD_CONST, (-- value)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue