Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Libraries

    B::Concise 5.8.8

    Download button

    No screenshots available
    Downloads: 298  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Stephen McCamant | More programs
    Perl Artistic License / FREE
    June 25th, 2007, 20:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    B::Concise description

    B::Concise is a Perl syntax tree, printing concise info about ops.

    B::Concise is a Perl syntax tree, printing concise info about ops.

    SYNOPSIS

    perl -MO=Concise[,OPTIONS] foo.pl

    use B::Concise qw(set_style add_callback);

    This compiler backend prints the internal OPs of a Perl program's syntax tree in one of several space-efficient text formats suitable for debugging the inner workings of perl or other compiler backends. It can print OPs in the order they appear in the OP tree, in the order they will execute, or in a text approximation to their tree structure, and the format of the information displayed is customizable. Its function is similar to that of perl's -Dx debugging flag or the B::Terse module, but it is more sophisticated and flexible.

    EXAMPLE

    Here's an example of 2 outputs (aka 'renderings'), using the -exec and -basic (i.e. default) formatting conventions on the same code snippet.

    % perl -MO=Concise,-exec -e '$a = $b + 42'
    1 enter
    2 nextstate(main 1 -e:1) v
    3 gvsv[*b] s
    4 const[IV 42] s
    * 5 add[t3] sK/2
    6 gvsv[*a] s
    7 sassign vKS/2
    8 leave[1 ref] vKP/REFC

    Each line corresponds to an opcode. The opcode marked with '*' is used in a few examples below.

    The 1st column is the op's sequence number, starting at 1, and is displayed in base 36 by default. This rendering is in -exec (i.e. execution) order.

    The symbol between angle brackets indicates the op's type, for example; < 2 > is a BINOP, < @ > a LISTOP, and < # > is a PADOP, which is used in threaded perls. (see "OP class abbreviations").

    The opname, as in 'add[t1]', which may be followed by op-specific information in parentheses or brackets (ex '[t1]').

    The op-flags (ex 'sK/2') follow, and are described in ("OP flags abbreviations").

    % perl -MO=Concise -e '$a = $b + 42'
    8 leave[1 ref] vKP/REFC ->(end)
    1 enter ->2
    2 nextstate(main 1 -e:1) v ->3
    7 sassign vKS/2 ->8
    * 5 add[t1] sK/2 ->6
    - ex-rv2sv sK/1 ->4
    3 gvsv(*b) s ->4
    4 const(IV 42) s ->5
    - ex-rv2sv sKRM*/1 ->7
    6 gvsv(*a) s ->7

    The default rendering is top-down, so they're not in execution order. This form reflects the way the stack is used to parse and evaluate expressions; the add operates on the two terms below it in the tree.

    Nullops appear as ex-opname, where opname is an op that has been optimized away by perl. They're displayed with a sequence-number of '-', because they are not executed (they don't appear in previous example), they're printed here because they reflect the parse.

    The arrow points to the sequence number of the next op; they're not displayed in -exec mode, for obvious reasons.

    Note that because this rendering was done on a non-threaded perl, the PADOPs in the previous examples are now SVOPs, and some (but not all) of the square brackets have been replaced by round ones. This is a subtle feature to provide some visual distinction between renderings on threaded and un-threaded perls.

    Requirements:

    · Perl



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    ops information | syntax tree | Perl module | B::Concise | ops | information



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM