mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
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
3 lines
65 B
TOML
3 lines
65 B
TOML
[BuildListFromArg]
|
|
stack_effect = { pushed = "2", popped = "1" }
|