mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
GH-131798: Narrow the result type of _BINARY_OP_SUBSCR_STR_INT to str in the JIT (GH-132153)
This commit is contained in:
parent
933c6653cb
commit
71009cb835
4 changed files with 27 additions and 1 deletions
|
@ -366,6 +366,10 @@ dummy_func(void) {
|
|||
ctx->done = true;
|
||||
}
|
||||
|
||||
op(_BINARY_OP_SUBSCR_STR_INT, (left, right -- res)) {
|
||||
res = sym_new_type(ctx, &PyUnicode_Type);
|
||||
}
|
||||
|
||||
op(_TO_BOOL, (value -- res)) {
|
||||
int already_bool = optimize_to_bool(this_instr, ctx, value, &res);
|
||||
if (!already_bool) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue