mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
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>
This commit is contained in:
parent
62ff86fa55
commit
b9e88ff4cb
4 changed files with 21 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue