Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

chromatic (983)

chromatic
  (email not shown publicly)
http://wgz.org/chromatic/

Blog Information [technorati.com] Profile for chr0matic [technorati.com]

Journal of chromatic (983)

Friday July 16, 2004
01:46 AM

No Compiler, Please

[ #19876 ]

I was thinking a bit about Parrot NCI this afternoon. I usually describe it by talking about C's calling conventions and Parrot's calling conventions and then explaining that you can generate the thunking layer beforehand as you know C's calling conventions won't change. That is, a C function that takes two shorts and returns a long looks the same to the thunking layer no matter what library it's from. You can compile it once and let it do its magic for any library function whose conventions it understands.

Then I realized that I had never previously realized that Perl 5 also has calling conventions. Sure, they're a lot less strict than Parrot, but any function that passes three scalars and returns one does the same stuff to the stack.

I bet porting something like NCI to Perl 5 wouldn't be very hard. Certainly it'd be nice to replace the simpler bits of XS with something that doesn't require end users to have a compiler. Complexity does increase rapidly, but there's enough regularity that you can go quite a ways.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.