B::Concise 5.8.8
Sponsored Links
B::Concise 5.8.8 Ranking & Summary
File size:
12.2 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
851
Date added:
2007-06-25
Publisher:
Stephen McCamant
B::Concise 5.8.8 description
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 programs 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 perls -Dx debugging flag or the B::Terse module, but it is more sophisticated and flexible.
EXAMPLE
Heres 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 <0> enter
2 <;> nextstate(main 1 -e:1) v
3 <#> gvsv[*b] s
4 <$> const[IV 42] s
* 5 <2> add[t3] sK/2
6 <#> gvsv[*a] s
7 <2> 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 ops 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 ops 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 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v ->3
7 <2> sassign vKS/2 ->8
* 5 <2> add[t1] sK/2 ->6
- <1> ex-rv2sv sK/1 ->4
3 <$> gvsv(*b) s ->4
4 <$> const(IV 42) s ->5
- <1> ex-rv2sv sKRM*/1 ->7
6 <$> gvsv(*a) s ->7
The default rendering is top-down, so theyre 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. Theyre displayed with a sequence-number of -, because they are not executed (they dont appear in previous example), theyre printed here because they reflect the parse.
The arrow points to the sequence number of the next op; theyre 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.
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 programs 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 perls -Dx debugging flag or the B::Terse module, but it is more sophisticated and flexible.
EXAMPLE
Heres 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 <0> enter
2 <;> nextstate(main 1 -e:1) v
3 <#> gvsv[*b] s
4 <$> const[IV 42] s
* 5 <2> add[t3] sK/2
6 <#> gvsv[*a] s
7 <2> 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 ops 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 ops 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 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v ->3
7 <2> sassign vKS/2 ->8
* 5 <2> add[t1] sK/2 ->6
- <1> ex-rv2sv sK/1 ->4
3 <$> gvsv(*b) s ->4
4 <$> const(IV 42) s ->5
- <1> ex-rv2sv sKRM*/1 ->7
6 <$> gvsv(*a) s ->7
The default rendering is top-down, so theyre 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. Theyre displayed with a sequence-number of -, because they are not executed (they dont appear in previous example), theyre printed here because they reflect the parse.
The arrow points to the sequence number of the next op; theyre 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.
B::Concise 5.8.8 Screenshot
B::Concise 5.8.8 Keywords
Concise 5.8.8
OP
MO
syntax tree
perl syntax
Info About
Perl
ops
tree
1
concise
s
B::Concise
BConcise
B::Concise 5.8.8
Libraries
Bookmark B::Concise 5.8.8
B::Concise 5.8.8 Copyright
WareSeeker periodically updates pricing and software information of B::Concise 5.8.8 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of B::Concise 5.8.8 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
Related Software
B::CC is Perl compilers optimized C translation backend. Free Download
Opcode is a Perl module created to disable named opcodes when compiling perl code. Free Download
B::C is Perl compilers C backend. Free Download
B::Terse - Walk Perl syntax tree, printing terse info about ops. Free Download
B::Bytecode is Perl compilers bytecode backend. Free Download
Fcntl is a Perl module to load the C Fcntl.h defines. Free Download
B::Bblock - Walk basic blocks. Free Download
ODBM_File is a Perl module to allow tied access to odbm files. Free Download
Latest Software
Popular Software
Favourite Software