Commit | Line | Data |
73f0cc2d |
1 | BEGIN { |
2 | push @INC, './lib'; |
9ad884cb |
3 | require 'regen_lib.pl'; |
73f0cc2d |
4 | } |
a8a597b2 |
5 | use strict; |
6 | my %alias_to = ( |
113d5bd9 |
7 | U32 => [qw(line_t)], |
8 | PADOFFSET => [qw(STRLEN SSize_t)], |
dea28490 |
9 | U16 => [qw(OPCODE short)], |
d5e9ef99 |
10 | U8 => [qw(char)], |
a8a597b2 |
11 | ); |
12 | |
7934575e |
13 | my @optype= qw(OP UNOP BINOP LOGOP LISTOP PMOP SVOP PADOP PVOP LOOP COP); |
a8a597b2 |
14 | |
15 | # Nullsv *must* come first in the following so that the condition |
16 | # ($$sv == 0) can continue to be used to test (sv == Nullsv). |
5c3c3f81 |
17 | my @specialsv = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no |
18 | (SV*)pWARN_ALL (SV*)pWARN_NONE (SV*)pWARN_STD); |
a8a597b2 |
19 | |
20 | my (%alias_from, $from, $tos); |
21 | while (($from, $tos) = each %alias_to) { |
22 | map { $alias_from{$_} = $from } @$tos; |
23 | } |
24 | |
25 | my $c_header = <<'EOT'; |
37442d52 |
26 | /* -*- buffer-read-only: t -*- |
27 | * |
4eb8286e |
28 | * Copyright (c) 1996-1999 Malcolm Beattie |
a8a597b2 |
29 | * |
30 | * You may distribute under the terms of either the GNU General Public |
31 | * License or the Artistic License, as specified in the README file. |
32 | * |
33 | */ |
34 | /* |
35 | * This file is autogenerated from bytecode.pl. Changes made here will be lost. |
36 | */ |
37 | EOT |
38 | |
39 | my $perl_header; |
40 | ($perl_header = $c_header) =~ s{[/ ]?\*/?}{#}g; |
41 | |
36bb303b |
42 | safer_unlink "ext/ByteLoader/byterun.c", "ext/ByteLoader/byterun.h", "ext/B/B/Asmdata.pm"; |
a8a597b2 |
43 | |
44 | # |
45 | # Start with boilerplate for Asmdata.pm |
46 | # |
33b839e2 |
47 | open(ASMDATA_PM, ">ext/B/B/Asmdata.pm") or die "ext/B/B/Asmdata.pm: $!"; |
dfb1454f |
48 | binmode ASMDATA_PM; |
a8a597b2 |
49 | print ASMDATA_PM $perl_header, <<'EOT'; |
50 | package B::Asmdata; |
28b605d8 |
51 | |
a0edd7f8 |
52 | our $VERSION = '1.01'; |
28b605d8 |
53 | |
a8a597b2 |
54 | use Exporter; |
55 | @ISA = qw(Exporter); |
56 | @EXPORT_OK = qw(%insn_data @insn_name @optype @specialsv_name); |
1b11e67e |
57 | our(%insn_data, @insn_name, @optype, @specialsv_name); |
a8a597b2 |
58 | |
59 | EOT |
60 | print ASMDATA_PM <<"EOT"; |
61 | \@optype = qw(@optype); |
62 | \@specialsv_name = qw(@specialsv); |
63 | |
64 | # XXX insn_data is initialised this way because with a large |
65 | # %insn_data = (foo => [...], bar => [...], ...) initialiser |
66 | # I get a hard-to-track-down stack underflow and segfault. |
67 | EOT |
68 | |
69 | # |
70 | # Boilerplate for byterun.c |
71 | # |
e8edd1e6 |
72 | open(BYTERUN_C, ">ext/ByteLoader/byterun.c") or die "ext/ByteLoader/byterun.c: $!"; |
dfb1454f |
73 | binmode BYTERUN_C; |
a8a597b2 |
74 | print BYTERUN_C $c_header, <<'EOT'; |
75 | |
c5be433b |
76 | #define PERL_NO_GET_CONTEXT |
a8a597b2 |
77 | #include "EXTERN.h" |
78 | #include "perl.h" |
0cb96387 |
79 | #define NO_XSLOCKS |
80 | #include "XSUB.h" |
81 | |
e8edd1e6 |
82 | #include "byterun.h" |
83 | #include "bytecode.h" |
84 | |
0cb96387 |
85 | |
059a8bb7 |
86 | static const int optype_size[] = { |
e8edd1e6 |
87 | EOT |
88 | my $i = 0; |
89 | for ($i = 0; $i < @optype - 1; $i++) { |
90 | printf BYTERUN_C " sizeof(%s),\n", $optype[$i], $i; |
91 | } |
92 | printf BYTERUN_C " sizeof(%s)\n", $optype[$i], $i; |
93d343c6 |
93 | |
94 | my $size = @specialsv; |
95 | |
96 | print BYTERUN_C <<"EOT"; |
e8edd1e6 |
97 | }; |
98 | |
d613ef02 |
99 | void * |
acfe0abc |
100 | bset_obj_store(pTHX_ struct byteloader_state *bstate, void *obj, I32 ix) |
d613ef02 |
101 | { |
059a8bb7 |
102 | if (ix > bstate->bs_obj_list_fill) { |
103 | Renew(bstate->bs_obj_list, ix + 32, void*); |
104 | bstate->bs_obj_list_fill = ix + 31; |
d613ef02 |
105 | } |
059a8bb7 |
106 | bstate->bs_obj_list[ix] = obj; |
d613ef02 |
107 | return obj; |
108 | } |
a8a597b2 |
109 | |
1df34986 |
110 | int |
acfe0abc |
111 | byterun(pTHX_ register struct byteloader_state *bstate) |
a8a597b2 |
112 | { |
27da23d5 |
113 | dVAR; |
059a8bb7 |
114 | register int insn; |
115 | U32 ix; |
93d343c6 |
116 | SV *specialsv_list[$size]; |
059a8bb7 |
117 | |
118 | BYTECODE_HEADER_CHECK; /* croak if incorrect platform */ |
a02a5408 |
119 | Newx(bstate->bs_obj_list, 32, void*); /* set op objlist */ |
059a8bb7 |
120 | bstate->bs_obj_list_fill = 31; |
1df34986 |
121 | bstate->bs_obj_list[0] = NULL; /* first is always Null */ |
566ece03 |
122 | bstate->bs_ix = 1; |
e8edd1e6 |
123 | |
124 | EOT |
125 | |
e3751d82 |
126 | for my $i ( 0 .. $#specialsv ) { |
e8edd1e6 |
127 | print BYTERUN_C " specialsv_list[$i] = $specialsv[$i];\n"; |
128 | } |
129 | |
130 | print BYTERUN_C <<'EOT'; |
131 | |
47358472 |
132 | while ((insn = BGET_FGETC()) != EOF) { |
a8a597b2 |
133 | switch (insn) { |
134 | EOT |
135 | |
136 | |
137 | my (@insn_name, $insn_num, $insn, $lvalue, $argtype, $flags, $fundtype); |
138 | |
139 | while (<DATA>) { |
1df34986 |
140 | if (/^\s*#/) { |
141 | print BYTERUN_C if /^\s*#\s*(?:if|endif|el)/; |
142 | next; |
143 | } |
a8a597b2 |
144 | chop; |
a8a597b2 |
145 | next unless length; |
146 | if (/^%number\s+(.*)/) { |
147 | $insn_num = $1; |
148 | next; |
149 | } elsif (/%enum\s+(.*?)\s+(.*)/) { |
150 | create_enum($1, $2); # must come before instructions |
151 | next; |
152 | } |
153 | ($insn, $lvalue, $argtype, $flags) = split; |
b97332e7 |
154 | my $rvalcast = ''; |
155 | if ($argtype =~ m:(.+)/(.+):) { |
156 | ($rvalcast, $argtype) = ("($1)", $2); |
157 | } |
a8a597b2 |
158 | $insn_name[$insn_num] = $insn; |
159 | $fundtype = $alias_from{$argtype} || $argtype; |
160 | |
161 | # |
162 | # Add the case statement and code for the bytecode interpreter in byterun.c |
163 | # |
164 | printf BYTERUN_C "\t case INSN_%s:\t\t/* %d */\n\t {\n", |
165 | uc($insn), $insn_num; |
166 | my $optarg = $argtype eq "none" ? "" : ", arg"; |
167 | if ($optarg) { |
168 | printf BYTERUN_C "\t\t$argtype arg;\n\t\tBGET_%s(arg);\n", $fundtype; |
169 | } |
170 | if ($flags =~ /x/) { |
171 | print BYTERUN_C "\t\tBSET_$insn($lvalue$optarg);\n"; |
172 | } elsif ($flags =~ /s/) { |
e8edd1e6 |
173 | # Store instructions store to bytecode_obj_list[arg]. "lvalue" field is rvalue. |
a8a597b2 |
174 | print BYTERUN_C "\t\tBSET_OBJ_STORE($lvalue$optarg);\n"; |
175 | } |
176 | elsif ($optarg && $lvalue ne "none") { |
b97332e7 |
177 | print BYTERUN_C "\t\t$lvalue = ${rvalcast}arg;\n"; |
a8a597b2 |
178 | } |
179 | print BYTERUN_C "\t\tbreak;\n\t }\n"; |
180 | |
181 | # |
182 | # Add the initialiser line for %insn_data in Asmdata.pm |
183 | # |
184 | print ASMDATA_PM <<"EOT"; |
185 | \$insn_data{$insn} = [$insn_num, \\&PUT_$fundtype, "GET_$fundtype"]; |
186 | EOT |
187 | |
188 | # Find the next unused instruction number |
189 | do { $insn_num++ } while $insn_name[$insn_num]; |
190 | } |
191 | |
192 | # |
193 | # Finish off byterun.c |
194 | # |
195 | print BYTERUN_C <<'EOT'; |
196 | default: |
cea2e8a9 |
197 | Perl_croak(aTHX_ "Illegal bytecode instruction %d\n", insn); |
a8a597b2 |
198 | /* NOTREACHED */ |
199 | } |
200 | } |
1df34986 |
201 | return 0; |
a8a597b2 |
202 | } |
37442d52 |
203 | |
204 | /* ex: set ro: */ |
a8a597b2 |
205 | EOT |
206 | |
207 | # |
208 | # Write the instruction and optype enum constants into byterun.h |
209 | # |
e8edd1e6 |
210 | open(BYTERUN_H, ">ext/ByteLoader/byterun.h") or die "ext/ByteLoader/byterun.h: $!"; |
dfb1454f |
211 | binmode BYTERUN_H; |
a8a597b2 |
212 | print BYTERUN_H $c_header, <<'EOT'; |
059a8bb7 |
213 | struct byteloader_fdata { |
214 | SV *datasv; |
215 | int next_out; |
216 | int idx; |
a8a597b2 |
217 | }; |
a8a597b2 |
218 | |
7b2c381c |
219 | struct byteloader_pv_state { |
220 | char *pvx; |
221 | XPV xpv; |
222 | }; |
223 | |
059a8bb7 |
224 | struct byteloader_state { |
225 | struct byteloader_fdata *bs_fdata; |
226 | SV *bs_sv; |
227 | void **bs_obj_list; |
228 | int bs_obj_list_fill; |
566ece03 |
229 | int bs_ix; |
7b2c381c |
230 | struct byteloader_pv_state bs_pv; |
059a8bb7 |
231 | int bs_iv_overflows; |
232 | }; |
233 | |
234 | int bl_getc(struct byteloader_fdata *); |
235 | int bl_read(struct byteloader_fdata *, char *, size_t, size_t); |
1df34986 |
236 | extern int byterun(pTHX_ struct byteloader_state *); |
059a8bb7 |
237 | |
a8a597b2 |
238 | enum { |
239 | EOT |
240 | |
a8a597b2 |
241 | my $add_enum_value = 0; |
242 | my $max_insn; |
e3751d82 |
243 | for $i ( 0 .. $#insn_name ) { |
a8a597b2 |
244 | $insn = uc($insn_name[$i]); |
245 | if (defined($insn)) { |
246 | $max_insn = $i; |
247 | if ($add_enum_value) { |
248 | print BYTERUN_H " INSN_$insn = $i,\t\t\t/* $i */\n"; |
249 | $add_enum_value = 0; |
250 | } else { |
251 | print BYTERUN_H " INSN_$insn,\t\t\t/* $i */\n"; |
252 | } |
253 | } else { |
254 | $add_enum_value = 1; |
255 | } |
256 | } |
257 | |
258 | print BYTERUN_H " MAX_INSN = $max_insn\n};\n"; |
259 | |
260 | print BYTERUN_H "\nenum {\n"; |
261 | for ($i = 0; $i < @optype - 1; $i++) { |
262 | printf BYTERUN_H " OPt_%s,\t\t/* %d */\n", $optype[$i], $i; |
263 | } |
264 | printf BYTERUN_H " OPt_%s\t\t/* %d */\n};\n\n", $optype[$i], $i; |
a8a597b2 |
265 | |
37442d52 |
266 | print BYTERUN_H "/* ex: set ro: */\n"; |
267 | |
a8a597b2 |
268 | # |
269 | # Finish off insn_data and create array initialisers in Asmdata.pm |
270 | # |
271 | print ASMDATA_PM <<'EOT'; |
272 | |
273 | my ($insn_name, $insn_data); |
274 | while (($insn_name, $insn_data) = each %insn_data) { |
275 | $insn_name[$insn_data->[0]] = $insn_name; |
276 | } |
277 | # Fill in any gaps |
278 | @insn_name = map($_ || "unused", @insn_name); |
279 | |
280 | 1; |
42d3a99d |
281 | |
282 | __END__ |
283 | |
284 | =head1 NAME |
285 | |
286 | B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode |
287 | |
288 | =head1 SYNOPSIS |
289 | |
4162ffa6 |
290 | use B::Asmdata qw(%insn_data @insn_name @optype @specialsv_name); |
42d3a99d |
291 | |
292 | =head1 DESCRIPTION |
293 | |
4162ffa6 |
294 | Provides information about Perl ops in order to generate bytecode via |
295 | a bunch of exported variables. Its mostly used by B::Assembler and |
296 | B::Disassembler. |
297 | |
298 | =over 4 |
299 | |
300 | =item %insn_data |
301 | |
302 | my($bytecode_num, $put_sub, $get_meth) = @$insn_data{$op_name}; |
303 | |
304 | For a given $op_name (for example, 'cop_label', 'sv_flags', etc...) |
305 | you get an array ref containing the bytecode number of the op, a |
306 | reference to the subroutine used to 'PUT', and the name of the method |
307 | used to 'GET'. |
308 | |
309 | =for _private |
310 | Add more detail about what $put_sub and $get_meth are and how to use them. |
311 | |
312 | =item @insn_name |
313 | |
314 | my $op_name = $insn_name[$bytecode_num]; |
315 | |
316 | A simple mapping of the bytecode number to the name of the op. |
317 | Suitable for using with %insn_data like so: |
318 | |
319 | my $op_info = $insn_data{$insn_name[$bytecode_num]}; |
320 | |
321 | =item @optype |
322 | |
323 | my $op_type = $optype[$op_type_num]; |
324 | |
325 | A simple mapping of the op type number to its type (like 'COP' or 'BINOP'). |
326 | |
327 | =item @specialsv_name |
328 | |
329 | my $sv_name = $specialsv_name[$sv_index]; |
330 | |
331 | Certain SV types are considered 'special'. They're represented by |
3c4b39be |
332 | B::SPECIAL and are referred to by a number from the specialsv_list. |
4162ffa6 |
333 | This array maps that number back to the name of the SV (like 'Nullsv' |
334 | or '&PL_sv_undef'). |
335 | |
336 | =back |
42d3a99d |
337 | |
338 | =head1 AUTHOR |
339 | |
340 | Malcolm Beattie, C<mbeattie@sable.ox.ac.uk> |
341 | |
342 | =cut |
37442d52 |
343 | |
344 | # ex: set ro: |
a8a597b2 |
345 | EOT |
346 | |
36bb303b |
347 | |
348 | close ASMDATA_PM or die "Error closing ASMDATA_PM: $!"; |
349 | close BYTERUN_H or die "Error closing BYTERUN_H: $!"; |
350 | close BYTERUN_C or die "Error closing BYTERUN_C: $!"; |
351 | |
a8a597b2 |
352 | __END__ |
353 | # First set instruction ord("#") to read comment to end-of-line (sneaky) |
354 | %number 35 |
fe3a57c4 |
355 | comment arg comment_t |
a8a597b2 |
356 | # Then make ord("\n") into a no-op |
357 | %number 10 |
358 | nop none none |
1df34986 |
359 | |
a8a597b2 |
360 | # Now for the rest of the ordinary ones, beginning with \0 which is |
361 | # ret so that \0-terminated strings can be read properly as bytecode. |
362 | %number 0 |
363 | # |
b97332e7 |
364 | # The argtype is either a single type or "rightvaluecast/argtype". |
365 | # |
92742e37 |
366 | #opcode lvalue argtype flags |
a8a597b2 |
367 | # |
92742e37 |
368 | ret none none x |
059a8bb7 |
369 | ldsv bstate->bs_sv svindex |
92742e37 |
370 | ldop PL_op opindex |
059a8bb7 |
371 | stsv bstate->bs_sv U32 s |
92742e37 |
372 | stop PL_op U32 s |
7b2c381c |
373 | stpv bstate->bs_pv.pvx U32 x |
059a8bb7 |
374 | ldspecsv bstate->bs_sv U8 x |
566ece03 |
375 | ldspecsvx bstate->bs_sv U8 x |
059a8bb7 |
376 | newsv bstate->bs_sv U8 x |
566ece03 |
377 | newsvx bstate->bs_sv U32 x |
92742e37 |
378 | newop PL_op U8 x |
566ece03 |
379 | newopx PL_op U16 x |
92742e37 |
380 | newopn PL_op U8 x |
381 | newpv none PV |
7b2c381c |
382 | pv_cur bstate->bs_pv.xpv.xpv_cur STRLEN |
383 | pv_free bstate->bs_pv.pvx none x |
6e21dc91 |
384 | sv_upgrade bstate->bs_sv U8 x |
059a8bb7 |
385 | sv_refcnt SvREFCNT(bstate->bs_sv) U32 |
386 | sv_refcnt_add SvREFCNT(bstate->bs_sv) I32 x |
387 | sv_flags SvFLAGS(bstate->bs_sv) U32 |
87a1ef3d |
388 | xrv bstate->bs_sv svindex x |
059a8bb7 |
389 | xpv bstate->bs_sv none x |
87a1ef3d |
390 | xpv_cur bstate->bs_sv STRLEN x |
391 | xpv_len bstate->bs_sv STRLEN x |
392 | xiv bstate->bs_sv IV x |
393 | xnv bstate->bs_sv NV x |
059a8bb7 |
394 | xlv_targoff LvTARGOFF(bstate->bs_sv) STRLEN |
395 | xlv_targlen LvTARGLEN(bstate->bs_sv) STRLEN |
396 | xlv_targ LvTARG(bstate->bs_sv) svindex |
397 | xlv_type LvTYPE(bstate->bs_sv) char |
398 | xbm_useful BmUSEFUL(bstate->bs_sv) I32 |
399 | xbm_previous BmPREVIOUS(bstate->bs_sv) U16 |
400 | xbm_rare BmRARE(bstate->bs_sv) U8 |
11a7ac70 |
401 | xfm_lines FmLINES(bstate->bs_sv) IV |
402 | xio_lines IoLINES(bstate->bs_sv) IV |
403 | xio_page IoPAGE(bstate->bs_sv) IV |
404 | xio_page_len IoPAGE_LEN(bstate->bs_sv) IV |
405 | xio_lines_left IoLINES_LEFT(bstate->bs_sv) IV |
1df34986 |
406 | xio_top_name IoTOP_NAME(bstate->bs_sv) pvindex |
059a8bb7 |
407 | xio_top_gv *(SV**)&IoTOP_GV(bstate->bs_sv) svindex |
1df34986 |
408 | xio_fmt_name IoFMT_NAME(bstate->bs_sv) pvindex |
059a8bb7 |
409 | xio_fmt_gv *(SV**)&IoFMT_GV(bstate->bs_sv) svindex |
1df34986 |
410 | xio_bottom_name IoBOTTOM_NAME(bstate->bs_sv) pvindex |
059a8bb7 |
411 | xio_bottom_gv *(SV**)&IoBOTTOM_GV(bstate->bs_sv) svindex |
412 | xio_subprocess IoSUBPROCESS(bstate->bs_sv) short |
413 | xio_type IoTYPE(bstate->bs_sv) char |
414 | xio_flags IoFLAGS(bstate->bs_sv) char |
1df34986 |
415 | xcv_xsubany *(SV**)&CvXSUBANY(bstate->bs_sv).any_ptr svindex |
059a8bb7 |
416 | xcv_stash *(SV**)&CvSTASH(bstate->bs_sv) svindex |
417 | xcv_start CvSTART(bstate->bs_sv) opindex |
418 | xcv_root CvROOT(bstate->bs_sv) opindex |
419 | xcv_gv *(SV**)&CvGV(bstate->bs_sv) svindex |
420 | xcv_file CvFILE(bstate->bs_sv) pvindex |
421 | xcv_depth CvDEPTH(bstate->bs_sv) long |
422 | xcv_padlist *(SV**)&CvPADLIST(bstate->bs_sv) svindex |
423 | xcv_outside *(SV**)&CvOUTSIDE(bstate->bs_sv) svindex |
f52873be |
424 | xcv_outside_seq CvOUTSIDE_SEQ(bstate->bs_sv) U32 |
059a8bb7 |
425 | xcv_flags CvFLAGS(bstate->bs_sv) U16 |
426 | av_extend bstate->bs_sv SSize_t x |
1df34986 |
427 | av_pushx bstate->bs_sv svindex x |
059a8bb7 |
428 | av_push bstate->bs_sv svindex x |
429 | xav_fill AvFILLp(bstate->bs_sv) SSize_t |
430 | xav_max AvMAX(bstate->bs_sv) SSize_t |
059a8bb7 |
431 | xhv_riter HvRITER(bstate->bs_sv) I32 |
4ba4de04 |
432 | xhv_name bstate->bs_sv pvindex x |
059a8bb7 |
433 | hv_store bstate->bs_sv svindex x |
434 | sv_magic bstate->bs_sv char x |
435 | mg_obj SvMAGIC(bstate->bs_sv)->mg_obj svindex |
436 | mg_private SvMAGIC(bstate->bs_sv)->mg_private U16 |
437 | mg_flags SvMAGIC(bstate->bs_sv)->mg_flags U8 |
1df34986 |
438 | mg_name SvMAGIC(bstate->bs_sv) pvcontents x |
439 | mg_namex SvMAGIC(bstate->bs_sv) svindex x |
03687789 |
440 | xmg_stash bstate->bs_sv svindex x |
059a8bb7 |
441 | gv_fetchpv bstate->bs_sv strconst x |
566ece03 |
442 | gv_fetchpvx bstate->bs_sv strconst x |
059a8bb7 |
443 | gv_stashpv bstate->bs_sv strconst x |
566ece03 |
444 | gv_stashpvx bstate->bs_sv strconst x |
059a8bb7 |
445 | gp_sv GvSV(bstate->bs_sv) svindex |
446 | gp_refcnt GvREFCNT(bstate->bs_sv) U32 |
447 | gp_refcnt_add GvREFCNT(bstate->bs_sv) I32 x |
448 | gp_av *(SV**)&GvAV(bstate->bs_sv) svindex |
449 | gp_hv *(SV**)&GvHV(bstate->bs_sv) svindex |
450 | gp_cv *(SV**)&GvCV(bstate->bs_sv) svindex |
451 | gp_file GvFILE(bstate->bs_sv) pvindex |
452 | gp_io *(SV**)&GvIOp(bstate->bs_sv) svindex |
453 | gp_form *(SV**)&GvFORM(bstate->bs_sv) svindex |
454 | gp_cvgen GvCVGEN(bstate->bs_sv) U32 |
455 | gp_line GvLINE(bstate->bs_sv) line_t |
456 | gp_share bstate->bs_sv svindex x |
457 | xgv_flags GvFLAGS(bstate->bs_sv) U8 |
92742e37 |
458 | op_next PL_op->op_next opindex |
459 | op_sibling PL_op->op_sibling opindex |
460 | op_ppaddr PL_op->op_ppaddr strconst x |
461 | op_targ PL_op->op_targ PADOFFSET |
462 | op_type PL_op OPCODE x |
2814eb74 |
463 | op_opt PL_op->op_opt U8 |
464 | op_static PL_op->op_static U8 |
92742e37 |
465 | op_flags PL_op->op_flags U8 |
466 | op_private PL_op->op_private U8 |
467 | op_first cUNOP->op_first opindex |
468 | op_last cBINOP->op_last opindex |
469 | op_other cLOGOP->op_other opindex |
92742e37 |
470 | op_pmreplroot cPMOP->op_pmreplroot opindex |
92742e37 |
471 | op_pmreplstart cPMOP->op_pmreplstart opindex |
472 | op_pmnext *(OP**)&cPMOP->op_pmnext opindex |
1df34986 |
473 | #ifdef USE_ITHREADS |
47682f07 |
474 | op_pmstashpv cPMOP pvindex x |
b97332e7 |
475 | op_pmreplrootpo cPMOP->op_pmreplroot OP*/PADOFFSET |
1df34986 |
476 | #else |
477 | op_pmstash *(SV**)&cPMOP->op_pmstash svindex |
478 | op_pmreplrootgv *(SV**)&cPMOP->op_pmreplroot svindex |
479 | #endif |
92742e37 |
480 | pregcomp PL_op pvcontents x |
481 | op_pmflags cPMOP->op_pmflags U16 |
482 | op_pmpermflags cPMOP->op_pmpermflags U16 |
1df34986 |
483 | op_pmdynflags cPMOP->op_pmdynflags U8 |
92742e37 |
484 | op_sv cSVOP->op_sv svindex |
7934575e |
485 | op_padix cPADOP->op_padix PADOFFSET |
92742e37 |
486 | op_pv cPVOP->op_pv pvcontents |
487 | op_pv_tr cPVOP->op_pv op_tr_array |
488 | op_redoop cLOOP->op_redoop opindex |
489 | op_nextop cLOOP->op_nextop opindex |
490 | op_lastop cLOOP->op_lastop opindex |
059a8bb7 |
491 | cop_label cCOP->cop_label pvindex |
1df34986 |
492 | #ifdef USE_ITHREADS |
059a8bb7 |
493 | cop_stashpv cCOP pvindex x |
494 | cop_file cCOP pvindex x |
1df34986 |
495 | #else |
496 | cop_stash cCOP svindex x |
497 | cop_filegv cCOP svindex x |
498 | #endif |
92742e37 |
499 | cop_seq cCOP->cop_seq U32 |
07910858 |
500 | cop_arybase cCOP I32 x |
1df34986 |
501 | cop_line cCOP->cop_line line_t |
502 | cop_io cCOP->cop_io svindex |
5c3c3f81 |
503 | cop_warnings cCOP svindex x |
92742e37 |
504 | main_start PL_main_start opindex |
505 | main_root PL_main_root opindex |
1df34986 |
506 | main_cv *(SV**)&PL_main_cv svindex |
92742e37 |
507 | curpad PL_curpad svindex x |
059a8bb7 |
508 | push_begin PL_beginav svindex x |
509 | push_init PL_initav svindex x |
510 | push_end PL_endav svindex x |
1df34986 |
511 | curstash *(SV**)&PL_curstash svindex |
512 | defstash *(SV**)&PL_defstash svindex |
513 | data none U8 x |
0ac16f7c |
514 | incav *(SV**)&GvAV(PL_incgv) svindex |
1df34986 |
515 | load_glob none svindex x |
516 | #ifdef USE_ITHREADS |
517 | regex_padav *(SV**)&PL_regex_padav svindex |
518 | #endif |
519 | dowarn PL_dowarn U8 |
520 | comppad_name *(SV**)&PL_comppad_name svindex |
521 | xgv_stash *(SV**)&GvSTASH(bstate->bs_sv) svindex |
522 | signal bstate->bs_sv strconst x |
523 | # to be removed |
524 | formfeed PL_formfeed svindex |