Skip to content

Commit

Permalink
assert rather than deopt if no descr/guard
Browse files Browse the repository at this point in the history
  • Loading branch information
iritkatriel committed Jan 11, 2025
1 parent 6dba21a commit 7bf51d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
3 changes: 1 addition & 2 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,7 @@ dummy_func(
_PyBinaryOpCache *cache = (_PyBinaryOpCache *)(next_instr - INLINE_CACHE_ENTRIES_BINARY_OP);
PyBinaryOpSpecializationDescr *descr =
(PyBinaryOpSpecializationDescr *)read_void(cache->external_cache);
EXIT_IF(!descr);
EXIT_IF(!descr->guard);
assert(descr && descr->guard);
int res = descr->guard(left_o, right_o);
EXIT_IF(!res);
}
Expand Down
9 changes: 1 addition & 8 deletions Python/executor_cases.c.h

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

3 changes: 1 addition & 2 deletions Python/generated_cases.c.h

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

0 comments on commit 7bf51d6

Please sign in to comment.