home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / B::Bytecode.Z / B::Bytecode
Encoding:
Text File  |  1998-10-28  |  6.0 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      BBBB::::::::BBBByyyytttteeeeccccooooddddeeee((((3333))))   2222////AAAAuuuugggg////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))    BBBB::::::::BBBByyyytttteeeeccccooooddddeeee((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       B::Bytecode -    Perl compiler's    bytecode backend
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           perl -MO=Bytecode[,OPTIONS] foo.pl
  13.  
  14.  
  15.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.       This compiler    backend    takes Perl source and generates    a
  17.       platform-independent bytecode    encapsulating code to load the
  18.       internal structures perl uses    to run your program. When the
  19.       generated bytecode is    loaded in, your    program    is ready to
  20.       run, reducing    the time which perl would have taken to    load
  21.       and parse your program into its internal semi-compiled form.
  22.       That means that compiling with this backend will not help
  23.       improve the runtime execution    speed of your program but may
  24.       improve the start-up time.  Depending    on the environment in
  25.       which    your program runs this may or may not be a help.
  26.  
  27.       The resulting    bytecode can be    run with a special byteperl
  28.       executable or    (for non-main programs)    be loaded via the
  29.       byteload_fh function in the _B    module.
  30.  
  31.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  32.       If there are any non-option arguments, they are taken    to be
  33.       names    of objects to be saved (probably doesn't work properly
  34.       yet).     Without extra arguments, it saves the main program.
  35.  
  36.       ----ooooffffiiiilllleeeennnnaaaammmmeeee
  37.           Output to    filename instead of STDOUT.
  38.  
  39.       --------  Force end    of options.
  40.  
  41.       ----ffff  Force optimisations on or    off one    at a time. Each    can be
  42.           preceded by nnnnoooo---- to turn the option off (e.g. ----ffffnnnnoooo----
  43.           ccccoooommmmpppprrrreeeessssssss----nnnnuuuullllllllooooppppssss).
  44.  
  45.       ----ffffccccoooommmmpppprrrreeeessssssss----nnnnuuuullllllllooooppppssss
  46.           Only fills in the    necessary fields of ops    which have
  47.           been optimised away by perl's internal compiler.
  48.  
  49.       ----ffffoooommmmiiiitttt----sssseeeeqqqquuuueeeennnncccceeee----nnnnuuuummmmbbbbeeeerrrrssss
  50.           Leaves out code to fill in the op_seq field of all ops
  51.           which is only used by perl's internal compiler.
  52.  
  53.       ----ffffbbbbyyyyppppaaaassssssss----nnnnuuuullllllllooooppppssss
  54.           If op->op_next ever points to a NULLOP, replaces the
  55.           op_next field with the first non-NULLOP in the path of
  56.           execution.
  57.  
  58.       ----ffffssssttttrrrriiiipppp----ssssyyyynnnnttttaaaaxxxx----ttttrrrreeeeeeee
  59.           Leaves out code to fill in the pointers which link the
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      BBBB::::::::BBBByyyytttteeeeccccooooddddeeee((((3333))))   2222////AAAAuuuugggg////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))    BBBB::::::::BBBByyyytttteeeeccccooooddddeeee((((3333))))
  71.  
  72.  
  73.  
  74.           internal syntax tree together. They're not needed    at
  75.           run-time but leaving them    out will make it impossible to
  76.           recompile    or disassemble the resulting program.  It will
  77.           also stop    goto label statements from working.
  78.  
  79.       ----OOOOnnnn Optimisation level (n = 0, 1, 2, ...). ----OOOO    means ----OOOO1111.
  80.           ----OOOO1111 sets ----ffffccccoooommmmpppprrrreeeessssssss----nnnnuuuullllllllooooppppssss ----ffffoooommmmiiiitttt----sssseeeeqqqquuuueeeennnncccceeee nnnnuuuummmmbbbbeeeerrrrssss.
  81.           ----OOOO6666 adds ----ffffssssttttrrrriiiipppp----ssssyyyynnnnttttaaaaxxxx----ttttrrrreeeeeeee.
  82.  
  83.       ----DDDD  Debug options (concatenated or separate flags like perl
  84.           -D).
  85.  
  86.       ----DDDDoooo Prints each OP as    it's processed.
  87.  
  88.       ----DDDDbbbb Print debugging information about    bytecompiler progress.
  89.  
  90.       ----DDDDaaaa Tells the    (bytecode) assembler to    include    source
  91.           assembler    lines in its output as bytecode    comments.
  92.  
  93.       ----DDDDCCCC Prints each CV taken from    the final symbol tree walk.
  94.  
  95.       ----SSSS  Output (bytecode)    assembler source rather    than piping it
  96.           through the assembler and    outputting bytecode.
  97.  
  98.       ----mmmm  Compile as a module rather than a    standalone program.
  99.           Currently    this just means    that the bytecodes for
  100.           initialising main_start, main_root and curpad are
  101.           omitted.
  102.  
  103.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  104.           perl -MO=Bytecode,-O6,-o,foo.plc foo.pl
  105.  
  106.           perl -MO=Bytecode,-S foo.pl >    foo.S
  107.           assemble foo.S > foo.plc
  108.           byteperl foo.plc
  109.  
  110.           perl -MO=Bytecode,-m,-oFoo.pmc Foo.pm
  111.  
  112.  
  113.      BBBBUUUUGGGGSSSS
  114.       Plenty. Current status: experimental.
  115.  
  116.      AAAAUUUUTTTTHHHHOOOORRRR
  117.       Malcolm Beattie, mbeattie@sable.ox.ac.uk
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 10/23/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      BBBB::::::::BBBByyyytttteeeeccccooooddddeeee((((3333))))   2222////AAAAuuuugggg////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))    BBBB::::::::BBBByyyytttteeeeccccooooddddeeee((((3333))))
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.      Page 3                        (printed 10/23/98)
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.