Skip to content

Commit 1e35b61

Browse files
committed
Track global and builtins dependencies for LOAD_GLOBAL
1 parent c36c2b7 commit 1e35b61

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Python/optimizer.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,13 @@ translate_bytecode_to_trace(
737737
ADD_TO_TRACE(_TIER2_RESUME_CHECK, 0, 0, target);
738738
break;
739739

740+
// VVVVVV ПРЕДЛАГАЕМОЕ ИСПРАВЛЕНИЕ ЗДЕСЬ VVVVVV
741+
case LOAD_GLOBAL:
742+
_Py_BloomFilter_Add(dependencies, frame->f_globals);
743+
_Py_BloomFilter_Add(dependencies, frame->f_builtins);
744+
_Py_FALLTHROUGH;
745+
// ^^^^^^ КОНЕЦ ИСПРАВЛЕНИЯ ^^^^^^
746+
740747
default:
741748
{
742749
const struct opcode_macro_expansion *expansion = &_PyOpcode_macro_expansion[opcode];

0 commit comments

Comments
 (0)