Ticket #1477 (closed feature: wontfix)

Opened 5 years ago

Last modified 4 years ago

[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.

Change History

  Changed 5 years ago by allison

This functionality is already built in to Parrot_ext_call, the same way as in PIR. Pass in a single call-signature argument (containing an array of arguments and a signature string) and mark it as PARROT_ARG_CALL_SIG. Or, pass in an array of arguments, and mark it as PARROT_ARG_FLATTEN.

follow-up: ↓ 3   Changed 4 years ago by jkeenan

  • cc jkeenan added

plobsing,

Allison's response seems to suggest that nothing need be done re this ticket.

Are your concerns satisfied and, if so, can we close the ticket?

Thank you very much.

kid51

in reply to: ↑ 2   Changed 4 years ago by plobsing

  • status changed from new to closed
  • resolution set to wontfix

Replying to jkeenan:

plobsing, Allison's response seems to suggest that nothing need be done re this ticket. Are your concerns satisfied and, if so, can we close the ticket?

I wouldn't describe the answer as satisfying. But I have accepted that we aren't going to do much to make embedders' lives easy or straightforward.

Closing the ticket, this isn't going to get done.

Note: See TracTickets for help on using tickets.