X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=bytecode.pl;h=0d0468846eae25a6cb2472329c77fe799a9c882f;hb=3d3d4f39342abc069c6470bf0947f2d00d3ead72;hp=89536ae36ef79285bbb538273d437957ba302c6b;hpb=acfe0abcedaf592fb4b9cb69ce3468308ae99d91;p=p5sagit%2Fp5-mst-13.2.git diff --git a/bytecode.pl b/bytecode.pl index 89536ae..0d04688 100644 --- a/bytecode.pl +++ b/bytecode.pl @@ -44,6 +44,9 @@ unlink "ext/ByteLoader/byterun.c", "ext/ByteLoader/byterun.h", "ext/B/B/Asmdata. open(ASMDATA_PM, ">ext/B/B/Asmdata.pm") or die "ext/B/B/Asmdata.pm: $!"; print ASMDATA_PM $perl_header, <<'EOT'; package B::Asmdata; + +our $VERSION = '1.00'; + use Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(%insn_data @insn_name @optype @specialsv_name); @@ -109,7 +112,7 @@ byterun(pTHX_ register struct byteloader_state *bstate) EOT -for (my $i = 0; $i < @specialsv; $i++) { +for my $i ( 0 .. $#specialsv ) { print BYTERUN_C " specialsv_list[$i] = $specialsv[$i];\n"; } @@ -209,7 +212,7 @@ EOT my $add_enum_value = 0; my $max_insn; -for ($i = 0; $i < @insn_name; $i++) { +for $i ( 0 .. $#insn_name ) { $insn = uc($insn_name[$i]); if (defined($insn)) { $max_insn = $i; @@ -309,11 +312,11 @@ xlv_type LvTYPE(bstate->bs_sv) char xbm_useful BmUSEFUL(bstate->bs_sv) I32 xbm_previous BmPREVIOUS(bstate->bs_sv) U16 xbm_rare BmRARE(bstate->bs_sv) U8 -xfm_lines FmLINES(bstate->bs_sv) I32 -xio_lines IoLINES(bstate->bs_sv) long -xio_page IoPAGE(bstate->bs_sv) long -xio_page_len IoPAGE_LEN(bstate->bs_sv) long -xio_lines_left IoLINES_LEFT(bstate->bs_sv) long +xfm_lines FmLINES(bstate->bs_sv) IV +xio_lines IoLINES(bstate->bs_sv) IV +xio_page IoPAGE(bstate->bs_sv) IV +xio_page_len IoPAGE_LEN(bstate->bs_sv) IV +xio_lines_left IoLINES_LEFT(bstate->bs_sv) IV xio_top_name IoTOP_NAME(bstate->bs_sv) pvcontents xio_top_gv *(SV**)&IoTOP_GV(bstate->bs_sv) svindex xio_fmt_name IoFMT_NAME(bstate->bs_sv) pvcontents