Skip to content

Commit 42ca29c

Browse files
committed
Move type assignment from _TO_BOOL_STR to _GUARD_TOS_UNICODE
1 parent 138f037 commit 42ca29c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Python/optimizer_bytecodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,12 @@ dummy_func(void) {
418418
if (sym_matches_type(value, &PyUnicode_Type)) {
419419
REPLACE_OP(this_instr, _NOP, 0, 0);
420420
}
421+
sym_set_type(value, &PyUnicode_Type);
421422
}
422423

423424
op(_TO_BOOL_STR, (value -- res)) {
424425
if (!optimize_to_bool(this_instr, ctx, value, &res)) {
425426
res = sym_new_truthiness(ctx, value, true);
426-
sym_set_type(value, &PyUnicode_Type);
427427
}
428428
}
429429

Python/optimizer_cases.c.h

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

0 commit comments

Comments
 (0)