Skip to content

Commit 182858e

Browse files
committed
relax the guard
1 parent 7ea58ab commit 182858e

File tree

7 files changed

+155
-130
lines changed

7 files changed

+155
-130
lines changed

Include/internal/pycore_opcode_metadata.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_uop_ids.h

Lines changed: 127 additions & 126 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_uop_metadata.h

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/bytecodes.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,13 +959,18 @@ dummy_func(
959959
EXIT_IF(!PyDict_CheckExact(o));
960960
}
961961

962+
op(_GUARD_NOS_DICT_NOT_EXACT, (nos, unused -- nos, unused)) {
963+
PyObject *o = PyStackRef_AsPyObjectBorrow(nos);
964+
EXIT_IF(!PyDict_Check(o));
965+
}
966+
962967
op(_GUARD_TOS_DICT, (tos -- tos)) {
963968
PyObject *o = PyStackRef_AsPyObjectBorrow(tos);
964969
EXIT_IF(!PyDict_CheckExact(o));
965970
}
966971

967972
macro(BINARY_OP_SUBSCR_DICT) =
968-
_GUARD_NOS_DICT + unused/5 + _BINARY_OP_SUBSCR_DICT;
973+
_GUARD_NOS_DICT_NOT_EXACT + unused/5 + _BINARY_OP_SUBSCR_DICT;
969974

970975
op(_BINARY_OP_SUBSCR_DICT, (dict_st, sub_st -- res)) {
971976
PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st);

Python/executor_cases.c.h

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)