10000 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
[go: up one dir, main page]

Skip to content

gh-131798: Use sym_new_type instead of sym_new_not_null for _BUILD_STRING, _BUILD_SET #132564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 27, 2025
Prev Previous commit
Next Next commit
Update code
Signed-off-by: Manjusaka <me@manjusaka.me>
  • Loading branch information
Zheaoli committed Apr 26, 2025
commit 52a4d34903b83b918896f2b61dfe8c65b73e3c7e
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Use ``sym_new_type`` instead of ``sym_new_not_null`` for _BUILD_STRING,
_BUILD_SLICE
_BUILD_SET
8 changes: 4 additions & 4 deletions Python/optimizer_bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,10 @@ dummy_func(void) {
str = sym_new_type(ctx, &PyUnicode_Type);
}

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

op(_BUILD_SLICE, (values[oparg] -- slice)) {
slice = sym_new_type(ctx, &PySlice_Type);
}
Expand All @@ -956,10 +960,6 @@ dummy_func(void) {
list = sym_new_type(ctx, &PyList_Type);
}

op(_BUILD_SLICE, (values[oparg] -- slice)) {
slice = sym_new_type(ctx, &PySlice_Type);
}

op(_BUILD_MAP, (values[oparg*2] -- map)) {
map = sym_new_type(ctx, &PyDict_Type);
}
Expand Down
Loading
0