Skip to content

Commit 7bf51d6

Browse files
committed
assert rather than deopt if no descr/guard
1 parent 6dba21a commit 7bf51d6

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

Python/bytecodes.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,8 +735,7 @@ dummy_func(
735735
_PyBinaryOpCache *cache = (_PyBinaryOpCache *)(next_instr - INLINE_CACHE_ENTRIES_BINARY_OP);
736736
PyBinaryOpSpecializationDescr *descr =
737737
(PyBinaryOpSpecializationDescr *)read_void(cache->external_cache);
738-
EXIT_IF(!descr);
739-
EXIT_IF(!descr->guard);
738+
assert(descr && descr->guard);
740739
int res = descr->guard(left_o, right_o);
741740
EXIT_IF(!res);
742741
}

Python/executor_cases.c.h

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

Python/generated_cases.c.h

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

0 commit comments

Comments
 (0)