diff options
author | Nadeshiko Manju <me@manjusaka.me> | 2025-04-16 17:17:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-16 17:17:48 (GMT) |
commit | b9e88ff4cbf6481578421d58acf2455647cefeb4 (patch) | |
tree | 28cabf2a9b212714c48c8ca1a74ac2f6bb7015d8 /Python/optimizer_bytecodes.c | |
parent | 62ff86fa55c903a8362a64ecc363d8443aff2d07 (diff) | |
download | cpython-b9e88ff4cbf6481578421d58acf2455647cefeb4.zip cpython-b9e88ff4cbf6481578421d58acf2455647cefeb4.tar.gz cpython-b9e88ff4cbf6481578421d58acf2455647cefeb4.tar.bz2 |
gh-131798: Use `sym_new_type` instead of `sym_new_not_null` for `_BUILD_LIST`, `_BUILD_SLICE`, and `_BUILD_MAP` (GH-132434)
---------
Signed-off-by: Manjusaka <me@manjusaka.me>
Diffstat (limited to 'Python/optimizer_bytecodes.c')
-rw-r--r-- | Python/optimizer_bytecodes.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c index 8e1eacf..43fe210 100644 --- a/Python/optimizer_bytecodes.c +++ b/Python/optimizer_bytecodes.c @@ -919,6 +919,18 @@ dummy_func(void) { tup = sym_new_tuple(ctx, oparg, values); } + op(_BUILD_LIST, (values[oparg] -- list)) { + 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); + } + op(_UNPACK_SEQUENCE_TWO_TUPLE, (seq -- val1, val0)) { val0 = sym_tuple_getitem(ctx, seq, 0); val1 = sym_tuple_getitem(ctx, seq, 1); |