Re: [PATCH t/test.pl t/op/stat.t lib/Net/hostent.t] Unbail out
[p5sagit/p5-mst-13.2.git] / bytecode.pl
index 9321604..0d04688 100644 (file)
@@ -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);
@@ -71,13 +74,6 @@ print BYTERUN_C $c_header, <<'EOT';
 #define NO_XSLOCKS
 #include "XSUB.h"
 
-#ifdef PERL_OBJECT
-#undef CALL_FPTR
-#define CALL_FPTR(fptr) (pPerl->*fptr)
-#undef PL_ppaddr
-#define PL_ppaddr (*get_ppaddr())
-#endif
-
 #include "byterun.h"
 #include "bytecode.h"
 
@@ -93,7 +89,7 @@ print BYTERUN_C <<'EOT';
 };
 
 void *
-bset_obj_store(pTHXo_ struct byteloader_state *bstate, void *obj, I32 ix)
+bset_obj_store(pTHX_ struct byteloader_state *bstate, void *obj, I32 ix)
 {
     if (ix > bstate->bs_obj_list_fill) {
        Renew(bstate->bs_obj_list, ix + 32, void*);
@@ -104,9 +100,8 @@ bset_obj_store(pTHXo_ struct byteloader_state *bstate, void *obj, I32 ix)
 }
 
 void
-byterun(pTHXo_ register struct byteloader_state *bstate)
+byterun(pTHX_ register struct byteloader_state *bstate)
 {
-    dTHR;
     register int insn;
     U32 ix;
     SV *specialsv_list[6];
@@ -117,7 +112,7 @@ byterun(pTHXo_ 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";
 }
 
@@ -210,14 +205,14 @@ struct byteloader_state {
 
 int bl_getc(struct byteloader_fdata *);
 int bl_read(struct byteloader_fdata *, char *, size_t, size_t);
-extern void byterun(pTHXo_ struct byteloader_state *);
+extern void byterun(pTHX_ struct byteloader_state *);
 
 enum {
 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;
@@ -317,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
@@ -380,7 +375,6 @@ op_private  PL_op->op_private                       U8
 op_first       cUNOP->op_first                         opindex
 op_last                cBINOP->op_last                         opindex
 op_other       cLOGOP->op_other                        opindex
-op_children    cLISTOP->op_children                    U32
 op_pmreplroot  cPMOP->op_pmreplroot                    opindex
 op_pmreplrootgv        *(SV**)&cPMOP->op_pmreplroot            svindex
 op_pmreplstart cPMOP->op_pmreplstart                   opindex