more cleanup: avoid unused knowledge of "file GV" notion in CV and GV
Gurusamy Sarathy [Fri, 29 Oct 1999 06:08:50 +0000 (06:08 +0000)]
p4raw-id: //depot/perl@4485

17 files changed:
bytecode.pl
cv.h
dump.c
ext/B/B.pm
ext/B/B.xs
ext/B/B/Asmdata.pm
ext/B/B/Bytecode.pm
ext/B/B/C.pm
ext/B/B/Debug.pm
ext/B/B/Xref.pm
ext/ByteLoader/byterun.c
ext/ByteLoader/byterun.h
ext/Devel/Peek/Peek.pm
gv.c
gv.h
op.c
sv.h

index 63fc738..326633e 100644 (file)
@@ -339,7 +339,6 @@ xcv_stash   *(SV**)&CvSTASH(bytecode_sv)            svindex
 xcv_start      CvSTART(bytecode_sv)                    opindex
 xcv_root       CvROOT(bytecode_sv)                     opindex
 xcv_gv         *(SV**)&CvGV(bytecode_sv)               svindex
-xcv_filegv     *(SV**)&CvFILEGV(bytecode_sv)           svindex
 xcv_depth      CvDEPTH(bytecode_sv)                    long
 xcv_padlist    *(SV**)&CvPADLIST(bytecode_sv)          svindex
 xcv_outside    *(SV**)&CvOUTSIDE(bytecode_sv)          svindex
@@ -366,7 +365,7 @@ gp_refcnt_add       GvREFCNT(bytecode_sv)                   I32             x
 gp_av          *(SV**)&GvAV(bytecode_sv)               svindex
 gp_hv          *(SV**)&GvHV(bytecode_sv)               svindex
 gp_cv          *(SV**)&GvCV(bytecode_sv)               svindex
-gp_filegv      *(SV**)&GvFILEGV(bytecode_sv)           svindex
+gp_file                GvFILE(bytecode_sv)                     pvcontents
 gp_io          *(SV**)&GvIOp(bytecode_sv)              svindex
 gp_form                *(SV**)&GvFORM(bytecode_sv)             svindex
 gp_cvgen       GvCVGEN(bytecode_sv)                    U32
