Install Perl 5.8.8
[msysgit.git] / mingw / html / ext / B / B / Asmdata.html
blobf2ff420f86da488bb332304d3321736038f0dd3e
1 <?xml version="1.0" ?>
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">
4 <head>
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:" />
8 </head>
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">&nbsp;B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
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>
26 </ul>
27 <!-- INDEX END -->
29 <hr />
30 <p>
31 </p>
32 <h1><a name="name">NAME</a></h1>
33 <p>B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode</p>
34 <p>
35 </p>
36 <hr />
37 <h1><a name="synopsis">SYNOPSIS</a></h1>
38 <pre>
39 use B::Asmdata qw(%insn_data @insn_name @optype @specialsv_name);</pre>
40 <p>
41 </p>
42 <hr />
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
46 B::Disassembler.</p>
47 <dl>
48 <dt><strong><a name="item__insn_data">%insn_data</a></strong>
50 <dd>
51 <pre>
52 my($bytecode_num, $put_sub, $get_meth) = @$insn_data{$op_name};</pre>
53 </dd>
54 <dd>
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
58 used to 'GET'.</p>
59 </dd>
60 <dt><strong><a name="item__insn_name">@insn_name</a></strong>
62 <dd>
63 <pre>
64 my $op_name = $insn_name[$bytecode_num];</pre>
65 </dd>
66 <dd>
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>
69 </dd>
70 <dd>
71 <pre>
72 my $op_info = $insn_data{$insn_name[$bytecode_num]};</pre>
73 </dd>
74 <dt><strong><a name="item__optype">@optype</a></strong>
76 <dd>
77 <pre>
78 my $op_type = $optype[$op_type_num];</pre>
79 </dd>
80 <dd>
81 <p>A simple mapping of the op type number to its type (like 'COP' or 'BINOP').</p>
82 </dd>
83 <dt><strong><a name="item__specialsv_name">@specialsv_name</a></strong>
85 <dd>
86 <pre>
87 my $sv_name = $specialsv_name[$sv_index];</pre>
88 </dd>
89 <dd>
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 '&amp;PL_sv_undef').</p>
94 </dd>
95 </dl>
96 <p>
97 </p>
98 <hr />
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">&nbsp;B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode</span></strong></big>
104 </td></tr>
105 </table>
107 </body>
109 </html>