Ticket #1477 (closed feature: wontfix)
[embed] expose non-vararg-based sub/method call-ins
Reported by: | plobsing | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | none | Version: | 2.1.0 |
Severity: | medium | Keywords: | |
Cc: | jkeenan | Language: | |
Patch status: | Platform: |
Description
The embedding API currently exposes Parrot_ext_call to provide call-ins on subs and methods. Parrot_ext_call uses a va_list for parameters and return locations. This is fine only if the signature to the call can be determined statically. AFAIK, there is no portable way to build up a va_list at runtime.
Being a VM for dynamic languages, there are going to be cases where embedders want to decide things like number of arguments/returns at runtime (yay dynamicism!). A good example of this is &Parrot::Embed::invoke which can only make "S->P" calls ATM.
Providing an equivalent function that took an aggregate (either C-ish or Parrot-ish) instead of the va_list would allow for dynamic call-ins.