[RFC] PDD 16 (NCI) Proposal

Peter Lobsinger plobsing at gmail.com
Wed Mar 17 03:13:20 UTC 2010


Please find attached a patch for PDD 16 that addresses many of the
concerns I am aware of regarding NCI.

Notable changes include:
* a move to PCC-alike signatures
* support for a wider range of types (unsigned, pass by reference,
large types, etc)
* '2', '3', and '4' PMC integer pass by reference types have been
replaced with a more general pass by reference system
* explicit flagging and handling of memory ownership of string buffers
* callbacks split into 2 categories: "thunk" and "closure"
* thunk callbacks no longer modify user supplied userdata parameter
* memory management of callback state explicitly delegated to user (we
currently leak memory to avoid this)
* brief documentation of the shortcomings of the default (static)
frame builder, mention of the possibility of others

Some concerns *not* addressed by this (but mentioned in NCITasklist) are:
* wide characters
* padded strings/buffers
* zero-copy buffers

It is my opinion that these are the realm of the string system and/or
custom PMCs (even though they may be very useful for interacting
*with* NCI).

Note that some of the proposed NCI parameter types may be of dubious
value for only NCI (especially 'Iv" and "In"). However, it is my
intention to make the use of NCI and UnManagedStruct consistent.
Therefore these signature types are also designed to be passed to a
set_string_native vtable on UnManagedStruct to specify the shape of
the structure easily. Some additional types may need to be added to
support this (eg: explicit padding, smaller integer types for bit
packed fields).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdd16.patch
Type: text/x-patch
Size: 15733 bytes
Desc: not available
URL: <http://lists.parrot.org/pipermail/parrot-dev/attachments/20100316/39d69fc1/attachment-0001.bin>


More information about the parrot-dev mailing list