This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Automate processing of op_private flags
[perl5.git] / lib / B / Op_private.pm
CommitLineData
f3574cc6
DM
1# -*- buffer-read-only: t -*-
2#
3# lib/B/Op_private.pm
4#
5# Copyright (C) 2014 by Larry Wall and others
6#
7# You may distribute under the terms of either the GNU General Public
8# License or the Artistic License, as specified in the README file.
9#
10# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
11# This file is built by regen/opcode.pl from data in regen/op_private.
12# Any changes made here will be lost!
13
14=head1 NAME
15
16B::Op_private - OP op_private flag definitions
17
18=head1 SYNOPSIS
19
20 use B::Op_private;
21
22 # flag details for bit 7 of OP_AELEM's op_private:
23 my $name = $B::Op_private::bits{aelem}{7}; # OPpLVAL_INTRO
24 my $value = $B::Op_private::defines{$name}; # 128
25 my $label = $B::Op_private::labels{$name}; # LVINTRO
26
27 # the bit field at bits 5..6 of OP_AELEM's op_private:
28 my $bf = $B::Op_private::bits{aelem}{6};
29 my $mask = $bf->{bitmask}; # etc
30
31=head1 DESCRIPTION
32
33This module provides three global hashes:
34
35 %B::Op_private::bits
36 %B::Op_private::defines
37 %B::Op_private::labels
38
39which contain information about the per-op meanings of the bits in the
40op_private field.
41
42=head2 C<%bits>
43
44This is indexed by op name and then bit number (0..7). For single bit flags,
45it returns the name of the define (if any) for that bit:
46
47 $B::Op_private::bits{aelem}{7} eq 'OPpLVAL_INTRO';
48
49For bit fields, it returns a hash ref containing details about the field.
50The same reference will be returned for all bit positions that make
51up the bit field; so for example these both return the same hash ref:
52
53 $bitfield = $B::Op_private::bits{aelem}{5};
54 $bitfield = $B::Op_private::bits{aelem}{6};
55
56The general format of this hash ref is
57
58 {
59 # The bit range and mask; these are always present.
60 bitmin => 5,
61 bitmax => 6,
62 bitmask => 0x60,
63
64 # (The remaining keys are optional)
65
66 # The names of any defines that were requested:
67 mask_def => 'OPpFOO_MASK',
68 baseshift_def => 'OPpFOO_SHIFT',
69 bitcount_def => 'OPpFOO_BITS',
70
71 # If present, Concise etc will display the value with a 'FOO='
72 # prefix. If it equals '-', then Concise will treat the bit field
73 # as raw bits and not try to interpret it.
74 label => 'FOO',
75
76 # If present, specifies the names of some defines and the display
77 # labels that are used to assign meaning to particular integer
78 # values within the bit field; e.g. 3 is displayed as 'C'.
79 enum => [ qw(
80 1 OPpFOO_A A
81 2 OPpFOO_B B
82 3 OPpFOO_C C
83 )],
84
85 };
86
87
88=head2 C<%defines>
89
90This gives the value of every C<OPp> define, e.g.
91
92 $B::Op_private::defines{OPpLVAL_INTRO} == 128;
93
94=head2 C<%labels>
95
96This gives the short display label for each define, as used by C<B::Concise>
97and C<perl -Dx>, e.g.
98
99 $B::Op_private::labels{OPpLVAL_INTRO} eq 'LVINTRO';
100
101If the label equals '-', then Concise will treat the bit as a raw bit and
102not try to display it symbolically.
103
104=cut
105
106package B::Op_private;
107
108our %bits;
109
110$bits{$_}{3} = 'OPpENTERSUB_AMPER' for qw(entersub rv2cv);
111$bits{$_}{4} = 'OPpENTERSUB_DB' for qw(entersub rv2cv);
112$bits{$_}{2} = 'OPpENTERSUB_HASTARG' for qw(entersub rv2cv);
113$bits{$_}{6} = 'OPpFLIP_LINENUM' for qw(flip flop);
114$bits{$_}{1} = 'OPpFT_ACCESS' for qw(fteexec fteread ftewrite ftrexec ftrread ftrwrite);
115$bits{$_}{4} = 'OPpFT_AFTER_t' for qw(ftatime ftbinary ftblk ftchr ftctime ftdir fteexec fteowned fteread ftewrite ftfile ftis ftlink ftmtime ftpipe ftrexec ftrowned ftrread ftrwrite ftsgid ftsize ftsock ftsuid ftsvtx fttext fttty ftzero);
116$bits{$_}{2} = 'OPpFT_STACKED' for qw(ftatime ftbinary ftblk ftchr ftctime ftdir fteexec fteowned fteread ftewrite ftfile ftis ftlink ftmtime ftpipe ftrexec ftrowned ftrread ftrwrite ftsgid ftsize ftsock ftsuid ftsvtx fttext fttty ftzero);
117$bits{$_}{3} = 'OPpFT_STACKING' for qw(ftatime ftbinary ftblk ftchr ftctime ftdir fteexec fteowned fteread ftewrite ftfile ftis ftlink ftmtime ftpipe ftrexec ftrowned ftrread ftrwrite ftsgid ftsize ftsock ftsuid ftsvtx fttext fttty ftzero);
118$bits{$_}{1} = 'OPpGREP_LEX' for qw(grepstart grepwhile mapstart mapwhile);
119$bits{$_}{6} = 'OPpHINT_M_VMSISH_STATUS' for qw(dbstate nextstate);
120$bits{$_}{7} = 'OPpHINT_M_VMSISH_TIME' for qw(dbstate nextstate);
121$bits{$_}{1} = 'OPpHINT_STRICT_REFS' for qw(entersub rv2av rv2cv rv2gv rv2hv rv2sv);
122$bits{$_}{5} = 'OPpHUSH_VMSISH' for qw(dbstate nextstate);
123$bits{$_}{2} = 'OPpITER_REVERSED' for qw(enteriter iter);
124$bits{$_}{7} = 'OPpLVALUE' for qw(leave leaveloop);
125$bits{$_}{4} = 'OPpLVAL_DEFER' for qw(aelem helem);
126$bits{$_}{7} = 'OPpLVAL_INTRO' for qw(aelem aslice cond_expr delete enteriter entersub gvsv helem hslice list padav padhv padrange padsv pos pushmark rv2av rv2gv rv2hv rv2sv substr vec);
127$bits{$_}{3} = 'OPpMAYBE_LVSUB' for qw(aassign aelem aslice av2arylen helem hslice keys kvaslice kvhslice padav padhv pos rkeys rv2av rv2gv rv2hv substr vec);
128$bits{$_}{6} = 'OPpMAYBE_TRUEBOOL' for qw(padhv rv2hv);
129$bits{$_}{7} = 'OPpOFFBYONE' for qw(caller runcv wantarray);
130$bits{$_}{5} = 'OPpOPEN_IN_CRLF' for qw(backtick open);
131$bits{$_}{4} = 'OPpOPEN_IN_RAW' for qw(backtick open);
132$bits{$_}{7} = 'OPpOPEN_OUT_CRLF' for qw(backtick open);
133$bits{$_}{6} = 'OPpOPEN_OUT_RAW' for qw(backtick open);
134$bits{$_}{4} = 'OPpOUR_INTRO' for qw(enteriter gvsv rv2av rv2hv rv2sv);
135$bits{$_}{4} = 'OPpPAD_STATE' for qw(padav padhv padsv pushmark);
136$bits{$_}{7} = 'OPpPV_IS_UTF8' for qw(dump goto last next redo);
137$bits{$_}{6} = 'OPpREFCOUNTED' for qw(leave leaveeval leavesub leavesublv leavewrite);
138$bits{$_}{6} = 'OPpRUNTIME' for qw(match pushre qr subst substcont);
139$bits{$_}{2} = 'OPpSLICEWARNING' for qw(aslice hslice padav padhv rv2av rv2hv);
140$bits{$_}{4} = 'OPpTARGET_MY' for qw(abs add atan2 chdir chmod chomp chown chr chroot concat cos crypt divide exec exp flock getpgrp getppid getpriority hex i_add i_divide i_modulo i_multiply i_negate i_postdec i_postinc i_subtract index int kill left_shift length link log match mkdir modulo multiply oct ord pow push rand rename right_shift rindex rmdir schomp setpgrp setpriority sin sleep sqrt srand stringify subst subtract symlink system time trans transr unlink unshift utime wait waitpid);
141$bits{$_}{5} = 'OPpTRANS_COMPLEMENT' for qw(trans transr);
142$bits{$_}{7} = 'OPpTRANS_DELETE' for qw(trans transr);
143$bits{$_}{0} = 'OPpTRANS_FROM_UTF' for qw(trans transr);
144$bits{$_}{6} = 'OPpTRANS_GROWS' for qw(trans transr);
145$bits{$_}{2} = 'OPpTRANS_IDENTICAL' for qw(trans transr);
146$bits{$_}{3} = 'OPpTRANS_SQUASH' for qw(trans transr);
147$bits{$_}{1} = 'OPpTRANS_TO_UTF' for qw(trans transr);
148$bits{$_}{5} = 'OPpTRUEBOOL' for qw(padhv rv2hv);
149
150my @bf = (
151 {
152 label => '-',
153 mask_def => 'OPpARG1_MASK',
154 bitmin => 0,
155 bitmax => 0,
156 bitmask => 1,
157 },
158 {
159 label => '-',
160 mask_def => 'OPpARG2_MASK',
161 bitmin => 0,
162 bitmax => 1,
163 bitmask => 3,
164 },
165 {
166 label => '-',
167 mask_def => 'OPpARG3_MASK',
168 bitmin => 0,
169 bitmax => 2,
170 bitmask => 7,
171 },
172 {
173 label => '-',
174 mask_def => 'OPpARG4_MASK',
175 bitmin => 0,
176 bitmax => 3,
177 bitmask => 15,
178 },
179 {
180 label => '-',
181 mask_def => 'OPpPADRANGE_COUNTMASK',
182 bitcount_def => 'OPpPADRANGE_COUNTSHIFT',
183 bitmin => 0,
184 bitmax => 6,
185 bitmask => 127,
186 },
187 {
188 label => '-',
189 bitmin => 0,
190 bitmax => 7,
191 bitmask => 255,
192 },
193 {
194 mask_def => 'OPpDEREF',
195 bitmin => 5,
196 bitmax => 6,
197 bitmask => 96,
198 enum => [
199 1, 'OPpDEREF_AV', 'DREFAV',
200 2, 'OPpDEREF_HV', 'DREFHV',
201 3, 'OPpDEREF_SV', 'DREFSV',
202 ],
203 },
204);
205
206@{$bits{aassign}}{6,1,0} = ('OPpASSIGN_COMMON', $bf[1], $bf[1]);
207$bits{abs}{0} = $bf[0];
208@{$bits{accept}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
209@{$bits{add}}{1,0} = ($bf[1], $bf[1]);
210$bits{aeach}{0} = $bf[0];
211@{$bits{aelem}}{6,5,1,0} = ($bf[6], $bf[6], $bf[1], $bf[1]);
212@{$bits{aelemfast}}{7,6,5,4,3,2,1,0} = ($bf[5], $bf[5], $bf[5], $bf[5], $bf[5], $bf[5], $bf[5], $bf[5]);
213@{$bits{aelemfast_lex}}{7,6,5,4,3,2,1,0} = ($bf[5], $bf[5], $bf[5], $bf[5], $bf[5], $bf[5], $bf[5], $bf[5]);
214$bits{akeys}{0} = $bf[0];
215$bits{alarm}{0} = $bf[0];
216$bits{and}{0} = $bf[0];
217$bits{andassign}{0} = $bf[0];
218@{$bits{anonhash}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
219@{$bits{anonlist}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
220@{$bits{atan2}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
221$bits{av2arylen}{0} = $bf[0];
222$bits{avalues}{0} = $bf[0];
223$bits{backtick}{0} = $bf[0];
224@{$bits{bind}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
225@{$bits{binmode}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
226@{$bits{bit_and}}{1,0} = ($bf[1], $bf[1]);
227@{$bits{bit_or}}{1,0} = ($bf[1], $bf[1]);
228@{$bits{bit_xor}}{1,0} = ($bf[1], $bf[1]);
229@{$bits{bless}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
230@{$bits{caller}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
231@{$bits{chdir}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
232@{$bits{chmod}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
233$bits{chomp}{0} = $bf[0];
234$bits{chop}{0} = $bf[0];
235@{$bits{chown}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
236$bits{chr}{0} = $bf[0];
237$bits{chroot}{0} = $bf[0];
238@{$bits{close}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
239$bits{closedir}{0} = $bf[0];
240$bits{complement}{0} = $bf[0];
241@{$bits{concat}}{1,0} = ($bf[1], $bf[1]);
242$bits{cond_expr}{0} = $bf[0];
243@{$bits{connect}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
244@{$bits{const}}{6,4,3,2,1} = ('OPpCONST_BARE', 'OPpCONST_ENTERED', 'OPpCONST_STRICT', 'OPpCONST_SHORTCIRCUIT', 'OPpCONST_NOVER');
245@{$bits{coreargs}}{7,6,1,0} = ('OPpCOREARGS_PUSHMARK', 'OPpCOREARGS_SCALARMOD', 'OPpCOREARGS_DEREF2', 'OPpCOREARGS_DEREF1');
246$bits{cos}{0} = $bf[0];
247@{$bits{crypt}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
248$bits{dbmclose}{0} = $bf[0];
249@{$bits{dbmopen}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
250$bits{defined}{0} = $bf[0];
251@{$bits{delete}}{6,0} = ('OPpSLICE', $bf[0]);
252@{$bits{die}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
253@{$bits{divide}}{1,0} = ($bf[1], $bf[1]);
254$bits{dofile}{0} = $bf[0];
255$bits{dor}{0} = $bf[0];
256$bits{dorassign}{0} = $bf[0];
257$bits{dump}{0} = $bf[0];
258$bits{each}{0} = $bf[0];
259@{$bits{entereval}}{5,4,3,2,1,0} = ('OPpEVAL_RE_REPARSING', 'OPpEVAL_COPHH', 'OPpEVAL_BYTES', 'OPpEVAL_UNICODE', 'OPpEVAL_HAS_HH', $bf[0]);
260$bits{entergiven}{0} = $bf[0];
261$bits{enteriter}{3} = 'OPpITER_DEF';
262@{$bits{entersub}}{6,5,0} = ($bf[6], $bf[6], 'OPpENTERSUB_INARGS');
263$bits{entertry}{0} = $bf[0];
264$bits{enterwhen}{0} = $bf[0];
265@{$bits{enterwrite}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
266@{$bits{eof}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
267@{$bits{eq}}{1,0} = ($bf[1], $bf[1]);
268@{$bits{exec}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
269@{$bits{exists}}{6,0} = ('OPpEXISTS_SUB', $bf[0]);
270@{$bits{exit}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
271$bits{exp}{0} = $bf[0];
272$bits{fc}{0} = $bf[0];
273@{$bits{fcntl}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
274@{$bits{fileno}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
275$bits{flip}{0} = $bf[0];
276@{$bits{flock}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
277$bits{flop}{0} = $bf[0];
278@{$bits{formline}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
279$bits{ftatime}{0} = $bf[0];
280$bits{ftbinary}{0} = $bf[0];
281$bits{ftblk}{0} = $bf[0];
282$bits{ftchr}{0} = $bf[0];
283$bits{ftctime}{0} = $bf[0];
284$bits{ftdir}{0} = $bf[0];
285$bits{fteexec}{0} = $bf[0];
286$bits{fteowned}{0} = $bf[0];
287$bits{fteread}{0} = $bf[0];
288$bits{ftewrite}{0} = $bf[0];
289$bits{ftfile}{0} = $bf[0];
290$bits{ftis}{0} = $bf[0];
291$bits{ftlink}{0} = $bf[0];
292$bits{ftmtime}{0} = $bf[0];
293$bits{ftpipe}{0} = $bf[0];
294$bits{ftrexec}{0} = $bf[0];
295$bits{ftrowned}{0} = $bf[0];
296$bits{ftrread}{0} = $bf[0];
297$bits{ftrwrite}{0} = $bf[0];
298$bits{ftsgid}{0} = $bf[0];
299$bits{ftsize}{0} = $bf[0];
300$bits{ftsock}{0} = $bf[0];
301$bits{ftsuid}{0} = $bf[0];
302$bits{ftsvtx}{0} = $bf[0];
303$bits{fttext}{0} = $bf[0];
304$bits{fttty}{0} = $bf[0];
305$bits{ftzero}{0} = $bf[0];
306@{$bits{ge}}{1,0} = ($bf[1], $bf[1]);
307@{$bits{gelem}}{1,0} = ($bf[1], $bf[1]);
308@{$bits{getc}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
309$bits{getpeername}{0} = $bf[0];
310@{$bits{getpgrp}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
311@{$bits{getpriority}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
312$bits{getsockname}{0} = $bf[0];
313$bits{ggrgid}{0} = $bf[0];
314$bits{ggrnam}{0} = $bf[0];
315@{$bits{ghbyaddr}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
316$bits{ghbyname}{0} = $bf[0];
317@{$bits{glob}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
318@{$bits{gmtime}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
319@{$bits{gnbyaddr}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
320$bits{gnbyname}{0} = $bf[0];
321$bits{goto}{0} = $bf[0];
322$bits{gpbyname}{0} = $bf[0];
323@{$bits{gpbynumber}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
324$bits{gpwnam}{0} = $bf[0];
325$bits{gpwuid}{0} = $bf[0];
326$bits{grepwhile}{0} = $bf[0];
327@{$bits{gsbyname}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
328@{$bits{gsbyport}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
329@{$bits{gsockopt}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
330@{$bits{gt}}{1,0} = ($bf[1], $bf[1]);
331$bits{gv}{5} = 'OPpEARLY_CV';
332@{$bits{helem}}{6,5,1,0} = ($bf[6], $bf[6], $bf[1], $bf[1]);
333$bits{hex}{0} = $bf[0];
334@{$bits{i_add}}{1,0} = ($bf[1], $bf[1]);
335@{$bits{i_divide}}{1,0} = ($bf[1], $bf[1]);
336@{$bits{i_eq}}{1,0} = ($bf[1], $bf[1]);
337@{$bits{i_ge}}{1,0} = ($bf[1], $bf[1]);
338@{$bits{i_gt}}{1,0} = ($bf[1], $bf[1]);
339@{$bits{i_le}}{1,0} = ($bf[1], $bf[1]);
340@{$bits{i_lt}}{1,0} = ($bf[1], $bf[1]);
341@{$bits{i_modulo}}{1,0} = ($bf[1], $bf[1]);
342@{$bits{i_multiply}}{1,0} = ($bf[1], $bf[1]);
343@{$bits{i_ncmp}}{1,0} = ($bf[1], $bf[1]);
344@{$bits{i_ne}}{1,0} = ($bf[1], $bf[1]);
345$bits{i_negate}{0} = $bf[0];
346$bits{i_postdec}{0} = $bf[0];
347$bits{i_postinc}{0} = $bf[0];
348$bits{i_predec}{0} = $bf[0];
349$bits{i_preinc}{0} = $bf[0];
350@{$bits{i_subtract}}{1,0} = ($bf[1], $bf[1]);
351@{$bits{index}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
352$bits{int}{0} = $bf[0];
353@{$bits{ioctl}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
354@{$bits{join}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
355$bits{keys}{0} = $bf[0];
356@{$bits{kill}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
357$bits{last}{0} = $bf[0];
358$bits{lc}{0} = $bf[0];
359$bits{lcfirst}{0} = $bf[0];
360@{$bits{le}}{1,0} = ($bf[1], $bf[1]);
361$bits{leaveeval}{0} = $bf[0];
362$bits{leavegiven}{0} = $bf[0];
363@{$bits{leaveloop}}{1,0} = ($bf[1], $bf[1]);
364$bits{leavesub}{0} = $bf[0];
365$bits{leavesublv}{0} = $bf[0];
366$bits{leavewhen}{0} = $bf[0];
367$bits{leavewrite}{0} = $bf[0];
368@{$bits{left_shift}}{1,0} = ($bf[1], $bf[1]);
369$bits{length}{0} = $bf[0];
370@{$bits{link}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
371$bits{list}{6} = 'OPpLIST_GUESSED';
372@{$bits{listen}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
373$bits{localtime}{0} = $bf[0];
374$bits{lock}{0} = $bf[0];
375$bits{log}{0} = $bf[0];
376@{$bits{lslice}}{1,0} = ($bf[1], $bf[1]);
377$bits{lstat}{0} = $bf[0];
378@{$bits{lt}}{1,0} = ($bf[1], $bf[1]);
379$bits{mapwhile}{0} = $bf[0];
380$bits{method}{0} = $bf[0];
381@{$bits{mkdir}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
382@{$bits{modulo}}{1,0} = ($bf[1], $bf[1]);
383@{$bits{msgctl}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
384@{$bits{msgget}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
385@{$bits{msgrcv}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
386@{$bits{msgsnd}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
387@{$bits{multiply}}{1,0} = ($bf[1], $bf[1]);
388@{$bits{ncmp}}{1,0} = ($bf[1], $bf[1]);
389@{$bits{ne}}{1,0} = ($bf[1], $bf[1]);
390$bits{negate}{0} = $bf[0];
391$bits{next}{0} = $bf[0];
392$bits{not}{0} = $bf[0];
393$bits{oct}{0} = $bf[0];
394$bits{once}{0} = $bf[0];
395@{$bits{open}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
396@{$bits{open_dir}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
397$bits{or}{0} = $bf[0];
398$bits{orassign}{0} = $bf[0];
399$bits{ord}{0} = $bf[0];
400@{$bits{pack}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
401@{$bits{padrange}}{6,5,4,3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4], $bf[4], $bf[4], $bf[4]);
402@{$bits{padsv}}{6,5} = ($bf[6], $bf[6]);
403@{$bits{pipe_op}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
404$bits{pop}{0} = $bf[0];
405$bits{pos}{0} = $bf[0];
406$bits{postdec}{0} = $bf[0];
407$bits{postinc}{0} = $bf[0];
408@{$bits{pow}}{1,0} = ($bf[1], $bf[1]);
409$bits{predec}{0} = $bf[0];
410$bits{preinc}{0} = $bf[0];
411$bits{prototype}{0} = $bf[0];
412@{$bits{push}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
413$bits{quotemeta}{0} = $bf[0];
414@{$bits{rand}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
415$bits{range}{0} = $bf[0];
416$bits{reach}{0} = $bf[0];
417@{$bits{read}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
418$bits{readdir}{0} = $bf[0];
419$bits{readline}{0} = $bf[0];
420$bits{readlink}{0} = $bf[0];
421@{$bits{recv}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
422$bits{redo}{0} = $bf[0];
423$bits{ref}{0} = $bf[0];
424$bits{refgen}{0} = $bf[0];
425$bits{regcmaybe}{0} = $bf[0];
426$bits{regcomp}{0} = $bf[0];
427$bits{regcreset}{0} = $bf[0];
428@{$bits{rename}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
429@{$bits{repeat}}{6,1,0} = ('OPpREPEAT_DOLIST', $bf[1], $bf[1]);
430$bits{require}{0} = $bf[0];
431@{$bits{reset}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
432@{$bits{reverse}}{3,0} = ('OPpREVERSE_INPLACE', $bf[0]);
433$bits{rewinddir}{0} = $bf[0];
434@{$bits{right_shift}}{1,0} = ($bf[1], $bf[1]);
435@{$bits{rindex}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
436$bits{rkeys}{0} = $bf[0];
437$bits{rmdir}{0} = $bf[0];
438$bits{rv2av}{0} = $bf[0];
439@{$bits{rv2cv}}{7,6,0} = ('OPpENTERSUB_NOPAREN', 'OPpMAY_RETURN_CONSTANT', $bf[0]);
440@{$bits{rv2gv}}{6,5,4,2,0} = ($bf[6], $bf[6], 'OPpALLOW_FAKE', 'OPpDONT_INIT_GV', $bf[0]);
441$bits{rv2hv}{0} = $bf[0];
442@{$bits{rv2sv}}{6,5,0} = ($bf[6], $bf[6], $bf[0]);
443$bits{rvalues}{0} = $bf[0];
444@{$bits{sassign}}{7,6,1,0} = ('OPpASSIGN_CV_TO_GV', 'OPpASSIGN_BACKWARDS', $bf[1], $bf[1]);
445$bits{scalar}{0} = $bf[0];
446$bits{schomp}{0} = $bf[0];
447$bits{schop}{0} = $bf[0];
448@{$bits{scmp}}{1,0} = ($bf[1], $bf[1]);
449@{$bits{seek}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
450@{$bits{seekdir}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
451@{$bits{select}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
452@{$bits{semctl}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
453@{$bits{semget}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
454@{$bits{semop}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
455@{$bits{send}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
456@{$bits{seq}}{1,0} = ($bf[1], $bf[1]);
457@{$bits{setpgrp}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
458@{$bits{setpriority}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
459@{$bits{sge}}{1,0} = ($bf[1], $bf[1]);
460@{$bits{sgt}}{1,0} = ($bf[1], $bf[1]);
461$bits{shift}{0} = $bf[0];
462@{$bits{shmctl}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
463@{$bits{shmget}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
464@{$bits{shmread}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
465@{$bits{shmwrite}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
466$bits{shostent}{0} = $bf[0];
467@{$bits{shutdown}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
468$bits{sin}{0} = $bf[0];
469@{$bits{sle}}{1,0} = ($bf[1], $bf[1]);
470@{$bits{sleep}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
471@{$bits{slt}}{1,0} = ($bf[1], $bf[1]);
472@{$bits{smartmatch}}{1,0} = ($bf[1], $bf[1]);
473@{$bits{sne}}{1,0} = ($bf[1], $bf[1]);
474$bits{snetent}{0} = $bf[0];
475@{$bits{socket}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
476@{$bits{sockpair}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
477@{$bits{sort}}{6,5,4,3,2,1,0} = ('OPpSORT_STABLE', 'OPpSORT_QSORT', 'OPpSORT_DESCEND', 'OPpSORT_INPLACE', 'OPpSORT_REVERSE', 'OPpSORT_INTEGER', 'OPpSORT_NUMERIC');
478@{$bits{splice}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
479$bits{split}{7} = 'OPpSPLIT_IMPLIM';
480@{$bits{sprintf}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
481$bits{sprotoent}{0} = $bf[0];
482$bits{sqrt}{0} = $bf[0];
483@{$bits{srand}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
484$bits{srefgen}{0} = $bf[0];
485@{$bits{sselect}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
486$bits{sservent}{0} = $bf[0];
487@{$bits{ssockopt}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
488$bits{stat}{0} = $bf[0];
489@{$bits{stringify}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
490$bits{study}{0} = $bf[0];
491$bits{substcont}{0} = $bf[0];
492@{$bits{substr}}{4,2,1,0} = ('OPpSUBSTR_REPL_FIRST', $bf[2], $bf[2], $bf[2]);
493@{$bits{subtract}}{1,0} = ($bf[1], $bf[1]);
494@{$bits{symlink}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
495@{$bits{syscall}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
496@{$bits{sysopen}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
497@{$bits{sysread}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
498@{$bits{sysseek}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
499@{$bits{system}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
500@{$bits{syswrite}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
501@{$bits{tell}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
502$bits{telldir}{0} = $bf[0];
503@{$bits{tie}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
504$bits{tied}{0} = $bf[0];
505@{$bits{truncate}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
506$bits{uc}{0} = $bf[0];
507$bits{ucfirst}{0} = $bf[0];
508@{$bits{umask}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
509$bits{undef}{0} = $bf[0];
510@{$bits{unlink}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
511@{$bits{unpack}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
512@{$bits{unshift}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
513$bits{untie}{0} = $bf[0];
514@{$bits{utime}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
515$bits{values}{0} = $bf[0];
516@{$bits{vec}}{1,0} = ($bf[1], $bf[1]);
517@{$bits{waitpid}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
518@{$bits{warn}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
519@{$bits{xor}}{1,0} = ($bf[1], $bf[1]);
520
521
522our %defines = (
523 OPpALLOW_FAKE => 16,
524 OPpARG1_MASK => 1,
525 OPpARG2_MASK => 3,
526 OPpARG3_MASK => 7,
527 OPpARG4_MASK => 15,
528 OPpASSIGN_BACKWARDS => 64,
529 OPpASSIGN_COMMON => 64,
530 OPpASSIGN_CV_TO_GV => 128,
531 OPpCONST_BARE => 64,
532 OPpCONST_ENTERED => 16,
533 OPpCONST_NOVER => 2,
534 OPpCONST_SHORTCIRCUIT => 4,
535 OPpCONST_STRICT => 8,
536 OPpCOREARGS_DEREF1 => 1,
537 OPpCOREARGS_DEREF2 => 2,
538 OPpCOREARGS_PUSHMARK => 128,
539 OPpCOREARGS_SCALARMOD => 64,
540 OPpDEREF => 96,
541 OPpDEREF_AV => 32,
542 OPpDEREF_HV => 64,
543 OPpDEREF_SV => 96,
544 OPpDONT_INIT_GV => 4,
545 OPpEARLY_CV => 32,
546 OPpENTERSUB_AMPER => 8,
547 OPpENTERSUB_DB => 16,
548 OPpENTERSUB_HASTARG => 4,
549 OPpENTERSUB_INARGS => 1,
550 OPpENTERSUB_NOPAREN => 128,
551 OPpEVAL_BYTES => 8,
552 OPpEVAL_COPHH => 16,
553 OPpEVAL_HAS_HH => 2,
554 OPpEVAL_RE_REPARSING => 32,
555 OPpEVAL_UNICODE => 4,
556 OPpEXISTS_SUB => 64,
557 OPpFLIP_LINENUM => 64,
558 OPpFT_ACCESS => 2,
559 OPpFT_AFTER_t => 16,
560 OPpFT_STACKED => 4,
561 OPpFT_STACKING => 8,
562 OPpGREP_LEX => 2,
563 OPpHINT_M_VMSISH_STATUS => 64,
564 OPpHINT_M_VMSISH_TIME => 128,
565 OPpHINT_STRICT_REFS => 2,
566 OPpHUSH_VMSISH => 32,
567 OPpITER_DEF => 8,
568 OPpITER_REVERSED => 4,
569 OPpLIST_GUESSED => 64,
570 OPpLVALUE => 128,
571 OPpLVAL_DEFER => 16,
572 OPpLVAL_INTRO => 128,
573 OPpMAYBE_LVSUB => 8,
574 OPpMAYBE_TRUEBOOL => 64,
575 OPpMAY_RETURN_CONSTANT => 64,
576 OPpOFFBYONE => 128,
577 OPpOPEN_IN_CRLF => 32,
578 OPpOPEN_IN_RAW => 16,
579 OPpOPEN_OUT_CRLF => 128,
580 OPpOPEN_OUT_RAW => 64,
581 OPpOUR_INTRO => 16,
582 OPpPADRANGE_COUNTMASK => 127,
583 OPpPADRANGE_COUNTSHIFT => 7,
584 OPpPAD_STATE => 16,
585 OPpPV_IS_UTF8 => 128,
586 OPpREFCOUNTED => 64,
587 OPpREPEAT_DOLIST => 64,
588 OPpREVERSE_INPLACE => 8,
589 OPpRUNTIME => 64,
590 OPpSLICE => 64,
591 OPpSLICEWARNING => 4,
592 OPpSORT_DESCEND => 16,
593 OPpSORT_INPLACE => 8,
594 OPpSORT_INTEGER => 2,
595 OPpSORT_NUMERIC => 1,
596 OPpSORT_QSORT => 32,
597 OPpSORT_REVERSE => 4,
598 OPpSORT_STABLE => 64,
599 OPpSPLIT_IMPLIM => 128,
600 OPpSUBSTR_REPL_FIRST => 16,
601 OPpTARGET_MY => 16,
602 OPpTRANS_COMPLEMENT => 32,
603 OPpTRANS_DELETE => 128,
604 OPpTRANS_FROM_UTF => 1,
605 OPpTRANS_GROWS => 64,
606 OPpTRANS_IDENTICAL => 4,
607 OPpTRANS_SQUASH => 8,
608 OPpTRANS_TO_UTF => 2,
609 OPpTRUEBOOL => 32,
610);
611
612our %labels = (
613 OPpALLOW_FAKE => 'FAKE',
614 OPpASSIGN_BACKWARDS => 'BKWARD',
615 OPpASSIGN_COMMON => 'COMMON',
616 OPpASSIGN_CV_TO_GV => 'CV2GV',
617 OPpCONST_BARE => 'BARE',
618 OPpCONST_ENTERED => 'ENTERED',
619 OPpCONST_NOVER => 'NOVER',
620 OPpCONST_SHORTCIRCUIT => 'SHORT',
621 OPpCONST_STRICT => 'STRICT',
622 OPpCOREARGS_DEREF1 => 'DEREF1',
623 OPpCOREARGS_DEREF2 => 'DEREF2',
624 OPpCOREARGS_PUSHMARK => 'MARK',
625 OPpCOREARGS_SCALARMOD => '$MOD',
626 OPpDEREF_AV => 'DREFAV',
627 OPpDEREF_HV => 'DREFHV',
628 OPpDEREF_SV => 'DREFSV',
629 OPpDONT_INIT_GV => 'NOINIT',
630 OPpEARLY_CV => 'EARLYCV',
631 OPpENTERSUB_AMPER => 'AMPER',
632 OPpENTERSUB_DB => 'DBG',
633 OPpENTERSUB_HASTARG => 'TARG',
634 OPpENTERSUB_INARGS => 'INARGS',
635 OPpENTERSUB_NOPAREN => 'NO()',
636 OPpEVAL_BYTES => 'BYTES',
637 OPpEVAL_COPHH => 'COPHH',
638 OPpEVAL_HAS_HH => 'HAS_HH',
639 OPpEVAL_RE_REPARSING => '-',
640 OPpEVAL_UNICODE => 'UNI',
641 OPpEXISTS_SUB => 'SUB',
642 OPpFLIP_LINENUM => 'LINENUM',
643 OPpFT_ACCESS => 'FTACCESS',
644 OPpFT_AFTER_t => 'FTAFTERt',
645 OPpFT_STACKED => 'FTSTACKED',
646 OPpFT_STACKING => 'FTSTACKING',
647 OPpGREP_LEX => 'GREPLEX',
648 OPpHINT_M_VMSISH_STATUS => 'VMSISH_STATUS',
649 OPpHINT_M_VMSISH_TIME => 'VMSISH_TIME',
650 OPpHINT_STRICT_REFS => '-',
651 OPpHUSH_VMSISH => 'HUSH',
652 OPpITER_DEF => '-',
653 OPpITER_REVERSED => 'REVERSED',
654 OPpLIST_GUESSED => 'GUESSED',
655 OPpLVALUE => 'LV',
656 OPpLVAL_DEFER => 'LVDEFER',
657 OPpLVAL_INTRO => 'LVINTRO',
658 OPpMAYBE_LVSUB => 'LVSUB',
659 OPpMAYBE_TRUEBOOL => 'BOOL?',
660 OPpMAY_RETURN_CONSTANT => 'CONST',
661 OPpOFFBYONE => '+1',
662 OPpOPEN_IN_CRLF => 'INCR',
663 OPpOPEN_IN_RAW => 'INBIN',
664 OPpOPEN_OUT_CRLF => 'OUTCR',
665 OPpOPEN_OUT_RAW => 'OUTBIN',
666 OPpOUR_INTRO => 'OURINTR',
667 OPpPAD_STATE => 'STATE',
668 OPpPV_IS_UTF8 => 'UTF',
669 OPpREFCOUNTED => 'REFC',
670 OPpREPEAT_DOLIST => 'DOLIST',
671 OPpREVERSE_INPLACE => 'INPLACE',
672 OPpRUNTIME => 'RTIME',
673 OPpSLICE => 'SLICE',
674 OPpSLICEWARNING => 'SLICEWARN',
675 OPpSORT_DESCEND => 'DESC',
676 OPpSORT_INPLACE => 'INPLACE',
677 OPpSORT_INTEGER => 'INT',
678 OPpSORT_NUMERIC => 'NUM',
679 OPpSORT_QSORT => 'QSORT',
680 OPpSORT_REVERSE => 'REV',
681 OPpSORT_STABLE => 'STABLE',
682 OPpSPLIT_IMPLIM => 'IMPLIM',
683 OPpSUBSTR_REPL_FIRST => 'REPL1ST',
684 OPpTARGET_MY => 'TARGMY',
685 OPpTRANS_COMPLEMENT => 'COMPL',
686 OPpTRANS_DELETE => 'DEL',
687 OPpTRANS_FROM_UTF => '<UTF',
688 OPpTRANS_GROWS => 'GROWS',
689 OPpTRANS_IDENTICAL => 'IDENT',
690 OPpTRANS_SQUASH => 'SQUASH',
691 OPpTRANS_TO_UTF => '>UTF',
692 OPpTRUEBOOL => 'BOOL',
693);
694
695# ex: set ro: