Dan,
I've started work on a XS wrapper extension for Parrot, and have been spending
a lot of time looking the current Perl5 API relative to Python's and Ruby's.
I am working under the assumption that the Parrot extension API will have
a minimum of the following parts:
1.) Data creation
On Wed, Jun 26, 2002 at 08:04:05AM -0700, Sean O'Rourke wrote:
I'd suggest having types be integers handed out at run-time.
I thought about this before I suggested what I did, hence they TYPE
macro :) Remember, an enum is really just an integer, and your question
is about how you manage that.
Last night I wanted to see just how much of the API very vanilla
XS code would require. In the limited sampling I did, I found
37 distinct functions and macros. Based on this, I'd say a reasonable
guestimate for minimal core functionality is about 50 distinct functions.
Best guesses would
On Tue, Jun 25, 2002 at 09:42:50AM -0500, Dan Sugalski wrote:
That'd be cool. Be aware that Parrot, at the moment, has *no*
extension API at the moment.
Well the bigger problem for the XS compat layer will be the utter
lack of perl5 STASHes and GVs. The namespace games are just going
to
On Wed, Nov 07, 2001 at 06:46:20PM -0500, Ken Fox wrote:
JITs help when the VM is focused on lots of small instructions
with well-known, static semantics. Perl's use of Parrot is going
to be focused almost completely on PMC vtable ops. A JIT has
no advantage over a threaded interpreter.
The problem with inlining methods from PMC vtables is it assumes those
vtable methods are constant. They're not.
They're not constant universally, but the are constant locally. In
those locales that inlining is worth the cost we can do it. And
as long as we are willing to take the hit in
On Wed, Nov 07, 2001 at 03:41:54PM -0500, Ken Fox wrote:
Dan Sugalski wrote:
my $foo;
$foo = 12;
print $foo;
$foo /= 24;
print $foo;
Well, there's only two assignments there,
It isn't even two assignment, hell, it reduces to: 120.5
literally, if you optimized
[snip inlining PMC vtable]
On Wed, Nov 07, 2001 at 09:49:04AM -0500, Dan Sugalski wrote:
We can't do that. PMCs, even statically typed ones, can change their
vtables as they see fit.
That is true, but it does not negate the option of inlining, it simply
increases the overhead required for