At 10:36 PM -0700 4/28/04, chromatic wrote:
On Wed, 2004-04-28 at 03:23, Leopold Toetsch wrote:
 > Well, that's ok for this one. Bu, what if we have:

int foo(int *i, int *j) {}

           in I5   in I6
   out I5

 We could fake that as:

   (i, j, retval) = foo(i, j)

and count each pointer type as retval too. Or something...

That seems the easiest to me. It's clearer, Parrot-wise, to follow with the calling conventions. I'd rather expose those return conventions than the C out parameter interface. Yuck.

While it's much nicer to reorder the parameters, I left them in that way on purpose. Once you start reordering in and out parameters then you get into multiple joined parameters (buffer pointers and lengths) and then it starts (well, continues) to get really nasty.


I'm not opposed to a scheme, mind, but I wonder if maybe we'd be better off leaving NCI what it is (really primitive) and building a tool to do the cleanup of the parameters that generates bytecode to do it instead.
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to