-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Convert variadic argument opcodes to leave their argument on the stack for JIT optimization #148171
Copy link
Copy link
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement
Description
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
- CALL_BUILTIN_FAST @Fidget-Spinner
- CALL_BUILTIN_FAST_WITH_KEYWORDS
- CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS
- CALL_METHOD_DESCRIPTOR_FAST
- CALL_BUILTIN_CLASS
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement