gh-134584: Optimize _BINARY_OP_SUBSCR_LIST_SLICE (GH-144659)

This commit is contained in:
Sacul 2026-02-10 22:33:32 +08:00 committed by GitHub
parent 40a82abe93
commit 6c8ca1c378
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 108 additions and 60 deletions

View file

@ -422,6 +422,12 @@ dummy_func(void) {
ss = sub_st;
}
op(_BINARY_OP_SUBSCR_LIST_SLICE, (list_st, sub_st -- res, ls, ss)) {
res = sym_new_type(ctx, &PyList_Type);
ls = list_st;
ss = sub_st;
}
op(_TO_BOOL, (value -- res)) {
int already_bool = optimize_to_bool(this_instr, ctx, value, &res, false);
if (!already_bool) {