At 11:01 PM -0800 11/20/02, Brent Dax wrote:
Dan Sugalski:
# which builds up a native call pmc that can be invoked. W is the new
# PMC for the function (we create it), X is a handle to a dlopened
# library, Y is the function name, and Z is the signature.
OK, clarification on something please. Is this essentially XS, or
something more primitive?
More primitive. This is for "I have an external library that I need
to wrap" code. The sort of thing people use XS' prototypes and such
for. If you need to write parrot-accessing code in C, you'll use a
higher-level mechanism.
# The data's stored in a PMC of type NCI. The data pointer holds a
# pointer to the main routine to call, while the struct value holds a
# pointer to an ancillary routine. In the starting case the ancillary
# routine will be the actual C function, while the main routine is one
# that knows how to extract the parameters out of the various
# registers, pass them in, and store the result somewhere. Later the
# ancillary routine may be nonexistant if we build up the function
# headers on the fly and embed the destination function into them.
Oh JITters... ;^)
Yep. You'll note the #define check in nci.c. :)
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk