2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <title>B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode
</title>
6 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8" />
7 <link rev=
"made" href=
"mailto:" />
10 <body style=
"background-color: white">
11 <table border=
"0" width=
"100%" cellspacing=
"0" cellpadding=
"3">
12 <tr><td class=
"block" style=
"background-color: #cccccc" valign=
"middle">
13 <big><strong><span class=
"block"> B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode
</span></strong></big>
17 <p><a name=
"__index__"></a></p>
22 <li><a href=
"#name">NAME
</a></li>
23 <li><a href=
"#synopsis">SYNOPSIS
</a></li>
24 <li><a href=
"#description">DESCRIPTION
</a></li>
25 <li><a href=
"#author">AUTHOR
</a></li>
32 <h1><a name=
"name">NAME
</a></h1>
33 <p>B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode
</p>
37 <h1><a name=
"synopsis">SYNOPSIS
</a></h1>
39 use B::Asmdata qw(%insn_data @insn_name @optype @specialsv_name);
</pre>
43 <h1><a name=
"description">DESCRIPTION
</a></h1>
44 <p>Provides information about Perl ops in order to generate bytecode via
45 a bunch of exported variables. Its mostly used by B::Assembler and
48 <dt><strong><a name=
"item__insn_data">%insn_data
</a></strong>
52 my($bytecode_num, $put_sub, $get_meth) = @$insn_data{$op_name};
</pre>
55 <p>For a given $op_name (for example, 'cop_label', 'sv_flags', etc...)
56 you get an array ref containing the bytecode number of the op, a
57 reference to the subroutine used to 'PUT', and the name of the method
60 <dt><strong><a name=
"item__insn_name">@insn_name
</a></strong>
64 my $op_name = $insn_name[$bytecode_num];
</pre>
67 <p>A simple mapping of the bytecode number to the name of the op.
68 Suitable for using with %insn_data like so:
</p>
72 my $op_info = $insn_data{$insn_name[$bytecode_num]};
</pre>
74 <dt><strong><a name=
"item__optype">@optype
</a></strong>
78 my $op_type = $optype[$op_type_num];
</pre>
81 <p>A simple mapping of the op type number to its type (like 'COP' or 'BINOP').
</p>
83 <dt><strong><a name=
"item__specialsv_name">@specialsv_name
</a></strong>
87 my $sv_name = $specialsv_name[$sv_index];
</pre>
90 <p>Certain SV types are considered 'special'. They're represented by
91 B::SPECIAL and are referred to by a number from the specialsv_list.
92 This array maps that number back to the name of the SV (like 'Nullsv'
93 or '
&PL_sv_undef').
</p>
99 <h1><a name=
"author">AUTHOR
</a></h1>
100 <p>Malcolm Beattie,
<code>mbeattie@sable.ox.ac.uk
</code></p>
101 <table border=
"0" width=
"100%" cellspacing=
"0" cellpadding=
"3">
102 <tr><td class=
"block" style=
"background-color: #cccccc" valign=
"middle">
103 <big><strong><span class=
"block"> B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode
</span></strong></big>