Skip to content

Convert variadic argument opcodes to leave their argument on the stack for JIT optimization #148171

@Fidget-Spinner

Description

@Fidget-Spinner

Feature or enhancement

Proposal:

This expands on #134584. Please read that first to get an idea.

We want to expand this to things with variadic (oparg) arguments too.

The key is to reserve an extra slot in the compiler, then swap the first and last+1 argument slots in the args array. This will allow us to insert a single result at the bottom of everything, like what we did previously.

The following call opcodes need converting, after I land the initial PR

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions