Re: Native function calls

2002-11-29 Thread Leopold Toetsch
Brent Dax wrote: Dan Sugalski: # which builds up a native call pmc that can be invoked. . Oh JITters... ;^) Here we go. "d" and "i" signatures currently, but it's easy to add more. It passes the 2 (new) tests. Currently, it's not integrated, add these lines to nci.c #define CAN_BUILD_CALL

Re: Native function calls

2002-11-21 Thread Gopal V
If memory serves me right, Dan Sugalski wrote: > I do actually like it. I was shooting for simplicity with the > assumption that, since we were calling out to non-parrot-aware code, > all bets were off with respect to type safety. If you load in > libgtk.so and call functions dynamically there'

Re: Native function calls

2002-11-21 Thread Dan Sugalski
At 10:17 PM +0530 11/21/02, Gopal V wrote: If memory serves me right, Dan Sugalski wrote: Currently open is the situation of flags and such from more complex calls. (Like what we do if we get back a pointer that's getting stuffed into a PMC--do we set the type, if so what type, and what do we

Re: Native function calls

2002-11-21 Thread Gopal V
If memory serves me right, Dan Sugalski wrote: > Currently open is the situation of flags and such from more complex > calls. (Like what we do if we get back a pointer that's getting > stuffed into a PMC--do we set the type, if so what type, and what do > we set the flags to?) So is it totally

Re: Native function calls

2002-11-21 Thread Dan Sugalski
At 9:12 AM +0100 11/21/02, Leopold Toetsch wrote: Brent Dax wrote: Dan Sugalski: # ... 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... ;^) jit/i386 has already code to call (specific

RE: Native function calls

2002-11-21 Thread Dan Sugalski
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

Re: Native function calls

2002-11-21 Thread Leopold Toetsch
Brent Dax wrote: Dan Sugalski: # ... 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... ;^) jit/i386 has already code to call (specific) functions e.g. vtable funcs or pmc_new_noinit.

RE: Native function calls

2002-11-20 Thread Brent Dax
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 prim

Re: Native function calls

2002-11-20 Thread Dan Sugalski
At 4:41 PM -0500 11/20/02, Dan Sugalski wrote: One new op: bnc Pw, Px, Sy, Sz 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. This isn't true, it tu

Native function calls

2002-11-20 Thread Dan Sugalski
I'm adding this code in now (sorry I've been behind on p6i mail--hopefully I'll catch up in a big dump today). Here's the sketch. One new op: bnc Pw, Px, Sy, Sz 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 dlopen