This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Reapply some perldoc changes not in 3.09.
[perl5.git] / ext / B / B / Asmdata.pm
CommitLineData
a798dbf2 1#
a6c40364 2# Copyright (c) 1996-1999 Malcolm Beattie
a798dbf2
MB
3#
4# You may distribute under the terms of either the GNU General Public
5# License or the Artistic License, as specified in the README file.
6#
7#
8#
9# This file is autogenerated from bytecode.pl. Changes made here will be lost.
10#
11package B::Asmdata;
28b605d8
JH
12
13our $VERSION = '1.00';
14
a798dbf2
MB
15use Exporter;
16@ISA = qw(Exporter);
17@EXPORT_OK = qw(%insn_data @insn_name @optype @specialsv_name);
17f410f9 18our(%insn_data, @insn_name, @optype, @specialsv_name);
a798dbf2 19
7934575e 20@optype = qw(OP UNOP BINOP LOGOP LISTOP PMOP SVOP PADOP PVOP LOOP COP);
059a8bb7 21@specialsv_name = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no pWARN_ALL pWARN_NONE);
a798dbf2
MB
22
23# XXX insn_data is initialised this way because with a large
24# %insn_data = (foo => [...], bar => [...], ...) initialiser
25# I get a hard-to-track-down stack underflow and segfault.
ca04da08 26$insn_data{comment} = [35, \&PUT_comment_t, "GET_comment_t"];
a798dbf2
MB
27$insn_data{nop} = [10, \&PUT_none, "GET_none"];
28$insn_data{ret} = [0, \&PUT_none, "GET_none"];
ca04da08
GS
29$insn_data{ldsv} = [1, \&PUT_svindex, "GET_svindex"];
30$insn_data{ldop} = [2, \&PUT_opindex, "GET_opindex"];
a798dbf2
MB
31$insn_data{stsv} = [3, \&PUT_U32, "GET_U32"];
32$insn_data{stop} = [4, \&PUT_U32, "GET_U32"];
059a8bb7
JH
33$insn_data{stpv} = [5, \&PUT_U32, "GET_U32"];
34$insn_data{ldspecsv} = [6, \&PUT_U8, "GET_U8"];
35$insn_data{newsv} = [7, \&PUT_U8, "GET_U8"];
36$insn_data{newop} = [8, \&PUT_U8, "GET_U8"];
37$insn_data{newopn} = [9, \&PUT_U8, "GET_U8"];
38$insn_data{newpv} = [11, \&PUT_PV, "GET_PV"];
39$insn_data{pv_cur} = [12, \&PUT_U32, "GET_U32"];
40$insn_data{pv_free} = [13, \&PUT_none, "GET_none"];
41$insn_data{sv_upgrade} = [14, \&PUT_U8, "GET_U8"];
42$insn_data{sv_refcnt} = [15, \&PUT_U32, "GET_U32"];
43$insn_data{sv_refcnt_add} = [16, \&PUT_I32, "GET_I32"];
44$insn_data{sv_flags} = [17, \&PUT_U32, "GET_U32"];
45$insn_data{xrv} = [18, \&PUT_svindex, "GET_svindex"];
46$insn_data{xpv} = [19, \&PUT_none, "GET_none"];
3610fdac
JH
47$insn_data{xpv_cur} = [20, \&PUT_U32, "GET_U32"];
48$insn_data{xpv_len} = [21, \&PUT_U32, "GET_U32"];
49$insn_data{xiv} = [22, \&PUT_IV, "GET_IV"];
50$insn_data{xnv} = [23, \&PUT_NV, "GET_NV"];
51$insn_data{xlv_targoff} = [24, \&PUT_U32, "GET_U32"];
52$insn_data{xlv_targlen} = [25, \&PUT_U32, "GET_U32"];
53$insn_data{xlv_targ} = [26, \&PUT_svindex, "GET_svindex"];
54$insn_data{xlv_type} = [27, \&PUT_U8, "GET_U8"];
55$insn_data{xbm_useful} = [28, \&PUT_I32, "GET_I32"];
56$insn_data{xbm_previous} = [29, \&PUT_U16, "GET_U16"];
57$insn_data{xbm_rare} = [30, \&PUT_U8, "GET_U8"];
58$insn_data{xfm_lines} = [31, \&PUT_IV, "GET_IV"];
59$insn_data{xio_lines} = [32, \&PUT_IV, "GET_IV"];
60$insn_data{xio_page} = [33, \&PUT_IV, "GET_IV"];
61$insn_data{xio_page_len} = [34, \&PUT_IV, "GET_IV"];
62$insn_data{xio_lines_left} = [36, \&PUT_IV, "GET_IV"];
63$insn_data{xio_top_name} = [37, \&PUT_pvindex, "GET_pvindex"];
64$insn_data{xio_top_gv} = [38, \&PUT_svindex, "GET_svindex"];
65$insn_data{xio_fmt_name} = [39, \&PUT_pvindex, "GET_pvindex"];
66$insn_data{xio_fmt_gv} = [40, \&PUT_svindex, "GET_svindex"];
67$insn_data{xio_bottom_name} = [41, \&PUT_pvindex, "GET_pvindex"];
68$insn_data{xio_bottom_gv} = [42, \&PUT_svindex, "GET_svindex"];
69$insn_data{xio_subprocess} = [43, \&PUT_U16, "GET_U16"];
70$insn_data{xio_type} = [44, \&PUT_U8, "GET_U8"];
71$insn_data{xio_flags} = [45, \&PUT_U8, "GET_U8"];
72$insn_data{xcv_xsubany} = [46, \&PUT_svindex, "GET_svindex"];
73$insn_data{xcv_stash} = [47, \&PUT_svindex, "GET_svindex"];
74$insn_data{xcv_start} = [48, \&PUT_opindex, "GET_opindex"];
75$insn_data{xcv_root} = [49, \&PUT_opindex, "GET_opindex"];
76$insn_data{xcv_gv} = [50, \&PUT_svindex, "GET_svindex"];
77$insn_data{xcv_file} = [51, \&PUT_pvindex, "GET_pvindex"];
78$insn_data{xcv_depth} = [52, \&PUT_I32, "GET_I32"];
79$insn_data{xcv_padlist} = [53, \&PUT_svindex, "GET_svindex"];
80$insn_data{xcv_outside} = [54, \&PUT_svindex, "GET_svindex"];
81$insn_data{xcv_outside_seq} = [55, \&PUT_U32, "GET_U32"];
82$insn_data{xcv_flags} = [56, \&PUT_U16, "GET_U16"];
83$insn_data{av_extend} = [57, \&PUT_I32, "GET_I32"];
84$insn_data{av_pushx} = [58, \&PUT_svindex, "GET_svindex"];
85$insn_data{av_push} = [59, \&PUT_svindex, "GET_svindex"];
86$insn_data{xav_fill} = [60, \&PUT_I32, "GET_I32"];
87$insn_data{xav_max} = [61, \&PUT_I32, "GET_I32"];
88$insn_data{xav_flags} = [62, \&PUT_U8, "GET_U8"];
89$insn_data{xhv_riter} = [63, \&PUT_I32, "GET_I32"];
90$insn_data{xhv_name} = [64, \&PUT_pvindex, "GET_pvindex"];
91$insn_data{xhv_pmroot} = [65, \&PUT_opindex, "GET_opindex"];
92$insn_data{hv_store} = [66, \&PUT_svindex, "GET_svindex"];
93$insn_data{sv_magic} = [67, \&PUT_U8, "GET_U8"];
94$insn_data{mg_obj} = [68, \&PUT_svindex, "GET_svindex"];
95$insn_data{mg_private} = [69, \&PUT_U16, "GET_U16"];
96$insn_data{mg_flags} = [70, \&PUT_U8, "GET_U8"];
97$insn_data{mg_name} = [71, \&PUT_pvcontents, "GET_pvcontents"];
98$insn_data{mg_namex} = [72, \&PUT_svindex, "GET_svindex"];
99$insn_data{xmg_stash} = [73, \&PUT_svindex, "GET_svindex"];
100$insn_data{gv_fetchpv} = [74, \&PUT_strconst, "GET_strconst"];
101$insn_data{gv_stashpv} = [75, \&PUT_strconst, "GET_strconst"];
102$insn_data{gp_sv} = [76, \&PUT_svindex, "GET_svindex"];
103$insn_data{gp_refcnt} = [77, \&PUT_U32, "GET_U32"];
104$insn_data{gp_refcnt_add} = [78, \&PUT_I32, "GET_I32"];
105$insn_data{gp_av} = [79, \&PUT_svindex, "GET_svindex"];
106$insn_data{gp_hv} = [80, \&PUT_svindex, "GET_svindex"];
107$insn_data{gp_cv} = [81, \&PUT_svindex, "GET_svindex"];
108$insn_data{gp_file} = [82, \&PUT_pvindex, "GET_pvindex"];
109$insn_data{gp_io} = [83, \&PUT_svindex, "GET_svindex"];
110$insn_data{gp_form} = [84, \&PUT_svindex, "GET_svindex"];
111$insn_data{gp_cvgen} = [85, \&PUT_U32, "GET_U32"];
112$insn_data{gp_line} = [86, \&PUT_U32, "GET_U32"];
113$insn_data{gp_share} = [87, \&PUT_svindex, "GET_svindex"];
114$insn_data{xgv_flags} = [88, \&PUT_U8, "GET_U8"];
115$insn_data{op_next} = [89, \&PUT_opindex, "GET_opindex"];
116$insn_data{op_sibling} = [90, \&PUT_opindex, "GET_opindex"];
117$insn_data{op_ppaddr} = [91, \&PUT_strconst, "GET_strconst"];
118$insn_data{op_targ} = [92, \&PUT_U32, "GET_U32"];
119$insn_data{op_type} = [93, \&PUT_U16, "GET_U16"];
120$insn_data{op_seq} = [94, \&PUT_U16, "GET_U16"];
121$insn_data{op_flags} = [95, \&PUT_U8, "GET_U8"];
122$insn_data{op_private} = [96, \&PUT_U8, "GET_U8"];
123$insn_data{op_first} = [97, \&PUT_opindex, "GET_opindex"];
124$insn_data{op_last} = [98, \&PUT_opindex, "GET_opindex"];
125$insn_data{op_other} = [99, \&PUT_opindex, "GET_opindex"];
126$insn_data{op_pmreplroot} = [100, \&PUT_opindex, "GET_opindex"];
127$insn_data{op_pmreplstart} = [101, \&PUT_opindex, "GET_opindex"];
128$insn_data{op_pmnext} = [102, \&PUT_opindex, "GET_opindex"];
129$insn_data{op_pmstashpv} = [103, \&PUT_pvindex, "GET_pvindex"];
130$insn_data{op_pmreplrootpo} = [104, \&PUT_U32, "GET_U32"];
131$insn_data{op_pmstash} = [105, \&PUT_svindex, "GET_svindex"];
132$insn_data{op_pmreplrootgv} = [106, \&PUT_svindex, "GET_svindex"];
133$insn_data{pregcomp} = [107, \&PUT_pvcontents, "GET_pvcontents"];
134$insn_data{op_pmflags} = [108, \&PUT_U16, "GET_U16"];
135$insn_data{op_pmpermflags} = [109, \&PUT_U16, "GET_U16"];
136$insn_data{op_pmdynflags} = [110, \&PUT_U8, "GET_U8"];
137$insn_data{op_sv} = [111, \&PUT_svindex, "GET_svindex"];
138$insn_data{op_padix} = [112, \&PUT_U32, "GET_U32"];
139$insn_data{op_pv} = [113, \&PUT_pvcontents, "GET_pvcontents"];
140$insn_data{op_pv_tr} = [114, \&PUT_op_tr_array, "GET_op_tr_array"];
141$insn_data{op_redoop} = [115, \&PUT_opindex, "GET_opindex"];
142$insn_data{op_nextop} = [116, \&PUT_opindex, "GET_opindex"];
143$insn_data{op_lastop} = [117, \&PUT_opindex, "GET_opindex"];
144$insn_data{cop_label} = [118, \&PUT_pvindex, "GET_pvindex"];
145$insn_data{cop_stashpv} = [119, \&PUT_pvindex, "GET_pvindex"];
146$insn_data{cop_file} = [120, \&PUT_pvindex, "GET_pvindex"];
147$insn_data{cop_stash} = [121, \&PUT_svindex, "GET_svindex"];
148$insn_data{cop_filegv} = [122, \&PUT_svindex, "GET_svindex"];
149$insn_data{cop_seq} = [123, \&PUT_U32, "GET_U32"];
150$insn_data{cop_arybase} = [124, \&PUT_I32, "GET_I32"];
151$insn_data{cop_line} = [125, \&PUT_U32, "GET_U32"];
152$insn_data{cop_io} = [126, \&PUT_svindex, "GET_svindex"];
153$insn_data{cop_warnings} = [127, \&PUT_svindex, "GET_svindex"];
154$insn_data{main_start} = [128, \&PUT_opindex, "GET_opindex"];
155$insn_data{main_root} = [129, \&PUT_opindex, "GET_opindex"];
156$insn_data{main_cv} = [130, \&PUT_svindex, "GET_svindex"];
157$insn_data{curpad} = [131, \&PUT_svindex, "GET_svindex"];
158$insn_data{push_begin} = [132, \&PUT_svindex, "GET_svindex"];
159$insn_data{push_init} = [133, \&PUT_svindex, "GET_svindex"];
160$insn_data{push_end} = [134, \&PUT_svindex, "GET_svindex"];
161$insn_data{curstash} = [135, \&PUT_svindex, "GET_svindex"];
162$insn_data{defstash} = [136, \&PUT_svindex, "GET_svindex"];
163$insn_data{data} = [137, \&PUT_U8, "GET_U8"];
164$insn_data{incav} = [138, \&PUT_svindex, "GET_svindex"];
165$insn_data{load_glob} = [139, \&PUT_svindex, "GET_svindex"];
166$insn_data{regex_padav} = [140, \&PUT_svindex, "GET_svindex"];
167$insn_data{dowarn} = [141, \&PUT_U8, "GET_U8"];
168$insn_data{comppad_name} = [142, \&PUT_svindex, "GET_svindex"];
169$insn_data{xgv_stash} = [143, \&PUT_svindex, "GET_svindex"];
170$insn_data{signal} = [144, \&PUT_strconst, "GET_strconst"];
171$insn_data{formfeed} = [145, \&PUT_svindex, "GET_svindex"];
a798dbf2
MB
172
173my ($insn_name, $insn_data);
174while (($insn_name, $insn_data) = each %insn_data) {
175 $insn_name[$insn_data->[0]] = $insn_name;
176}
177# Fill in any gaps
178@insn_name = map($_ || "unused", @insn_name);
179
1801;
42d3a99d
GS
181
182__END__
183
184=head1 NAME
185
186B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode
187
188=head1 SYNOPSIS
189
4162ffa6 190 use B::Asmdata qw(%insn_data @insn_name @optype @specialsv_name);
42d3a99d
GS
191
192=head1 DESCRIPTION
193
4162ffa6
MS
194Provides information about Perl ops in order to generate bytecode via
195a bunch of exported variables. Its mostly used by B::Assembler and
196B::Disassembler.
197
198=over 4
199
200=item %insn_data
201
202 my($bytecode_num, $put_sub, $get_meth) = @$insn_data{$op_name};
203
204For a given $op_name (for example, 'cop_label', 'sv_flags', etc...)
205you get an array ref containing the bytecode number of the op, a
206reference to the subroutine used to 'PUT', and the name of the method
207used to 'GET'.
208
209=for _private
210Add more detail about what $put_sub and $get_meth are and how to use them.
211
212=item @insn_name
213
214 my $op_name = $insn_name[$bytecode_num];
215
216A simple mapping of the bytecode number to the name of the op.
217Suitable for using with %insn_data like so:
218
219 my $op_info = $insn_data{$insn_name[$bytecode_num]};
220
221=item @optype
222
223 my $op_type = $optype[$op_type_num];
224
225A simple mapping of the op type number to its type (like 'COP' or 'BINOP').
226
227=item @specialsv_name
228
229 my $sv_name = $specialsv_name[$sv_index];
230
231Certain SV types are considered 'special'. They're represented by
232B::SPECIAL and are refered to by a number from the specialsv_list.
233This array maps that number back to the name of the SV (like 'Nullsv'
234or '&PL_sv_undef').
235
236=back
42d3a99d
GS
237
238=head1 AUTHOR
239
240Malcolm Beattie, C<mbeattie@sable.ox.ac.uk>
241
242=cut