Skip to content

Commit

Permalink
Mark keys dead
Browse files Browse the repository at this point in the history
  • Loading branch information
mpage committed Oct 7, 2024
1 parent e68f7e0 commit 7a682cc
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 111 deletions.
213 changes: 108 additions & 105 deletions Include/internal/pycore_uop_ids.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1588,9 +1588,10 @@ dummy_func(
}

op(_LOAD_GLOBAL_MODULE_FROM_KEYS, (index/1, globals_keys: PyDictKeysObject* -- res, null if (oparg & 1))) {
SYNC_SP();
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(globals_keys);
PyObject *res_o = entries[index].me_value;
DEAD(globals_keys);
SYNC_SP();
DEOPT_IF(res_o == NULL);
Py_INCREF(res_o);
STAT_INC(LOAD_GLOBAL, hit);
Expand All @@ -1599,9 +1600,10 @@ dummy_func(
}

op(_LOAD_GLOBAL_BUILTINS_FROM_KEYS, (index/1, builtins_keys: PyDictKeysObject* -- res, null if (oparg & 1))) {
SYNC_SP();
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(builtins_keys);
PyObject *res_o = entries[index].me_value;
DEAD(builtins_keys);
SYNC_SP();
DEOPT_IF(res_o == NULL);
Py_INCREF(res_o);
STAT_INC(LOAD_GLOBAL, hit);
Expand Down
8 changes: 4 additions & 4 deletions Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a682cc

Please sign in to comment.