Files
RustPython/tools/opcode_metadata/conf.toml
T
Jeong, YunWon 2ba57dae68 Add BUILD_LIST_FROM_ARG opcode behind CompileOpts::build_list_from_arg (#9104)
Add Instruction::BuildListFromArg = 219 (stack effect: pop 1, push 2): pop
the iterator, push an empty list whose capacity is the iterator's length
hint, push the iterator back. A failing length hint is ignored unless it is
SystemExit or KeyboardInterrupt.

With CompileOpts::build_list_from_arg set, a list comprehension with one
generator, no `if` and no `async for` emits it in place of BUILD_LIST 0 on
the non-inlined path and in place of BUILD_LIST 0; SWAP 2 on the inlined
path. The option defaults to false, so default output is unchanged.

Assisted-by: Claude
2026-10-15 10:05:35 +09:00

3 lines
65 B
TOML

[BuildListFromArg]
stack_effect = { pushed = "2", popped = "1" }