Skip to content

Commit d8b46b1

Browse files
committed
Replace custom opcodes with standard sequences
Remove RustPython-specific opcodes (BuildListFromTuples, BuildMapForCall, BuildSetFromTuples, BuildTupleFromTuples) and replace their usage with CPython 3.14 standard opcode sequences: - BuildListFromTuples → BUILD_LIST + LIST_EXTEND loop - BuildSetFromTuples → BUILD_SET + SET_UPDATE loop - BuildTupleFromTuples → BUILD_LIST + LIST_EXTEND + CALL_INTRINSIC_1(ListToTuple) - BuildMapForCall → DICT_MERGE loop Implement missing opcodes: - ListExtend: Extend list with iterable elements - SetUpdate: Add iterable elements to set - DictMerge: Merge dict with duplicate key checking
1 parent 6a064aa commit d8b46b1

File tree

5 files changed

+355
-149
lines changed

5 files changed

+355
-149
lines changed

.cspell.dict/cpython.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ stackdepth
6565
stginfo
6666
stringlib
6767
structseq
68+
subkwargs
6869
subparams
6970
swappedbytes
7071
ticketer

Lib/_opcode_metadata.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,7 @@
127127
'UNPACK_SEQUENCE': 117,
128128
'YIELD_VALUE': 118,
129129
'BREAK': 119,
130-
'BUILD_LIST_FROM_TUPLES': 120,
131-
'BUILD_MAP_FOR_CALL': 121,
132-
'BUILD_SET_FROM_TUPLES': 122,
133130
'BUILD_TUPLE_FROM_ITER': 123,
134-
'BUILD_TUPLE_FROM_TUPLES': 124,
135131
'BUILD_TEMPLATE': 125,
136132
'BUILD_INTERPOLATION': 126,
137133
'CONTINUE': 128,

0 commit comments

Comments
 (0)