Skip to content

Commit 9e1bb98

Browse files
Simplify _GUARD_CALLABLE_TYPE_1
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
1 parent c8ca787 commit 9e1bb98

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Python/optimizer_bytecodes.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -992,12 +992,8 @@ dummy_func(void) {
992992
}
993993

994994
op(_GUARD_CALLABLE_TYPE_1, (callable, unused, unused2 -- callable, unused, unused2)) {
995-
if (sym_is_const(ctx, callable)) {
996-
PyObject *value = sym_get_const(ctx, callable);
997-
assert(value != NULL);
998-
if (value == (PyObject *)&PyType_Type) {
999-
REPLACE_OP(this_instr, _NOP, 0, 0);
1000-
}
995+
if (sym_get_const(ctx, callable) == (PyObject *)&PyType_Type) {
996+
REPLACE_OP(this_instr, _NOP, 0, 0);
1001997
}
1002998
sym_set_const(callable, (PyObject *)&PyType_Type);
1003999
}

0 commit comments

Comments
 (0)