Many, but by no means all, of the ops are JITted right now. There's
code to mess about with the JITting in jit2h.pl. What would be nice
is if there was a way to get a list of the ops that are *not* JITted,
so it'd be easy to poke around and add new ops as we go. (It'd also
be nice to verify an MD5, or other checksum, of the actual op source
with a data file in the distribution so we can see when an op changes
and invalidates the JITted version)
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
Hi
I am not sure I have done the right thing here but I think the
following program does what you want. It must be run in the
parrot root dir. Shold it be added to an existing file? Which?
Or have I done a completely wrong thing?
/Stefan
#!/usr/bin/perl -wl
use strict;
unless (1 == scalar @ARGV){
print "Must give a directory as an argument.\nPossible options are:";
opendir DIR, 'jit' or die $!;
while (my $dir = readdir DIR){
next if $dir =~ /^\./ or $dir eq 'CVS';
print $dir;
}
exit 1;
}
my @ops;
my @jitted;
open OPS, '<', 'ops/ops.num' or die "Damn can not open 'ops/ops.num': $!";
while(<OPS>){
next if /^\s*#/ or /^\s*$/;
if (my ($op) = /(\S+)\s+\d+/){
push @ops, $op;
}
else { die "Misformated line: $.";}
}
close OPS or die "Noo.. $!";
open JIT, '<', "jit/$ARGV[0]/core.jit" or die "Could not open jit/$ARGV[0]/core.jit: $!";
while (<JIT>){
if (my ($jit) = /^Parrot_(\S+)\s*\{\s*$/){
push @jitted, $jit;
}
}
close JIT or die "Noo.. $!";
my @not_jitted;
OP : foreach my $op ( @ops){
foreach my $jit (@jitted){
next OP if $jit eq $op;
}
push @not_jitted, $op;
}
print foreach @not_jitted;
print 'Not jitted: ', scalar @not_jitted;
print 'Jitted: ', scalar @jitted;
print 'Total ops: ', scalar @ops;
This looks quite nice and works as a standalone utility, so I'll put
it in the repository as build_tools/list_unjitted.pl.
> This looks quite nice and works as a standalone utility, so I'll put
> it in the repository as build_tools/list_unjitted.pl.
or tools/dev as it isn't quite required for building parrot?
leo
That works too--I don't really care as long as it's in. :) If you
want to move it go ahead, that's fine. (I think I may take a shot at
some of the missing i386 ops, just for fun)
Heh. I ought to do that in the next day or so.
> That works too--I don't really care as long as it's in. :) If you
> want to move it go ahead, that's fine. (I think I may take a shot at
> some of the missing i386 ops, just for fun)
If you wonna have fun please look at t/pmc/object-meths_17 labeled:
"constructor - diamond parents" :)
leo