Skip to content
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Use ``sym_new_type`` instead of ``sym_new_not_null`` for _BUILD_STRING,
_BUILD_SET
9 changes: 9 additions & 0 deletions Python/optimizer_bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,7 @@ dummy_func(void) {
list = sym_new_type(ctx, &PyList_Type);
}


op(_BUILD_SLICE, (values[oparg] -- slice)) {
slice = sym_new_type(ctx, &PySlice_Type);
}
Expand All @@ -956,6 +957,14 @@ dummy_func(void) {
map = sym_new_type(ctx, &PyDict_Type);
}

op(_BUILD_STRING, (values[oparg] -- str)) {
str = sym_new_type(ctx, &PyUnicode_Type);
}

op(_BUILD_SET, (values[oparg] -- set)) {
set = sym_new_type(ctx, &PySet_Type);
}

op(_UNPACK_SEQUENCE_TWO_TUPLE, (seq -- val1, val0)) {
val0 = sym_tuple_getitem(ctx, seq, 0);
val1 = sym_tuple_getitem(ctx, seq, 1);
Expand Down
4 changes: 2 additions & 2 deletions Python/optimizer_cases.c.h

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

Loading