diff --git a/cv.h b/cv.h
index 67d4a8e..b822eaa 100644 (file)
--- a/cv.h
+++ b/cv.h
@@ -24,8 +24,10 @@ struct xpvcv {
     void       (*xcv_xsub) (pTHXo_ CV*);
     ANY                xcv_xsubany;
     GV *       xcv_gv;
-    GV *       xcv_filegv;
-    long       xcv_depth;              /* >= 2 indicates recursive call */
+#if defined(PERL_BINCOMPAT_5005)
+    GV *       xcv_filegv;     /* XXX unused (and deprecated) */
+#endif
+    long       xcv_depth;      /* >= 2 indicates recursive call */
     AV *       xcv_padlist;
     CV *       xcv_outside;
 #ifdef USE_THREADS
@@ -43,7 +45,6 @@ struct xpvcv {
 #define CvXSUB(sv)     ((XPVCV*)SvANY(sv))->xcv_xsub
 #define CvXSUBANY(sv)  ((XPVCV*)SvANY(sv))->xcv_xsubany
 #define CvGV(sv)       ((XPVCV*)SvANY(sv))->xcv_gv
-#define CvFILEGV(sv)   ((XPVCV*)SvANY(sv))->xcv_filegv
 #define CvDEPTH(sv)    ((XPVCV*)SvANY(sv))->xcv_depth
 #define CvPADLIST(sv)  ((XPVCV*)SvANY(sv))->xcv_padlist
 #define CvOUTSIDE(sv)  ((XPVCV*)SvANY(sv))->xcv_outside
diff --git a/dump.c b/dump.c
index 9acb927..3881003 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -1068,7 +1068,6 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
        Perl_dump_indent(aTHX_ level, file, "  XSUB = 0x%"UVxf"\n", PTR2UV(CvXSUB(sv)));
        Perl_dump_indent(aTHX_ level, file, "  XSUBANY = %"IVdf"\n", (IV)CvXSUBANY(sv).any_i32);
        do_gvgv_dump(level, file, "  GVGV::GV", CvGV(sv));
-       do_gv_dump(level, file, "  FILEGV", CvFILEGV(sv));
        Perl_dump_indent(aTHX_ level, file, "  DEPTH = %"IVdf"\n", (IV)CvDEPTH(sv));
 #ifdef USE_THREADS
        Perl_dump_indent(aTHX_ level, file, "  MUTEXP = 0x%"UVxf"\n", PTR2UV(CvMUTEXP(sv)));
@@ -1127,8 +1126,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
        Perl_dump_indent(aTHX_ level, file, "    CVGEN = 0x%"UVxf"\n", (UV)GvCVGEN(sv));
        Perl_dump_indent(aTHX_ level, file, "    GPFLAGS = 0x%"UVxf"\n", (UV)GvGPFLAGS(sv));
        Perl_dump_indent(aTHX_ level, file, "    LINE = %"IVdf"\n", (IV)GvLINE(sv));
+       Perl_dump_indent(aTHX_ level, file, "    FILE = \"%s\"\n", GvFILE(sv));
        Perl_dump_indent(aTHX_ level, file, "    FLAGS = 0x%"UVxf"\n", (UV)GvFLAGS(sv));
-       do_gv_dump (level, file, "    FILEGV", GvFILEGV(sv));
        do_gv_dump (level, file, "    EGV", GvEGV(sv));
        break;
     case SVt_PVIO:
index 08361d7..bc6d6cb 100644 (file)
@@ -442,6 +442,8 @@ C<REFCNT> (corresponding to the C function C<SvREFCNT>).
 
 =item LINE
 
+=item FILE
+
 =item FILEGV
 
 =item GvREFCNT
@@ -510,8 +512,6 @@ C<REFCNT> (corresponding to the C function C<SvREFCNT>).
 
 =item GV
 
-=item FILEGV
-
 =item DEPTH
 
 =item PADLIST
index 73f35ae..224354c 100644 (file)
@@ -1028,6 +1028,10 @@ U16
 GvLINE(gv)
        B::GV   gv
 
+char *
+GvFILE(gv)
+       B::GV   gv
+
 B::GV
 GvFILEGV(gv)
        B::GV   gv
@@ -1149,10 +1153,6 @@ B::GV
 CvGV(cv)
        B::CV   cv
 
-B::GV
-CvFILEGV(cv)
-       B::CV   cv
-
 long
 CvDEPTH(cv)
        B::CV   cv
index e0d6132..58d07c4 100644 (file)
@@ -68,76 +68,75 @@ $insn_data{xcv_stash} = [44, \&PUT_svindex, "GET_svindex"];
 $insn_data{xcv_start} = [45, \&PUT_opindex, "GET_opindex"];
 $insn_data{xcv_root} = [46, \&PUT_opindex, "GET_opindex"];
 $insn_data{xcv_gv} = [47, \&PUT_svindex, "GET_svindex"];
-$insn_data{xcv_filegv} = [48, \&PUT_svindex, "GET_svindex"];
-$insn_data{xcv_depth} = [49, \&PUT_I32, "GET_I32"];
-$insn_data{xcv_padlist} = [50, \&PUT_svindex, "GET_svindex"];
-$insn_data{xcv_outside} = [51, \&PUT_svindex, "GET_svindex"];
-$insn_data{xcv_flags} = [52, \&PUT_U8, "GET_U8"];
-$insn_data{av_extend} = [53, \&PUT_I32, "GET_I32"];
-$insn_data{av_push} = [54, \&PUT_svindex, "GET_svindex"];
-$insn_data{xav_fill} = [55, \&PUT_I32, "GET_I32"];
-$insn_data{xav_max} = [56, \&PUT_I32, "GET_I32"];
-$insn_data{xav_flags} = [57, \&PUT_U8, "GET_U8"];
-$insn_data{xhv_riter} = [58, \&PUT_I32, "GET_I32"];
-$insn_data{xhv_name} = [59, \&PUT_pvcontents, "GET_pvcontents"];
-$insn_data{hv_store} = [60, \&PUT_svindex, "GET_svindex"];
-$insn_data{sv_magic} = [61, \&PUT_U8, "GET_U8"];
-$insn_data{mg_obj} = [62, \&PUT_svindex, "GET_svindex"];
-$insn_data{mg_private} = [63, \&PUT_U16, "GET_U16"];
-$insn_data{mg_flags} = [64, \&PUT_U8, "GET_U8"];
-$insn_data{mg_pv} = [65, \&PUT_pvcontents, "GET_pvcontents"];
-$insn_data{xmg_stash} = [66, \&PUT_svindex, "GET_svindex"];
-$insn_data{gv_fetchpv} = [67, \&PUT_strconst, "GET_strconst"];
-$insn_data{gv_stashpv} = [68, \&PUT_strconst, "GET_strconst"];
-$insn_data{gp_sv} = [69, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_refcnt} = [70, \&PUT_U32, "GET_U32"];
-$insn_data{gp_refcnt_add} = [71, \&PUT_I32, "GET_I32"];
-$insn_data{gp_av} = [72, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_hv} = [73, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_cv} = [74, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_filegv} = [75, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_io} = [76, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_form} = [77, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_cvgen} = [78, \&PUT_U32, "GET_U32"];
-$insn_data{gp_line} = [79, \&PUT_U16, "GET_U16"];
-$insn_data{gp_share} = [80, \&PUT_svindex, "GET_svindex"];
-$insn_data{xgv_flags} = [81, \&PUT_U8, "GET_U8"];
-$insn_data{op_next} = [82, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_sibling} = [83, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_ppaddr} = [84, \&PUT_strconst, "GET_strconst"];
-$insn_data{op_targ} = [85, \&PUT_U32, "GET_U32"];
-$insn_data{op_type} = [86, \&PUT_U16, "GET_U16"];
-$insn_data{op_seq} = [87, \&PUT_U16, "GET_U16"];
-$insn_data{op_flags} = [88, \&PUT_U8, "GET_U8"];
-$insn_data{op_private} = [89, \&PUT_U8, "GET_U8"];
-$insn_data{op_first} = [90, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_last} = [91, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_other} = [92, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_children} = [93, \&PUT_U32, "GET_U32"];
-$insn_data{op_pmreplroot} = [94, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_pmreplrootgv} = [95, \&PUT_svindex, "GET_svindex"];
-$insn_data{op_pmreplstart} = [96, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_pmnext} = [97, \&PUT_opindex, "GET_opindex"];
-$insn_data{pregcomp} = [98, \&PUT_pvcontents, "GET_pvcontents"];
-$insn_data{op_pmflags} = [99, \&PUT_U16, "GET_U16"];
-$insn_data{op_pmpermflags} = [100, \&PUT_U16, "GET_U16"];
-$insn_data{op_sv} = [101, \&PUT_svindex, "GET_svindex"];
-$insn_data{op_padix} = [102, \&PUT_U32, "GET_U32"];
-$insn_data{op_pv} = [103, \&PUT_pvcontents, "GET_pvcontents"];
-$insn_data{op_pv_tr} = [104, \&PUT_op_tr_array, "GET_op_tr_array"];
-$insn_data{op_redoop} = [105, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_nextop} = [106, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_lastop} = [107, \&PUT_opindex, "GET_opindex"];
-$insn_data{cop_label} = [108, \&PUT_pvcontents, "GET_pvcontents"];
-$insn_data{cop_stash} = [109, \&PUT_svindex, "GET_svindex"];
-$insn_data{cop_filegv} = [110, \&PUT_svindex, "GET_svindex"];
-$insn_data{cop_seq} = [111, \&PUT_U32, "GET_U32"];
-$insn_data{cop_arybase} = [112, \&PUT_I32, "GET_I32"];
-$insn_data{cop_line} = [113, \&PUT_U16, "GET_U16"];
-$insn_data{cop_warnings} = [114, \&PUT_svindex, "GET_svindex"];
-$insn_data{main_start} = [115, \&PUT_opindex, "GET_opindex"];
-$insn_data{main_root} = [116, \&PUT_opindex, "GET_opindex"];
-$insn_data{curpad} = [117, \&PUT_svindex, "GET_svindex"];
+$insn_data{xcv_depth} = [48, \&PUT_I32, "GET_I32"];
+$insn_data{xcv_padlist} = [49, \&PUT_svindex, "GET_svindex"];
+$insn_data{xcv_outside} = [50, \&PUT_svindex, "GET_svindex"];
+$insn_data{xcv_flags} = [51, \&PUT_U8, "GET_U8"];
+$insn_data{av_extend} = [52, \&PUT_I32, "GET_I32"];
+$insn_data{av_push} = [53, \&PUT_svindex, "GET_svindex"];
+$insn_data{xav_fill} = [54, \&PUT_I32, "GET_I32"];
+$insn_data{xav_max} = [55, \&PUT_I32, "GET_I32"];
+$insn_data{xav_flags} = [56, \&PUT_U8, "GET_U8"];
+$insn_data{xhv_riter} = [57, \&PUT_I32, "GET_I32"];
+$insn_data{xhv_name} = [58, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{hv_store} = [59, \&PUT_svindex, "GET_svindex"];
+$insn_data{sv_magic} = [60, \&PUT_U8, "GET_U8"];
+$insn_data{mg_obj} = [61, \&PUT_svindex, "GET_svindex"];
+$insn_data{mg_private} = [62, \&PUT_U16, "GET_U16"];
+$insn_data{mg_flags} = [63, \&PUT_U8, "GET_U8"];
+$insn_data{mg_pv} = [64, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{xmg_stash} = [65, \&PUT_svindex, "GET_svindex"];
+$insn_data{gv_fetchpv} = [66, \&PUT_strconst, "GET_strconst"];
+$insn_data{gv_stashpv} = [67, \&PUT_strconst, "GET_strconst"];
+$insn_data{gp_sv} = [68, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_refcnt} = [69, \&PUT_U32, "GET_U32"];
+$insn_data{gp_refcnt_add} = [70, \&PUT_I32, "GET_I32"];
+$insn_data{gp_av} = [71, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_hv} = [72, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_cv} = [73, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_file} = [74, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{gp_io} = [75, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_form} = [76, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_cvgen} = [77, \&PUT_U32, "GET_U32"];
+$insn_data{gp_line} = [78, \&PUT_U16, "GET_U16"];
+$insn_data{gp_share} = [79, \&PUT_svindex, "GET_svindex"];
+$insn_data{xgv_flags} = [80, \&PUT_U8, "GET_U8"];
+$insn_data{op_next} = [81, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_sibling} = [82, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_ppaddr} = [83, \&PUT_strconst, "GET_strconst"];
+$insn_data{op_targ} = [84, \&PUT_U32, "GET_U32"];
+$insn_data{op_type} = [85, \&PUT_U16, "GET_U16"];
+$insn_data{op_seq} = [86, \&PUT_U16, "GET_U16"];
+$insn_data{op_flags} = [87, \&PUT_U8, "GET_U8"];
+$insn_data{op_private} = [88, \&PUT_U8, "GET_U8"];
+$insn_data{op_first} = [89, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_last} = [90, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_other} = [91, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_children} = [92, \&PUT_U32, "GET_U32"];
+$insn_data{op_pmreplroot} = [93, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_pmreplrootgv} = [94, \&PUT_svindex, "GET_svindex"];
+$insn_data{op_pmreplstart} = [95, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_pmnext} = [96, \&PUT_opindex, "GET_opindex"];
+$insn_data{pregcomp} = [97, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{op_pmflags} = [98, \&PUT_U16, "GET_U16"];
+$insn_data{op_pmpermflags} = [99, \&PUT_U16, "GET_U16"];
+$insn_data{op_sv} = [100, \&PUT_svindex, "GET_svindex"];
+$insn_data{op_padix} = [101, \&PUT_U32, "GET_U32"];
+$insn_data{op_pv} = [102, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{op_pv_tr} = [103, \&PUT_op_tr_array, "GET_op_tr_array"];
+$insn_data{op_redoop} = [104, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_nextop} = [105, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_lastop} = [106, \&PUT_opindex, "GET_opindex"];
+$insn_data{cop_label} = [107, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{cop_stash} = [108, \&PUT_svindex, "GET_svindex"];
+$insn_data{cop_filegv} = [109, \&PUT_svindex, "GET_svindex"];
+$insn_data{cop_seq} = [110, \&PUT_U32, "GET_U32"];
+$insn_data{cop_arybase} = [111, \&PUT_I32, "GET_I32"];
+$insn_data{cop_line} = [112, \&PUT_U16, "GET_U16"];
+$insn_data{cop_warnings} = [113, \&PUT_svindex, "GET_svindex"];
+$insn_data{main_start} = [114, \&PUT_opindex, "GET_opindex"];
+$insn_data{main_root} = [115, \&PUT_opindex, "GET_opindex"];
+$insn_data{curpad} = [116, \&PUT_svindex, "GET_svindex"];
 
 my ($insn_name, $insn_data);
 while (($insn_name, $insn_data) = each %insn_data) {
index cde9924..9cad99b 100644 (file)
@@ -470,10 +470,11 @@ sub B::GV::bytecode {
     my $egv = $gv->EGV;
     my $egvix = $egv->objix;
     ldsv($ix);
-    printf <<"EOT", $gv->FLAGS, $gv->GvFLAGS, $gv->LINE;
+    printf <<"EOT", $gv->FLAGS, $gv->GvFLAGS, $gv->LINE, cstring($gv->FILE);
 sv_flags 0x%x
 xgv_flags 0x%x
 gp_line %d
+gp_file %s
 EOT
     my $refcnt = $gv->REFCNT;
     printf("sv_refcnt_add %d\n", $refcnt - 1) if $refcnt > 1;
@@ -484,7 +485,7 @@ EOT
     } else {
        if ($gvname !~ /^([^A-Za-z]|STDIN|STDOUT|STDERR|ARGV|SIG|ENV)$/) {
            my $i;
-           my @subfield_names = qw(SV AV HV CV FILEGV FORM IO);
+           my @subfield_names = qw(SV AV HV CV FORM IO);
            my @subfields = map($gv->$_(), @subfield_names);
            my @ixes = map($_->objix, @subfields);
            # Reset sv register for $gv
@@ -567,7 +568,7 @@ sub B::CV::bytecode {
     my $ix = $cv->objix;
     $cv->B::PVMG::bytecode;
     my $i;
-    my @subfield_names = qw(ROOT START STASH GV FILEGV PADLIST OUTSIDE);
+    my @subfield_names = qw(ROOT START STASH GV PADLIST OUTSIDE);
     my @subfields = map($cv->$_(), @subfield_names);
     my @ixes = map($_->objix, @subfields);
     # Save OP tree from CvROOT (first element of @subfields)
index 31ecb53..f331821 100644 (file)
@@ -610,7 +610,7 @@ sub B::CV::save {
        my $stashname = $egv->STASH->NAME;
          if ($cvname eq "bootstrap")
           {                                   
-           my $file = $cv->FILEGV->SV->PV;    
+           my $file = $gv->FILE;    
            $decl->add("/* bootstrap $file */"); 
            warn "Bootstrap $stashname $file\n";
            $xsub{$stashname}='Dynamic'; 
@@ -700,13 +700,6 @@ sub B::CV::save {
        warn sprintf("done saving GV 0x%x for CV 0x%x\n",
                     $$gv, $$cv) if $debug_cv;
     }
-    my $filegv = $cv->FILEGV;
-    if ($$filegv) {
-       $filegv->save;
-       $init->add(sprintf("CvFILEGV(s\\_%x) = s\\_%x;", $$cv, $$filegv));
-       warn sprintf("done saving FILEGV 0x%x for CV 0x%x\n",
-                    $$filegv, $$cv) if $debug_cv;
-    }
     my $stash = $cv->STASH;
     if ($$stash) {
        $stash->save;
@@ -793,12 +786,8 @@ sub B::GV::save {
 #              warn "GV::save &$name\n"; # debug
            } 
         }     
-       my $gvfilegv = $gv->FILEGV;
-       if ($$gvfilegv) {
-           $gvfilegv->save;
-           $init->add(sprintf("GvFILEGV($sym) = (GV*)s\\_%x;",$$gvfilegv));
-#          warn "GV::save GvFILEGV(*$name)\n"; # debug
-       }
+       $init->add(sprintf("GvFILE($sym) = %s;", cstring($gv->FILE)));
+#      warn "GV::save GvFILE(*$name)\n"; # debug
        my $gvform = $gv->FORM;
        if ($$gvform) {
            $gvform->save;
@@ -1022,8 +1011,10 @@ typedef struct {
     void      (*xcv_xsub) (CV*);
     void *     xcv_xsubany;
     GV *       xcv_gv;
-    GV *       xcv_filegv;
-    long       xcv_depth;              /* >= 2 indicates recursive call */
+#if defined(PERL_BINCOMPAT_5005)
+    GV *       xcv_filegv;     /* XXX unused (and deprecated) */
+#endif
+    long       xcv_depth;      /* >= 2 indicates recursive call */
     AV *       xcv_padlist;
     CV *       xcv_outside;
 #ifdef USE_THREADS
index a61f6df..732169f 100644 (file)
@@ -178,13 +178,11 @@ sub B::CV::debug {
     my ($root) = $sv->ROOT;
     my ($padlist) = $sv->PADLIST;
     my ($gv) = $sv->GV;
-    my ($filegv) = $sv->FILEGV;
-    printf <<'EOT', $$stash, $$start, $$root, $$gv, $$filegv, $sv->DEPTH, $padlist, ${$sv->OUTSIDE};
+    printf <<'EOT', $$stash, $$start, $$root, $$gv, $sv->DEPTH, $padlist, ${$sv->OUTSIDE};
        STASH           0x%x
        START           0x%x
        ROOT            0x%x
        GV              0x%x
-       FILEGV          0x%x
        DEPTH           %d
        PADLIST         0x%x                           
        OUTSIDE         0x%x
@@ -192,7 +190,6 @@ EOT
     $start->debug if $start;
     $root->debug if $root;
     $gv->debug if $gv;
-    $filegv->debug if $filegv;
     $padlist->debug if $padlist;
 }
 
@@ -219,7 +216,7 @@ sub B::GV::debug {
     my ($av) = $gv->AV;
     my ($cv) = $gv->CV;
     $gv->B::SV::debug;
-    printf <<'EOT', $gv->NAME, $gv->STASH->NAME, $gv->STASH, $$sv, $gv->GvREFCNT, $gv->FORM, $$av, ${$gv->HV}, ${$gv->EGV}, $$cv, $gv->CVGEN, $gv->LINE, $gv->FILEGV, $gv->GvFLAGS;
+    printf <<'EOT', $gv->NAME, $gv->STASH->NAME, $gv->STASH, $$sv, $gv->GvREFCNT, $gv->FORM, $$av, ${$gv->HV}, ${$gv->EGV}, $$cv, $gv->CVGEN, $gv->LINE, $gv->FILE, $gv->GvFLAGS;
        NAME            %s
        STASH           %s (0x%x)
        SV              0x%x
@@ -231,7 +228,7 @@ sub B::GV::debug {
        CV              0x%x
        CVGEN           %d
        LINE            %d
-       FILEGV          0x%x
+       FILE            %s
        GvFLAGS         0x%x
 EOT
     $sv->debug if $sv;
index 06159a4..f7cd649 100644 (file)
@@ -272,7 +272,7 @@ sub B::GV::xref {
     my $cv = $gv->CV;
     if ($$cv) {
        #return if $done{$$cv}++;
-       $file = $gv->FILEGV->SV->PV;
+       $file = $gv->FILE;
        $line = $gv->LINE;
        process([$gv->STASH->NAME, "&", $gv->NAME], "subdef");
        push(@todo, $cv);
@@ -280,7 +280,7 @@ sub B::GV::xref {
     my $form = $gv->FORM;
     if ($$form) {
        return if $done{$$form}++;
-       $file = $gv->FILEGV->SV->PV;
+       $file = $gv->FILE;
        $line = $gv->LINE;
        process([$gv->STASH->NAME, "", $gv->NAME], "formdef");
     }
index 19b79ac..264cb01 100644 (file)
@@ -401,490 +401,483 @@ byterun(pTHXo_ struct bytestream bs)
                *(SV**)&CvGV(bytecode_sv) = arg;
                break;
            }
-         case INSN_XCV_FILEGV:         /* 48 */
-           {
-               svindex arg;
-               BGET_svindex(arg);
-               *(SV**)&CvFILEGV(bytecode_sv) = arg;
-               break;
-           }
-         case INSN_XCV_DEPTH:          /* 49 */
+         case INSN_XCV_DEPTH:          /* 48 */
            {
                long arg;
                BGET_I32(arg);
                CvDEPTH(bytecode_sv) = arg;
                break;
            }
-         case INSN_XCV_PADLIST:                /* 50 */
+         case INSN_XCV_PADLIST:                /* 49 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&CvPADLIST(bytecode_sv) = arg;
                break;
            }
-         case INSN_XCV_OUTSIDE:                /* 51 */
+         case INSN_XCV_OUTSIDE:                /* 50 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&CvOUTSIDE(bytecode_sv) = arg;
                break;
            }
-         case INSN_XCV_FLAGS:          /* 52 */
+         case INSN_XCV_FLAGS:          /* 51 */
            {
                U8 arg;
                BGET_U8(arg);
                CvFLAGS(bytecode_sv) = arg;
                break;
            }
-         case INSN_AV_EXTEND:          /* 53 */
+         case INSN_AV_EXTEND:          /* 52 */
            {
                SSize_t arg;
                BGET_I32(arg);
                BSET_av_extend(bytecode_sv, arg);
                break;
            }
-         case INSN_AV_PUSH:            /* 54 */
+         case INSN_AV_PUSH:            /* 53 */
            {
                svindex arg;
                BGET_svindex(arg);
                BSET_av_push(bytecode_sv, arg);
                break;
            }
-         case INSN_XAV_FILL:           /* 55 */
+         case INSN_XAV_FILL:           /* 54 */
            {
                SSize_t arg;
                BGET_I32(arg);
                AvFILLp(bytecode_sv) = arg;
                break;
            }
-         case INSN_XAV_MAX:            /* 56 */
+         case INSN_XAV_MAX:            /* 55 */
            {
                SSize_t arg;
                BGET_I32(arg);
                AvMAX(bytecode_sv) = arg;
                break;
            }
-         case INSN_XAV_FLAGS:          /* 57 */
+         case INSN_XAV_FLAGS:          /* 56 */
            {
                U8 arg;
                BGET_U8(arg);
                AvFLAGS(bytecode_sv) = arg;
                break;
            }
-         case INSN_XHV_RITER:          /* 58 */
+         case INSN_XHV_RITER:          /* 57 */
            {
                I32 arg;
                BGET_I32(arg);
                HvRITER(bytecode_sv) = arg;
                break;
            }
-         case INSN_XHV_NAME:           /* 59 */
+         case INSN_XHV_NAME:           /* 58 */
            {
                pvcontents arg;
                BGET_pvcontents(arg);
                HvNAME(bytecode_sv) = arg;
                break;
            }
-         case INSN_HV_STORE:           /* 60 */
+         case INSN_HV_STORE:           /* 59 */
            {
                svindex arg;
                BGET_svindex(arg);
                BSET_hv_store(bytecode_sv, arg);
                break;
            }
-         case INSN_SV_MAGIC:           /* 61 */
+         case INSN_SV_MAGIC:           /* 60 */
            {
                char arg;
                BGET_U8(arg);
                BSET_sv_magic(bytecode_sv, arg);
                break;
            }
-         case INSN_MG_OBJ:             /* 62 */
+         case INSN_MG_OBJ:             /* 61 */
            {
                svindex arg;
                BGET_svindex(arg);
                SvMAGIC(bytecode_sv)->mg_obj = arg;
                break;
            }
-         case INSN_MG_PRIVATE:         /* 63 */
+         case INSN_MG_PRIVATE:         /* 62 */
            {
                U16 arg;
                BGET_U16(arg);
                SvMAGIC(bytecode_sv)->mg_private = arg;
                break;
            }
-         case INSN_MG_FLAGS:           /* 64 */
+         case INSN_MG_FLAGS:           /* 63 */
            {
                U8 arg;
                BGET_U8(arg);
                SvMAGIC(bytecode_sv)->mg_flags = arg;
                break;
            }
-         case INSN_MG_PV:              /* 65 */
+         case INSN_MG_PV:              /* 64 */
            {
                pvcontents arg;
                BGET_pvcontents(arg);
                BSET_mg_pv(SvMAGIC(bytecode_sv), arg);
                break;
            }
-         case INSN_XMG_STASH:          /* 66 */
+         case INSN_XMG_STASH:          /* 65 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&SvSTASH(bytecode_sv) = arg;
                break;
            }
-         case INSN_GV_FETCHPV:         /* 67 */
+         case INSN_GV_FETCHPV:         /* 66 */
            {
                strconst arg;
                BGET_strconst(arg);
                BSET_gv_fetchpv(bytecode_sv, arg);
                break;
            }
-         case INSN_GV_STASHPV:         /* 68 */
+         case INSN_GV_STASHPV:         /* 67 */
            {
                strconst arg;
                BGET_strconst(arg);
                BSET_gv_stashpv(bytecode_sv, arg);
                break;
            }
-         case INSN_GP_SV:              /* 69 */
+         case INSN_GP_SV:              /* 68 */
            {
                svindex arg;
                BGET_svindex(arg);
                GvSV(bytecode_sv) = arg;
                break;
            }
-         case INSN_GP_REFCNT:          /* 70 */
+         case INSN_GP_REFCNT:          /* 69 */
            {
                U32 arg;
                BGET_U32(arg);
                GvREFCNT(bytecode_sv) = arg;
                break;
            }
-         case INSN_GP_REFCNT_ADD:              /* 71 */
+         case INSN_GP_REFCNT_ADD:              /* 70 */
            {
                I32 arg;
                BGET_I32(arg);
                BSET_gp_refcnt_add(GvREFCNT(bytecode_sv), arg);
                break;
            }
-         case INSN_GP_AV:              /* 72 */
+         case INSN_GP_AV:              /* 71 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&GvAV(bytecode_sv) = arg;
                break;
            }
-         case INSN_GP_HV:              /* 73 */
+         case INSN_GP_HV:              /* 72 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&GvHV(bytecode_sv) = arg;
                break;
            }
-         case INSN_GP_CV:              /* 74 */
+         case INSN_GP_CV:              /* 73 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&GvCV(bytecode_sv) = arg;
                break;
            }
-         case INSN_GP_FILEGV:          /* 75 */
+         case INSN_GP_FILE:            /* 74 */
            {
-               svindex arg;
-               BGET_svindex(arg);
-               *(SV**)&GvFILEGV(bytecode_sv) = arg;
+               pvcontents arg;
+               BGET_pvcontents(arg);
+               GvFILE(bytecode_sv) = arg;
                break;
            }
-         case INSN_GP_IO:              /* 76 */
+         case INSN_GP_IO:              /* 75 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&GvIOp(bytecode_sv) = arg;
                break;
            }
-         case INSN_GP_FORM:            /* 77 */
+         case INSN_GP_FORM:            /* 76 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&GvFORM(bytecode_sv) = arg;
                break;
            }
-         case INSN_GP_CVGEN:           /* 78 */
+         case INSN_GP_CVGEN:           /* 77 */
            {
                U32 arg;
                BGET_U32(arg);
                GvCVGEN(bytecode_sv) = arg;
                break;
            }
-         case INSN_GP_LINE:            /* 79 */
+         case INSN_GP_LINE:            /* 78 */
            {
                line_t arg;
                BGET_U16(arg);
                GvLINE(bytecode_sv) = arg;
                break;
            }
-         case INSN_GP_SHARE:           /* 80 */
+         case INSN_GP_SHARE:           /* 79 */
            {
                svindex arg;
                BGET_svindex(arg);
                BSET_gp_share(bytecode_sv, arg);
                break;
            }
-         case INSN_XGV_FLAGS:          /* 81 */
+         case INSN_XGV_FLAGS:          /* 80 */
            {
                U8 arg;
                BGET_U8(arg);
                GvFLAGS(bytecode_sv) = arg;
                break;
            }
-         case INSN_OP_NEXT:            /* 82 */
+         case INSN_OP_NEXT:            /* 81 */
            {
                opindex arg;
                BGET_opindex(arg);
                PL_op->op_next = arg;
                break;
            }
-         case INSN_OP_SIBLING:         /* 83 */
+         case INSN_OP_SIBLING:         /* 82 */
            {
                opindex arg;
                BGET_opindex(arg);
                PL_op->op_sibling = arg;
                break;
            }
-         case INSN_OP_PPADDR:          /* 84 */
+         case INSN_OP_PPADDR:          /* 83 */
            {
                strconst arg;
                BGET_strconst(arg);
                BSET_op_ppaddr(PL_op->op_ppaddr, arg);
                break;
            }
-         case INSN_OP_TARG:            /* 85 */
+         case INSN_OP_TARG:            /* 84 */
            {
                PADOFFSET arg;
                BGET_U32(arg);
                PL_op->op_targ = arg;
                break;
            }
-         case INSN_OP_TYPE:            /* 86 */
+         case INSN_OP_TYPE:            /* 85 */
            {
                OPCODE arg;
                BGET_U16(arg);
                BSET_op_type(PL_op, arg);
                break;
            }
-         case INSN_OP_SEQ:             /* 87 */
+         case INSN_OP_SEQ:             /* 86 */
            {
                U16 arg;
                BGET_U16(arg);
                PL_op->op_seq = arg;
                break;
            }
-         case INSN_OP_FLAGS:           /* 88 */
+         case INSN_OP_FLAGS:           /* 87 */
            {
                U8 arg;
                BGET_U8(arg);
                PL_op->op_flags = arg;
                break;
            }
-         case INSN_OP_PRIVATE:         /* 89 */
+         case INSN_OP_PRIVATE:         /* 88 */
            {
                U8 arg;
                BGET_U8(arg);
                PL_op->op_private = arg;
                break;
            }
-         case INSN_OP_FIRST:           /* 90 */
+         case INSN_OP_FIRST:           /* 89 */
            {
                opindex arg;
                BGET_opindex(arg);
                cUNOP->op_first = arg;
                break;
            }
-         case INSN_OP_LAST:            /* 91 */
+         case INSN_OP_LAST:            /* 90 */
            {
                opindex arg;
                BGET_opindex(arg);
                cBINOP->op_last = arg;
                break;
            }
-         case INSN_OP_OTHER:           /* 92 */
+         case INSN_OP_OTHER:           /* 91 */
            {
                opindex arg;
                BGET_opindex(arg);
                cLOGOP->op_other = arg;
                break;
            }
-         case INSN_OP_CHILDREN:                /* 93 */
+         case INSN_OP_CHILDREN:                /* 92 */
            {
                U32 arg;
                BGET_U32(arg);
                cLISTOP->op_children = arg;
                break;
            }
-         case INSN_OP_PMREPLROOT:              /* 94 */
+         case INSN_OP_PMREPLROOT:              /* 93 */
            {
                opindex arg;
                BGET_opindex(arg);
                cPMOP->op_pmreplroot = arg;
                break;
            }
-         case INSN_OP_PMREPLROOTGV:            /* 95 */
+         case INSN_OP_PMREPLROOTGV:            /* 94 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&cPMOP->op_pmreplroot = arg;
                break;
            }
-         case INSN_OP_PMREPLSTART:             /* 96 */
+         case INSN_OP_PMREPLSTART:             /* 95 */
            {
                opindex arg;
                BGET_opindex(arg);
                cPMOP->op_pmreplstart = arg;
                break;
            }
-         case INSN_OP_PMNEXT:          /* 97 */
+         case INSN_OP_PMNEXT:          /* 96 */
            {
                opindex arg;
                BGET_opindex(arg);
                *(OP**)&cPMOP->op_pmnext = arg;
                break;
            }
-         case INSN_PREGCOMP:           /* 98 */
+         case INSN_PREGCOMP:           /* 97 */
            {
                pvcontents arg;
                BGET_pvcontents(arg);
                BSET_pregcomp(PL_op, arg);
                break;
            }
-         case INSN_OP_PMFLAGS:         /* 99 */
+         case INSN_OP_PMFLAGS:         /* 98 */
            {
                U16 arg;
                BGET_U16(arg);
                cPMOP->op_pmflags = arg;
                break;
            }
-         case INSN_OP_PMPERMFLAGS:             /* 100 */
+         case INSN_OP_PMPERMFLAGS:             /* 99 */
            {
                U16 arg;
                BGET_U16(arg);
                cPMOP->op_pmpermflags = arg;
                break;
            }
-         case INSN_OP_SV:              /* 101 */
+         case INSN_OP_SV:              /* 100 */
            {
                svindex arg;
                BGET_svindex(arg);
                cSVOP->op_sv = arg;
                break;
            }
-         case INSN_OP_PADIX:           /* 102 */
+         case INSN_OP_PADIX:           /* 101 */
            {
                PADOFFSET arg;
                BGET_U32(arg);
                cPADOP->op_padix = arg;
                break;
            }
-         case INSN_OP_PV:              /* 103 */
+         case INSN_OP_PV:              /* 102 */
            {
                pvcontents arg;
                BGET_pvcontents(arg);
                cPVOP->op_pv = arg;
                break;
            }
-         case INSN_OP_PV_TR:           /* 104 */
+         case INSN_OP_PV_TR:           /* 103 */
            {
                op_tr_array arg;
                BGET_op_tr_array(arg);
                cPVOP->op_pv = arg;
                break;
            }
-         case INSN_OP_REDOOP:          /* 105 */
+         case INSN_OP_REDOOP:          /* 104 */
            {
                opindex arg;
                BGET_opindex(arg);
                cLOOP->op_redoop = arg;
                break;
            }
-         case INSN_OP_NEXTOP:          /* 106 */
+         case INSN_OP_NEXTOP:          /* 105 */
            {
                opindex arg;
                BGET_opindex(arg);
                cLOOP->op_nextop = arg;
                break;
            }
-         case INSN_OP_LASTOP:          /* 107 */
+         case INSN_OP_LASTOP:          /* 106 */
            {
                opindex arg;
                BGET_opindex(arg);
                cLOOP->op_lastop = arg;
                break;
            }
-         case INSN_COP_LABEL:          /* 108 */
+         case INSN_COP_LABEL:          /* 107 */
            {
                pvcontents arg;
                BGET_pvcontents(arg);
                cCOP->cop_label = arg;
                break;
            }
-         case INSN_COP_STASH:          /* 109 */
+         case INSN_COP_STASH:          /* 108 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&cCOP->cop_stash = arg;
                break;
            }
-         case INSN_COP_FILEGV:         /* 110 */
+         case INSN_COP_FILEGV:         /* 109 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&cCOP->cop_filegv = arg;
                break;
            }
-         case INSN_COP_SEQ:            /* 111 */
+         case INSN_COP_SEQ:            /* 110 */
            {
                U32 arg;
                BGET_U32(arg);
                cCOP->cop_seq = arg;
                break;
            }
-         case INSN_COP_ARYBASE:                /* 112 */
+         case INSN_COP_ARYBASE:                /* 111 */
            {
                I32 arg;
                BGET_I32(arg);
                cCOP->cop_arybase = arg;
                break;
            }
-         case INSN_COP_LINE:           /* 113 */
+         case INSN_COP_LINE:           /* 112 */
            {
                line_t arg;
                BGET_U16(arg);
                cCOP->cop_line = arg;
                break;
            }
-         case INSN_COP_WARNINGS:               /* 114 */
+         case INSN_COP_WARNINGS:               /* 113 */
            {
                svindex arg;
                BGET_svindex(arg);
                cCOP->cop_warnings = arg;
                break;
            }
-         case INSN_MAIN_START:         /* 115 */
+         case INSN_MAIN_START:         /* 114 */
            {
                opindex arg;
                BGET_opindex(arg);
                PL_main_start = arg;
                break;
            }
-         case INSN_MAIN_ROOT:          /* 116 */
+         case INSN_MAIN_ROOT:          /* 115 */
            {
                opindex arg;
                BGET_opindex(arg);
                PL_main_root = arg;
                break;
            }
-         case INSN_CURPAD:             /* 117 */
+         case INSN_CURPAD:             /* 116 */
            {
                svindex arg;
                BGET_svindex(arg);
index d8f6c0e..306df9c 100644 (file)
@@ -64,77 +64,76 @@ enum {
     INSN_XCV_START,                    /* 45 */
     INSN_XCV_ROOT,                     /* 46 */
     INSN_XCV_GV,                       /* 47 */
-    INSN_XCV_FILEGV,                   /* 48 */
-    INSN_XCV_DEPTH,                    /* 49 */
-    INSN_XCV_PADLIST,                  /* 50 */
-    INSN_XCV_OUTSIDE,                  /* 51 */
-    INSN_XCV_FLAGS,                    /* 52 */
-    INSN_AV_EXTEND,                    /* 53 */
-    INSN_AV_PUSH,                      /* 54 */
-    INSN_XAV_FILL,                     /* 55 */
-    INSN_XAV_MAX,                      /* 56 */
-    INSN_XAV_FLAGS,                    /* 57 */
-    INSN_XHV_RITER,                    /* 58 */
-    INSN_XHV_NAME,                     /* 59 */
-    INSN_HV_STORE,                     /* 60 */
-    INSN_SV_MAGIC,                     /* 61 */
-    INSN_MG_OBJ,                       /* 62 */
-    INSN_MG_PRIVATE,                   /* 63 */
-    INSN_MG_FLAGS,                     /* 64 */
-    INSN_MG_PV,                        /* 65 */
-    INSN_XMG_STASH,                    /* 66 */
-    INSN_GV_FETCHPV,                   /* 67 */
-    INSN_GV_STASHPV,                   /* 68 */
-    INSN_GP_SV,                        /* 69 */
-    INSN_GP_REFCNT,                    /* 70 */
-    INSN_GP_REFCNT_ADD,                        /* 71 */
-    INSN_GP_AV,                        /* 72 */
-    INSN_GP_HV,                        /* 73 */
-    INSN_GP_CV,                        /* 74 */
-    INSN_GP_FILEGV,                    /* 75 */
-    INSN_GP_IO,                        /* 76 */
-    INSN_GP_FORM,                      /* 77 */
-    INSN_GP_CVGEN,                     /* 78 */
-    INSN_GP_LINE,                      /* 79 */
-    INSN_GP_SHARE,                     /* 80 */
-    INSN_XGV_FLAGS,                    /* 81 */
-    INSN_OP_NEXT,                      /* 82 */
-    INSN_OP_SIBLING,                   /* 83 */
-    INSN_OP_PPADDR,                    /* 84 */
-    INSN_OP_TARG,                      /* 85 */
-    INSN_OP_TYPE,                      /* 86 */
-    INSN_OP_SEQ,                       /* 87 */
-    INSN_OP_FLAGS,                     /* 88 */
-    INSN_OP_PRIVATE,                   /* 89 */
-    INSN_OP_FIRST,                     /* 90 */
-    INSN_OP_LAST,                      /* 91 */
-    INSN_OP_OTHER,                     /* 92 */
-    INSN_OP_CHILDREN,                  /* 93 */
-    INSN_OP_PMREPLROOT,                        /* 94 */
-    INSN_OP_PMREPLROOTGV,                      /* 95 */
-    INSN_OP_PMREPLSTART,                       /* 96 */
-    INSN_OP_PMNEXT,                    /* 97 */
-    INSN_PREGCOMP,                     /* 98 */
-    INSN_OP_PMFLAGS,                   /* 99 */
-    INSN_OP_PMPERMFLAGS,                       /* 100 */
-    INSN_OP_SV,                        /* 101 */
-    INSN_OP_PADIX,                     /* 102 */
-    INSN_OP_PV,                        /* 103 */
-    INSN_OP_PV_TR,                     /* 104 */
-    INSN_OP_REDOOP,                    /* 105 */
-    INSN_OP_NEXTOP,                    /* 106 */
-    INSN_OP_LASTOP,                    /* 107 */
-    INSN_COP_LABEL,                    /* 108 */
-    INSN_COP_STASH,                    /* 109 */
-    INSN_COP_FILEGV,                   /* 110 */
-    INSN_COP_SEQ,                      /* 111 */
-    INSN_COP_ARYBASE,                  /* 112 */
-    INSN_COP_LINE,                     /* 113 */
-    INSN_COP_WARNINGS,                 /* 114 */
-    INSN_MAIN_START,                   /* 115 */
-    INSN_MAIN_ROOT,                    /* 116 */
-    INSN_CURPAD,                       /* 117 */
-    MAX_INSN = 117
+    INSN_XCV_DEPTH,                    /* 48 */
+    INSN_XCV_PADLIST,                  /* 49 */
+    INSN_XCV_OUTSIDE,                  /* 50 */
+    INSN_XCV_FLAGS,                    /* 51 */
+    INSN_AV_EXTEND,                    /* 52 */
+    INSN_AV_PUSH,                      /* 53 */
+    INSN_XAV_FILL,                     /* 54 */
+    INSN_XAV_MAX,                      /* 55 */
+    INSN_XAV_FLAGS,                    /* 56 */
+    INSN_XHV_RITER,                    /* 57 */
+    INSN_XHV_NAME,                     /* 58 */
+    INSN_HV_STORE,                     /* 59 */
+    INSN_SV_MAGIC,                     /* 60 */
+    INSN_MG_OBJ,                       /* 61 */
+    INSN_MG_PRIVATE,                   /* 62 */
+    INSN_MG_FLAGS,                     /* 63 */
+    INSN_MG_PV,                        /* 64 */
+    INSN_XMG_STASH,                    /* 65 */
+    INSN_GV_FETCHPV,                   /* 66 */
+    INSN_GV_STASHPV,                   /* 67 */
+    INSN_GP_SV,                        /* 68 */
+    INSN_GP_REFCNT,                    /* 69 */
+    INSN_GP_REFCNT_ADD,                        /* 70 */
+    INSN_GP_AV,                        /* 71 */
+    INSN_GP_HV,                        /* 72 */
+    INSN_GP_CV,                        /* 73 */
+    INSN_GP_FILE,                      /* 74 */
+    INSN_GP_IO,                        /* 75 */
+    INSN_GP_FORM,                      /* 76 */
+    INSN_GP_CVGEN,                     /* 77 */
+    INSN_GP_LINE,                      /* 78 */
+    INSN_GP_SHARE,                     /* 79 */
+    INSN_XGV_FLAGS,                    /* 80 */
+    INSN_OP_NEXT,                      /* 81 */
+    INSN_OP_SIBLING,                   /* 82 */
+    INSN_OP_PPADDR,                    /* 83 */
+    INSN_OP_TARG,                      /* 84 */
+    INSN_OP_TYPE,                      /* 85 */
+    INSN_OP_SEQ,                       /* 86 */
+    INSN_OP_FLAGS,                     /* 87 */
+    INSN_OP_PRIVATE,                   /* 88 */
+    INSN_OP_FIRST,                     /* 89 */
+    INSN_OP_LAST,                      /* 90 */
+    INSN_OP_OTHER,                     /* 91 */
+    INSN_OP_CHILDREN,                  /* 92 */
+    INSN_OP_PMREPLROOT,                        /* 93 */
+    INSN_OP_PMREPLROOTGV,                      /* 94 */
+    INSN_OP_PMREPLSTART,                       /* 95 */
+    INSN_OP_PMNEXT,                    /* 96 */
+    INSN_PREGCOMP,                     /* 97 */
+    INSN_OP_PMFLAGS,                   /* 98 */
+    INSN_OP_PMPERMFLAGS,                       /* 99 */
+    INSN_OP_SV,                        /* 100 */
+    INSN_OP_PADIX,                     /* 101 */
+    INSN_OP_PV,                        /* 102 */
+    INSN_OP_PV_TR,                     /* 103 */
+    INSN_OP_REDOOP,                    /* 104 */
+    INSN_OP_NEXTOP,                    /* 105 */
+    INSN_OP_LASTOP,                    /* 106 */
+    INSN_COP_LABEL,                    /* 107 */
+    INSN_COP_STASH,                    /* 108 */
+    INSN_COP_FILEGV,                   /* 109 */
+    INSN_COP_SEQ,                      /* 110 */
+    INSN_COP_ARYBASE,                  /* 111 */
+    INSN_COP_LINE,                     /* 112 */
+    INSN_COP_WARNINGS,                 /* 113 */
+    INSN_MAIN_START,                   /* 114 */
+    INSN_MAIN_ROOT,                    /* 115 */
+    INSN_CURPAD,                       /* 116 */
+    MAX_INSN = 116
 };
 
 enum {
index 7b3cf74..4bac55f 100644 (file)
@@ -364,7 +364,6 @@ Looks like this:
          XSUB = 0x0
          XSUBANY = 0
          GVGV::GV = 0x1d44e8   "MY" :: "top_targets"
-         FILEGV = 0x1fab74     "_<(eval 5)"
          DEPTH = 0
          PADLIST = 0x1c9338
 
diff --git a/gv.c b/gv.c
index 0688fef..aa4a649 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -68,15 +68,16 @@ Perl_gv_fetchfile(pTHX_ const char *name)
     tmpbuf[1] = '<';
     strcpy(tmpbuf + 2, name);
     gv = *(GV**)hv_fetch(PL_defstash, tmpbuf, tmplen, TRUE);
-    if (!isGV(gv))
+    if (!isGV(gv)) {
        gv_init(gv, PL_defstash, tmpbuf, tmplen, FALSE);
+       sv_setpv(GvSV(gv), name);
+       if (*name == '/' && (instr(name, "/lib/") || instr(name, ".pm")))
+           GvMULTI_on(gv);
+       if (PERLDB_LINE)
+           hv_magic(GvHVn(gv_AVadd(gv)), gv, 'L');
+    }
     if (tmpbuf != smallbuf)
        Safefree(tmpbuf);
-    sv_setpv(GvSV(gv), name);
-    if (*name == '/' && (instr(name, "/lib/") || instr(name, ".pm")))
-       GvMULTI_on(gv);
-    if (PERLDB_LINE)
-       hv_magic(GvHVn(gv_AVadd(gv)), gv, 'L');
     return gv;
 }
 
@@ -101,7 +102,7 @@ Perl_gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi)
     GvGP(gv) = gp_ref(gp);
     GvSV(gv) = NEWSV(72,0);
     GvLINE(gv) = PL_curcop->cop_line;
-    GvFILEGV(gv) = PL_curcop->cop_filegv;
+    GvFILE(gv) = PL_curcop->cop_filegv ? SvPVX(GvSV(PL_curcop->cop_filegv)) : "";
     GvCVGEN(gv) = 0;
     GvEGV(gv) = gv;
     sv_magic((SV*)gv, (SV*)gv, '*', name, len);
@@ -120,7 +121,6 @@ Perl_gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi)
 
        PL_sub_generation++;
        CvGV(GvCV(gv)) = (GV*)SvREFCNT_inc(gv);
-       CvFILEGV(GvCV(gv)) = PL_curcop->cop_filegv;
        CvSTASH(GvCV(gv)) = PL_curstash;
 #ifdef USE_THREADS
        CvOWNER(GvCV(gv)) = 0;
@@ -896,7 +896,7 @@ Perl_gv_check(pTHX_ HV *stash)
                if (SvTYPE(gv) != SVt_PVGV || GvMULTI(gv))
                    continue;
                PL_curcop->cop_line = GvLINE(gv);
-               filegv = GvFILEGV(gv);
+               filegv = GvFILEGV(gv);          /* XXX could be made faster */
                PL_curcop->cop_filegv = filegv;
                if (filegv && GvMULTI(filegv))  /* Filename began with slash */
                    continue;
diff --git a/gv.h b/gv.h
index 620cbc3..99d534e 100644 (file)
--- a/gv.h
+++ b/gv.h
@@ -19,7 +19,7 @@ struct gp {
     U32                gp_cvgen;       /* generational validity of cached gv_cv */
     U32                gp_flags;       /* XXX unused */
     line_t     gp_line;        /* line first declared at (for -w) */
-    GV *       gp_filegv;      /* file first declared in (for -w) */
+    char *     gp_file;        /* file first declared in (for -w) */
 };
 
 #if defined(CRIPPLED_CC) && (defined(iAPX286) || defined(M_I286) || defined(I80286))
@@ -70,7 +70,8 @@ HV *GvHVn();
 #define GvGPFLAGS(gv)  (GvGP(gv)->gp_flags)
 
 #define GvLINE(gv)     (GvGP(gv)->gp_line)
-#define GvFILEGV(gv)   (GvGP(gv)->gp_filegv)
+#define GvFILE(gv)     (GvGP(gv)->gp_file)
+#define GvFILEGV(gv)   (gv_fetchfile(GvGP(gv)->gp_file))
 
 #define GvEGV(gv)      (GvGP(gv)->gp_egv)
 #define GvENAME(gv)    GvNAME(GvEGV(gv) ? GvEGV(gv) : gv)
diff --git a/op.c b/op.c
index 3e25ef8..bacfb9d 100644 (file)
--- a/op.c
+++ b/op.c
@@ -3941,7 +3941,6 @@ S_cv_clone2(pTHX_ CV *proto, CV *outside)
     MUTEX_INIT(CvMUTEXP(cv));
     CvOWNER(cv)                = 0;
 #endif /* USE_THREADS */
-    CvFILEGV(cv)       = CvFILEGV(proto);
     CvGV(cv)           = (GV*)SvREFCNT_inc(CvGV(proto));
     CvSTASH(cv)                = CvSTASH(proto);
     CvROOT(cv)         = CvROOT(proto);
@@ -4267,7 +4266,6 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
        }
     }
     CvGV(cv) = (GV*)SvREFCNT_inc(gv);
-    CvFILEGV(cv) = PL_curcop->cop_filegv;
     CvSTASH(cv) = PL_curstash;
 #ifdef USE_THREADS
     CvOWNER(cv) = 0;
@@ -4502,7 +4500,7 @@ Perl_newXS(pTHX_ char *name, XSUBADDR_t subaddr, char *filename)
     MUTEX_INIT(CvMUTEXP(cv));
     CvOWNER(cv) = 0;
 #endif /* USE_THREADS */
-    CvFILEGV(cv) = gv_fetchfile(filename);
+    (void)gv_fetchfile(filename);
     CvXSUB(cv) = subaddr;
 
     if (name) {
@@ -4566,7 +4564,6 @@ Perl_newFORM(pTHX_ I32 floor, OP *o, OP *block)
     cv = PL_compcv;
     GvFORM(gv) = cv;
     CvGV(cv) = (GV*)SvREFCNT_inc(gv);
-    CvFILEGV(cv) = PL_curcop->cop_filegv;
 
     for (ix = AvFILLp(PL_comppad); ix > 0; ix--) {
        if (!SvPADMY(PL_curpad[ix]) && !SvIMMORTAL(PL_curpad[ix]))
diff --git a/sv.h b/sv.h
index e99891d..116f178 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -276,8 +276,10 @@ struct xpvfm {
     void      (*xcv_xsub)(pTHXo_ CV*);
     ANY                xcv_xsubany;
     GV *       xcv_gv;
-    GV *       xcv_filegv;
-    long       xcv_depth;              /* >= 2 indicates recursive call */
+#if defined(PERL_BINCOMPAT_5005)
+    GV *       xcv_filegv;     /* XXX unused (and deprecated) */
+#endif
+    long       xcv_depth;      /* >= 2 indicates recursive call */
     AV *       xcv_padlist;
     CV *       xcv_outside;
 #ifdef USE_THREADS