ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Faster/Faster.pm
(Generate patch)

Comparing Faster/Faster.pm (file contents):
Revision 1.20 by root, Fri Mar 10 22:32:15 2006 UTC vs.
Revision 1.21 by root, Fri Mar 10 22:39:11 2006 UTC

58 58
59# we don't need no steenking PIC on x86 59# we don't need no steenking PIC on x86
60$COMPILE =~ s/-f(?:PIC|pic)//g 60$COMPILE =~ s/-f(?:PIC|pic)//g
61 if $Config{archname} =~ /^(i[3456]86)-/; 61 if $Config{archname} =~ /^(i[3456]86)-/;
62 62
63my $opt_assert = 0; 63my $opt_assert = $ENV{FASTER_DEBUG};
64my $verbose = $ENV{FASTER_VERBOSE}+0;
64 65
65our $source; 66our $source;
66 67
67our @ops; 68our @ops;
68our $op; 69our $op;
286 out_next; 287 out_next;
287} 288}
288 289
289sub op_padsv { 290sub op_padsv {
290 my $flags = $op->flags; 291 my $flags = $op->flags;
291 my $target = $op->targ; 292 my $targ = $op->targ;
292 293
293 $source .= <<EOF; 294 $source .= <<EOF;
294 { 295 {
295 dSP; 296 dSP;
296 XPUSHs (PAD_SV ((PADOFFSET)$target)); 297 XPUSHs (PAD_SV ((PADOFFSET)$targ));
297 PUTBACK; 298 PUTBACK;
298EOF 299EOF
299 if ($op->flags & B::OPf_MOD) { 300 if ($op->flags & B::OPf_MOD) {
300 if ($op->private & B::OPpLVAL_INTRO) { 301 if ($op->private & B::OPpLVAL_INTRO) {
301 $source .= " SAVECLEARSV (PAD_SVl ((PADOFFSET)$target));\n"; 302 $source .= " SAVECLEARSV (PAD_SVl ((PADOFFSET)$targ));\n";
302 } elsif ($op->private & B::OPpDEREF) { 303 } elsif ($op->private & B::OPpDEREF) {
303 my $deref = $op->private & B::OPpDEREF; 304 my $deref = $op->private & B::OPpDEREF;
304 $source .= " Perl_vivify_ref (PAD_SVl ((PADOFFSET)$target), $deref);\n"; 305 $source .= " Perl_vivify_ref (PAD_SVl ((PADOFFSET)$targ), $deref);\n";
305 } 306 }
306 } 307 }
307 $source .= <<EOF; 308 $source .= <<EOF;
308 } 309 }
309EOF 310EOF
541 542
542 my $pkg = $cv->STASH->NAME; 543 my $pkg = $cv->STASH->NAME;
543 544
544 return if $ignore{$pkg}; 545 return if $ignore{$pkg};
545 546
546 warn "compiling ", $cv->STASH->NAME;#d# 547 warn "compiling ", $cv->STASH->NAME, "\n"
548 if $verbose;
547 549
548 eval { 550 eval {
549 my @cv; 551 my @cv;
550 my @cv_source; 552 my @cv_source;
551 553
582 584
5831; 5851;
584 586
585=back 587=back
586 588
589=head1 ENVIRONMENT VARIABLES
590
591The following environment variables influence the behaviour of Faster:
592
593=over 4
594
595=item FASTER_VERBOSE
596
597Faster will output more informational messages when set to values higher
598than C<0>. Currently, C<1> outputs which packages are being compiled.
599
600=item FASTER_DEBUG
601
602Add debugging code when set to values higher than C<0>. Currently, this
603adds 1-3 C<assert>'s per perl op, to ensure that opcode order and C
604execution order are compatible.
605
606=item FASTER_CACHE
607
608NOT YET IMPLEMENTED
609
610Set a persistent cache directory that caches compiled code
611fragments. Normally, code compiled by Faster will be deleted immediately,
612and every restart will recompile everything. Setting this variable to a
613directory makes Faster cache the generated files for re-use.
614
615This directory will always grow in contents, so you might need to erase it
616from time to time.
617
618=back
619
587=head1 BUGS/LIMITATIONS 620=head1 BUGS/LIMITATIONS
588 621
589Perl will check much less often for asynchronous signals in 622Perl will check much less often for asynchronous signals in
590Faster-compiled code. It tries to check on every function call, loop 623Faster-compiled code. It tries to check on every function call, loop
591iteration and every I/O operator, though. 624iteration and every I/O operator, though.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines