B::CC

B::CC is Perl compiler's optimized C translation backend.
Download

B::CC Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Malcolm Beattie
  • Publisher web site:
  • http://search.cpan.org/~swalters/Sys-Mmap-0.13/Mmap.pm

B::CC Tags


B::CC Description

B::CC is Perl compiler's optimized C translation backend. B::CC is Perl compiler's optimized C translation backend.SYNOPSIS perl -MO=CC foo.plThis compiler backend takes Perl source and generates C source code corresponding to the flow of your program. In other words, this backend is somewhat a "real" compiler in the sense that many people think about compilers. Note however that, currently, it is a very poor compiler in that although it generates (mostly, or at least sometimes) correct code, it performs relatively few optimisations. This will change as the compiler develops. The result is that running an executable compiled with this backend may start up more quickly than running the original Perl program (a feature shared by the C compiler backend--see B::C) and may also execute slightly faster. This is by no means a good optimising compiler--yet.OPTIONSIf there are any non-option arguments, they are taken to be names of objects to be saved (probably doesn't work properly yet). Without extra arguments, it saves the main program.-ofilenameOutput to filename instead of STDOUT-vVerbose compilation (currently gives a few compilation statistics).--Force end of options-uPacknameForce apparently unused subs from package Packname to be compiled. This allows programs to use eval "foo()" even when sub foo is never seen to be used at compile time. The down side is that any subs which really are never used also have code generated. This option is necessary, for example, if you have a signal handler foo which you initialise with $SIG{BAR} = "foo". A better fix, though, is just to change it to $SIG{BAR} = &foo. You can have multiple -u options. The compiler tries to figure out which packages may possibly have subs in which need compiling but the current version doesn't do it very well. In particular, it is confused by nested packages (i.e. of the form A::B) where package A does not contain any subs.-mModulenameInstead of generating source for a runnable executable, generate source for an XSUB module. The boot_Modulename function (which DynaLoader can look for) does the appropriate initialisation and runs the main part of the Perl source that is being compiled.-DDebug options (concatenated or separate flags like perl -D).-DrWrites debugging output to STDERR just as it's about to write to the program's runtime (otherwise writes debugging info as comments in its C output).-DOOutputs each OP as it's compiled-DsOutputs the contents of the shadow stack at each OP-DpOutputs the contents of the shadow pad of lexicals as it's loaded for each sub or the main program.-DqOutputs the name of each fake PP function in the queue as it's about to process it.-DlOutput the filename and line number of each original line of Perl code as it's processed (pp_nextstate).-DtOutputs timing information of compilation stages.-fForce optimisations on or off one at a time.-ffreetmps-each-bblockDelays FREETMPS from the end of each statement to the end of the each basic block.-ffreetmps-each-loopDelays FREETMPS from the end of each statement to the end of the group of basic blocks forming a loop. At most one of the freetmps-each-* options can be used.-fomit-taintOmits generating code for handling perl's tainting mechanism.-OnOptimisation level (n = 0, 1, 2, ...). -O means -O1. Currently, -O1 sets -ffreetmps-each-bblock and -O2 sets -ffreetmps-each-loop. Requirements: · Perl


B::CC Related Software