improved NCI/FFI #255

Closed
allisonrandal opened this Issue Mar 23, 2010 · 2 comments

Projects

None yet

2 participants

Contributor

The existing interface to and implementation of NCI needs refinement. See NCITasklist

This task does not depend on Lorito, but design and implementation should take the future of Lorito into consideration.

Originally http://trac.parrot.org/parrot/ticket/1525

Member
rurban commented Jan 14, 2015

I don't see a NCITaskList. However I came to these observations:

For each external call we do 3 libffi calls:

  1. Parrot_pcc_fill_params_from_c_args for the arg conversion from INPS to the ffi signature,
  2. the external dlfunc call with the ffi types, and finally
  3. Parrot_pcc_build_call_from_c_args conversion for the return type and call-by-reference
    conversion from the ffi signature back to INPS.

This is amateur code. Of course this needs to be optimized into one single call to bear the conversion overhead only on certain arg types.

Additionally someone went berserk and removed most existing signature types, without providing equivalent functionality, and thus broke all NCI examples. This was e.g. one reason for
rakudo to ditch our nci and implement their own, independent one, even if libffi is superior to their dyncall and usable on more platforms.

So we'd need a restore nci functionality ticket also, which I do in #601 to restore t and 234.

Member
rurban commented Jan 18, 2015

Closing this. No feedback on a NCITasklist and the points about restoring nci functionality for our nci examples are finished in #436, #601 and #605. Improving libffi is something internal.

@rurban rurban closed this Jan 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment