FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-131798: Use `sym_new_type` instead of `sym_new_not_null` for _BUILD_STRING, _BUILD_SET by Zheaoli · Pull Request #132564 · python/cpython · GitHub

Repository navigation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
8 changes: 8 additions & 0 deletions Python/optimizer_bytecodes.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,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.


Back | FazBrowse Home | New Git URL