Remove PMROOT and replace it with a small shell script. Er, magic.
Nicholas Clark [Fri, 20 May 2005 22:53:00 +0000 (22:53 +0000)]
(PMROOT being needed to implement bare C<reset> - how often do you
use that?)

p4raw-id: //depot/perl@24522

12 files changed:
bytecode.pl
dump.c
ext/B/B.pm
ext/B/B.xs
ext/B/B/Asmdata.pm
ext/ByteLoader/byterun.c
ext/ByteLoader/byterun.h
hv.c
hv.h
op.c
perl.h
sv.c

index fa9019f..5747eae 100644 (file)
@@ -421,7 +421,6 @@ xav_fill    AvFILLp(bstate->bs_sv)                  SSize_t
 xav_max                AvMAX(bstate->bs_sv)                    SSize_t
 xhv_riter      HvRITER(bstate->bs_sv)                  I32
 xhv_name       HvNAME(bstate->bs_sv)                   pvindex
-xhv_pmroot     *(OP**)&HvPMROOT(bstate->bs_sv)         opindex
 hv_store       bstate->bs_sv                           svindex         x
 sv_magic       bstate->bs_sv                           char            x
 mg_obj         SvMAGIC(bstate->bs_sv)->mg_obj          svindex
diff --git a/dump.c b/dump.c
index 8bbacb1..627c5c0 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -892,6 +892,7 @@ static const struct { const char type; const char *name; } magic_names[] = {
        { PERL_MAGIC_arylen,         "arylen(#)" },
        { PERL_MAGIC_glob,           "glob(*)" },
        { PERL_MAGIC_pos,            "pos(.)" },
+       { PERL_MAGIC_symtab,         "symtab(:)" },
        { PERL_MAGIC_backref,        "backref(<)" },
        { PERL_MAGIC_overload,       "overload(A)" },
        { PERL_MAGIC_bm,             "bm(B)" },
@@ -1419,8 +1420,12 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
        Perl_dump_indent(aTHX_ level, file, "  MAX = %"IVdf"\n", (IV)HvMAX(sv));
        Perl_dump_indent(aTHX_ level, file, "  RITER = %"IVdf"\n", (IV)HvRITER(sv));
        Perl_dump_indent(aTHX_ level, file, "  EITER = 0x%"UVxf"\n", PTR2UV(HvEITER(sv)));
-       if (HvPMROOT(sv))
-           Perl_dump_indent(aTHX_ level, file, "  PMROOT = 0x%"UVxf"\n", PTR2UV(HvPMROOT(sv)));
+       {
+           MAGIC *mg = mg_find(sv, PERL_MAGIC_symtab);
+           if (mg && mg->mg_obj) {
+               Perl_dump_indent(aTHX_ level, file, "  PMROOT = 0x%"UVxf"\n", PTR2UV(mg->mg_obj));
+           }
+       }
        if (HvNAME(sv))
            Perl_dump_indent(aTHX_ level, file, "  NAME = \"%s\"\n", HvNAME(sv));
        if (nest < maxnest && !HvEITER(sv)) { /* Try to preserve iterator */
index 2cfe30f..84d19dc 100644 (file)
@@ -907,8 +907,6 @@ For constant subroutines, returns the constant SV returned by the subroutine.
 
 =item NAME
 
-=item PMROOT
-
 =item ARRAY
 
 =back
index 14a9adb..0426fcd 100644 (file)
@@ -1684,10 +1684,6 @@ char *
 HvNAME(hv)
        B::HV   hv
 
-B::PMOP
-HvPMROOT(hv)
-       B::HV   hv
-
 void
 HvARRAY(hv)
        B::HV   hv
index 6b2eac9..17f18dc 100644 (file)
@@ -91,90 +91,89 @@ $insn_data{xav_fill} = [63, \&PUT_PADOFFSET, "GET_PADOFFSET"];
 $insn_data{xav_max} = [64, \&PUT_PADOFFSET, "GET_PADOFFSET"];
 $insn_data{xhv_riter} = [65, \&PUT_I32, "GET_I32"];
 $insn_data{xhv_name} = [66, \&PUT_pvindex, "GET_pvindex"];
-$insn_data{xhv_pmroot} = [67, \&PUT_opindex, "GET_opindex"];
-$insn_data{hv_store} = [68, \&PUT_svindex, "GET_svindex"];
-$insn_data{sv_magic} = [69, \&PUT_U8, "GET_U8"];
-$insn_data{mg_obj} = [70, \&PUT_svindex, "GET_svindex"];
-$insn_data{mg_private} = [71, \&PUT_U16, "GET_U16"];
-$insn_data{mg_flags} = [72, \&PUT_U8, "GET_U8"];
-$insn_data{mg_name} = [73, \&PUT_pvcontents, "GET_pvcontents"];
-$insn_data{mg_namex} = [74, \&PUT_svindex, "GET_svindex"];
-$insn_data{xmg_stash} = [75, \&PUT_svindex, "GET_svindex"];
-$insn_data{gv_fetchpv} = [76, \&PUT_strconst, "GET_strconst"];
-$insn_data{gv_fetchpvx} = [77, \&PUT_strconst, "GET_strconst"];
-$insn_data{gv_stashpv} = [78, \&PUT_strconst, "GET_strconst"];
-$insn_data{gv_stashpvx} = [79, \&PUT_strconst, "GET_strconst"];
-$insn_data{gp_sv} = [80, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_refcnt} = [81, \&PUT_U32, "GET_U32"];
-$insn_data{gp_refcnt_add} = [82, \&PUT_I32, "GET_I32"];
-$insn_data{gp_av} = [83, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_hv} = [84, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_cv} = [85, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_file} = [86, \&PUT_pvindex, "GET_pvindex"];
-$insn_data{gp_io} = [87, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_form} = [88, \&PUT_svindex, "GET_svindex"];
-$insn_data{gp_cvgen} = [89, \&PUT_U32, "GET_U32"];
-$insn_data{gp_line} = [90, \&PUT_U32, "GET_U32"];
-$insn_data{gp_share} = [91, \&PUT_svindex, "GET_svindex"];
-$insn_data{xgv_flags} = [92, \&PUT_U8, "GET_U8"];
-$insn_data{op_next} = [93, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_sibling} = [94, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_ppaddr} = [95, \&PUT_strconst, "GET_strconst"];
-$insn_data{op_targ} = [96, \&PUT_PADOFFSET, "GET_PADOFFSET"];
-$insn_data{op_type} = [97, \&PUT_U16, "GET_U16"];
-$insn_data{op_opt} = [98, \&PUT_U8, "GET_U8"];
-$insn_data{op_static} = [99, \&PUT_U8, "GET_U8"];
-$insn_data{op_flags} = [100, \&PUT_U8, "GET_U8"];
-$insn_data{op_private} = [101, \&PUT_U8, "GET_U8"];
-$insn_data{op_first} = [102, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_last} = [103, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_other} = [104, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_pmreplroot} = [105, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_pmreplstart} = [106, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_pmnext} = [107, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_pmstashpv} = [108, \&PUT_pvindex, "GET_pvindex"];
-$insn_data{op_pmreplrootpo} = [109, \&PUT_PADOFFSET, "GET_PADOFFSET"];
-$insn_data{op_pmstash} = [110, \&PUT_svindex, "GET_svindex"];
-$insn_data{op_pmreplrootgv} = [111, \&PUT_svindex, "GET_svindex"];
-$insn_data{pregcomp} = [112, \&PUT_pvcontents, "GET_pvcontents"];
-$insn_data{op_pmflags} = [113, \&PUT_U16, "GET_U16"];
-$insn_data{op_pmpermflags} = [114, \&PUT_U16, "GET_U16"];
-$insn_data{op_pmdynflags} = [115, \&PUT_U8, "GET_U8"];
-$insn_data{op_sv} = [116, \&PUT_svindex, "GET_svindex"];
-$insn_data{op_padix} = [117, \&PUT_PADOFFSET, "GET_PADOFFSET"];
-$insn_data{op_pv} = [118, \&PUT_pvcontents, "GET_pvcontents"];
-$insn_data{op_pv_tr} = [119, \&PUT_op_tr_array, "GET_op_tr_array"];
-$insn_data{op_redoop} = [120, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_nextop} = [121, \&PUT_opindex, "GET_opindex"];
-$insn_data{op_lastop} = [122, \&PUT_opindex, "GET_opindex"];
-$insn_data{cop_label} = [123, \&PUT_pvindex, "GET_pvindex"];
-$insn_data{cop_stashpv} = [124, \&PUT_pvindex, "GET_pvindex"];
-$insn_data{cop_file} = [125, \&PUT_pvindex, "GET_pvindex"];
-$insn_data{cop_stash} = [126, \&PUT_svindex, "GET_svindex"];
-$insn_data{cop_filegv} = [127, \&PUT_svindex, "GET_svindex"];
-$insn_data{cop_seq} = [128, \&PUT_U32, "GET_U32"];
-$insn_data{cop_arybase} = [129, \&PUT_I32, "GET_I32"];
-$insn_data{cop_line} = [130, \&PUT_U32, "GET_U32"];
-$insn_data{cop_io} = [131, \&PUT_svindex, "GET_svindex"];
-$insn_data{cop_warnings} = [132, \&PUT_svindex, "GET_svindex"];
-$insn_data{main_start} = [133, \&PUT_opindex, "GET_opindex"];
-$insn_data{main_root} = [134, \&PUT_opindex, "GET_opindex"];
-$insn_data{main_cv} = [135, \&PUT_svindex, "GET_svindex"];
-$insn_data{curpad} = [136, \&PUT_svindex, "GET_svindex"];
-$insn_data{push_begin} = [137, \&PUT_svindex, "GET_svindex"];
-$insn_data{push_init} = [138, \&PUT_svindex, "GET_svindex"];
-$insn_data{push_end} = [139, \&PUT_svindex, "GET_svindex"];
-$insn_data{curstash} = [140, \&PUT_svindex, "GET_svindex"];
-$insn_data{defstash} = [141, \&PUT_svindex, "GET_svindex"];
-$insn_data{data} = [142, \&PUT_U8, "GET_U8"];
-$insn_data{incav} = [143, \&PUT_svindex, "GET_svindex"];
-$insn_data{load_glob} = [144, \&PUT_svindex, "GET_svindex"];
-$insn_data{regex_padav} = [145, \&PUT_svindex, "GET_svindex"];
-$insn_data{dowarn} = [146, \&PUT_U8, "GET_U8"];
-$insn_data{comppad_name} = [147, \&PUT_svindex, "GET_svindex"];
-$insn_data{xgv_stash} = [148, \&PUT_svindex, "GET_svindex"];
-$insn_data{signal} = [149, \&PUT_strconst, "GET_strconst"];
-$insn_data{formfeed} = [150, \&PUT_svindex, "GET_svindex"];
+$insn_data{hv_store} = [67, \&PUT_svindex, "GET_svindex"];
+$insn_data{sv_magic} = [68, \&PUT_U8, "GET_U8"];
+$insn_data{mg_obj} = [69, \&PUT_svindex, "GET_svindex"];
+$insn_data{mg_private} = [70, \&PUT_U16, "GET_U16"];
+$insn_data{mg_flags} = [71, \&PUT_U8, "GET_U8"];
+$insn_data{mg_name} = [72, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{mg_namex} = [73, \&PUT_svindex, "GET_svindex"];
+$insn_data{xmg_stash} = [74, \&PUT_svindex, "GET_svindex"];
+$insn_data{gv_fetchpv} = [75, \&PUT_strconst, "GET_strconst"];
+$insn_data{gv_fetchpvx} = [76, \&PUT_strconst, "GET_strconst"];
+$insn_data{gv_stashpv} = [77, \&PUT_strconst, "GET_strconst"];
+$insn_data{gv_stashpvx} = [78, \&PUT_strconst, "GET_strconst"];
+$insn_data{gp_sv} = [79, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_refcnt} = [80, \&PUT_U32, "GET_U32"];
+$insn_data{gp_refcnt_add} = [81, \&PUT_I32, "GET_I32"];
+$insn_data{gp_av} = [82, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_hv} = [83, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_cv} = [84, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_file} = [85, \&PUT_pvindex, "GET_pvindex"];
+$insn_data{gp_io} = [86, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_form} = [87, \&PUT_svindex, "GET_svindex"];
+$insn_data{gp_cvgen} = [88, \&PUT_U32, "GET_U32"];
+$insn_data{gp_line} = [89, \&PUT_U32, "GET_U32"];
+$insn_data{gp_share} = [90, \&PUT_svindex, "GET_svindex"];
+$insn_data{xgv_flags} = [91, \&PUT_U8, "GET_U8"];
+$insn_data{op_next} = [92, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_sibling} = [93, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_ppaddr} = [94, \&PUT_strconst, "GET_strconst"];
+$insn_data{op_targ} = [95, \&PUT_PADOFFSET, "GET_PADOFFSET"];
+$insn_data{op_type} = [96, \&PUT_U16, "GET_U16"];
+$insn_data{op_opt} = [97, \&PUT_U8, "GET_U8"];
+$insn_data{op_static} = [98, \&PUT_U8, "GET_U8"];
+$insn_data{op_flags} = [99, \&PUT_U8, "GET_U8"];
+$insn_data{op_private} = [100, \&PUT_U8, "GET_U8"];
+$insn_data{op_first} = [101, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_last} = [102, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_other} = [103, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_pmreplroot} = [104, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_pmreplstart} = [105, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_pmnext} = [106, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_pmstashpv} = [107, \&PUT_pvindex, "GET_pvindex"];
+$insn_data{op_pmreplrootpo} = [108, \&PUT_PADOFFSET, "GET_PADOFFSET"];
+$insn_data{op_pmstash} = [109, \&PUT_svindex, "GET_svindex"];
+$insn_data{op_pmreplrootgv} = [110, \&PUT_svindex, "GET_svindex"];
+$insn_data{pregcomp} = [111, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{op_pmflags} = [112, \&PUT_U16, "GET_U16"];
+$insn_data{op_pmpermflags} = [113, \&PUT_U16, "GET_U16"];
+$insn_data{op_pmdynflags} = [114, \&PUT_U8, "GET_U8"];
+$insn_data{op_sv} = [115, \&PUT_svindex, "GET_svindex"];
+$insn_data{op_padix} = [116, \&PUT_PADOFFSET, "GET_PADOFFSET"];
+$insn_data{op_pv} = [117, \&PUT_pvcontents, "GET_pvcontents"];
+$insn_data{op_pv_tr} = [118, \&PUT_op_tr_array, "GET_op_tr_array"];
+$insn_data{op_redoop} = [119, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_nextop} = [120, \&PUT_opindex, "GET_opindex"];
+$insn_data{op_lastop} = [121, \&PUT_opindex, "GET_opindex"];
+$insn_data{cop_label} = [122, \&PUT_pvindex, "GET_pvindex"];
+$insn_data{cop_stashpv} = [123, \&PUT_pvindex, "GET_pvindex"];
+$insn_data{cop_file} = [124, \&PUT_pvindex, "GET_pvindex"];
+$insn_data{cop_stash} = [125, \&PUT_svindex, "GET_svindex"];
+$insn_data{cop_filegv} = [126, \&PUT_svindex, "GET_svindex"];
+$insn_data{cop_seq} = [127, \&PUT_U32, "GET_U32"];
+$insn_data{cop_arybase} = [128, \&PUT_I32, "GET_I32"];
+$insn_data{cop_line} = [129, \&PUT_U32, "GET_U32"];
+$insn_data{cop_io} = [130, \&PUT_svindex, "GET_svindex"];
+$insn_data{cop_warnings} = [131, \&PUT_svindex, "GET_svindex"];
+$insn_data{main_start} = [132, \&PUT_opindex, "GET_opindex"];
+$insn_data{main_root} = [133, \&PUT_opindex, "GET_opindex"];
+$insn_data{main_cv} = [134, \&PUT_svindex, "GET_svindex"];
+$insn_data{curpad} = [135, \&PUT_svindex, "GET_svindex"];
+$insn_data{push_begin} = [136, \&PUT_svindex, "GET_svindex"];
+$insn_data{push_init} = [137, \&PUT_svindex, "GET_svindex"];
+$insn_data{push_end} = [138, \&PUT_svindex, "GET_svindex"];
+$insn_data{curstash} = [139, \&PUT_svindex, "GET_svindex"];
+$insn_data{defstash} = [140, \&PUT_svindex, "GET_svindex"];
+$insn_data{data} = [141, \&PUT_U8, "GET_U8"];
+$insn_data{incav} = [142, \&PUT_svindex, "GET_svindex"];
+$insn_data{load_glob} = [143, \&PUT_svindex, "GET_svindex"];
+$insn_data{regex_padav} = [144, \&PUT_svindex, "GET_svindex"];
+$insn_data{dowarn} = [145, \&PUT_U8, "GET_U8"];
+$insn_data{comppad_name} = [146, \&PUT_svindex, "GET_svindex"];
+$insn_data{xgv_stash} = [147, \&PUT_svindex, "GET_svindex"];
+$insn_data{signal} = [148, \&PUT_strconst, "GET_strconst"];
+$insn_data{formfeed} = [149, \&PUT_svindex, "GET_svindex"];
 
 my ($insn_name, $insn_data);
 while (($insn_name, $insn_data) = each %insn_data) {
index f822d05..4506066 100644 (file)
@@ -527,287 +527,280 @@ byterun(pTHX_ register struct byteloader_state *bstate)
                HvNAME(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_XHV_PMROOT:         /* 67 */
-           {
-               opindex arg;
-               BGET_opindex(arg);
-               *(OP**)&HvPMROOT(bstate->bs_sv) = arg;
-               break;
-           }
-         case INSN_HV_STORE:           /* 68 */
+         case INSN_HV_STORE:           /* 67 */
            {
                svindex arg;
                BGET_svindex(arg);
                BSET_hv_store(bstate->bs_sv, arg);
                break;
            }
-         case INSN_SV_MAGIC:           /* 69 */
+         case INSN_SV_MAGIC:           /* 68 */
            {
                char arg;
                BGET_U8(arg);
                BSET_sv_magic(bstate->bs_sv, arg);
                break;
            }
-         case INSN_MG_OBJ:             /* 70 */
+         case INSN_MG_OBJ:             /* 69 */
            {
                svindex arg;
                BGET_svindex(arg);
                SvMAGIC(bstate->bs_sv)->mg_obj = arg;
                break;
            }
-         case INSN_MG_PRIVATE:         /* 71 */
+         case INSN_MG_PRIVATE:         /* 70 */
            {
                U16 arg;
                BGET_U16(arg);
                SvMAGIC(bstate->bs_sv)->mg_private = arg;
                break;
            }
-         case INSN_MG_FLAGS:           /* 72 */
+         case INSN_MG_FLAGS:           /* 71 */
            {
                U8 arg;
                BGET_U8(arg);
                SvMAGIC(bstate->bs_sv)->mg_flags = arg;
                break;
            }
-         case INSN_MG_NAME:            /* 73 */
+         case INSN_MG_NAME:            /* 72 */
            {
                pvcontents arg;
                BGET_pvcontents(arg);
                BSET_mg_name(SvMAGIC(bstate->bs_sv), arg);
                break;
            }
-         case INSN_MG_NAMEX:           /* 74 */
+         case INSN_MG_NAMEX:           /* 73 */
            {
                svindex arg;
                BGET_svindex(arg);
                BSET_mg_namex(SvMAGIC(bstate->bs_sv), arg);
                break;
            }
-         case INSN_XMG_STASH:          /* 75 */
+         case INSN_XMG_STASH:          /* 74 */
            {
                svindex arg;
                BGET_svindex(arg);
                BSET_xmg_stash(bstate->bs_sv, arg);
                break;
            }
-         case INSN_GV_FETCHPV:         /* 76 */
+         case INSN_GV_FETCHPV:         /* 75 */
            {
                strconst arg;
                BGET_strconst(arg);
                BSET_gv_fetchpv(bstate->bs_sv, arg);
                break;
            }
-         case INSN_GV_FETCHPVX:                /* 77 */
+         case INSN_GV_FETCHPVX:                /* 76 */
            {
                strconst arg;
                BGET_strconst(arg);
                BSET_gv_fetchpvx(bstate->bs_sv, arg);
                break;
            }
-         case INSN_GV_STASHPV:         /* 78 */
+         case INSN_GV_STASHPV:         /* 77 */
            {
                strconst arg;
                BGET_strconst(arg);
                BSET_gv_stashpv(bstate->bs_sv, arg);
                break;
            }
-         case INSN_GV_STASHPVX:                /* 79 */
+         case INSN_GV_STASHPVX:                /* 78 */
            {
                strconst arg;
                BGET_strconst(arg);
                BSET_gv_stashpvx(bstate->bs_sv, arg);
                break;
            }
-         case INSN_GP_SV:              /* 80 */
+         case INSN_GP_SV:              /* 79 */
            {
                svindex arg;
                BGET_svindex(arg);
                GvSV(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_GP_REFCNT:          /* 81 */
+         case INSN_GP_REFCNT:          /* 80 */
            {
                U32 arg;
                BGET_U32(arg);
                GvREFCNT(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_GP_REFCNT_ADD:              /* 82 */
+         case INSN_GP_REFCNT_ADD:              /* 81 */
            {
                I32 arg;
                BGET_I32(arg);
                BSET_gp_refcnt_add(GvREFCNT(bstate->bs_sv), arg);
                break;
            }
-         case INSN_GP_AV:              /* 83 */
+         case INSN_GP_AV:              /* 82 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&GvAV(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_GP_HV:              /* 84 */
+         case INSN_GP_HV:              /* 83 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&GvHV(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_GP_CV:              /* 85 */
+         case INSN_GP_CV:              /* 84 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&GvCV(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_GP_FILE:            /* 86 */
+         case INSN_GP_FILE:            /* 85 */
            {
                pvindex arg;
                BGET_pvindex(arg);
                GvFILE(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_GP_IO:              /* 87 */
+         case INSN_GP_IO:              /* 86 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&GvIOp(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_GP_FORM:            /* 88 */
+         case INSN_GP_FORM:            /* 87 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&GvFORM(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_GP_CVGEN:           /* 89 */
+         case INSN_GP_CVGEN:           /* 88 */
            {
                U32 arg;
                BGET_U32(arg);
                GvCVGEN(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_GP_LINE:            /* 90 */
+         case INSN_GP_LINE:            /* 89 */
            {
                line_t arg;
                BGET_U32(arg);
                GvLINE(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_GP_SHARE:           /* 91 */
+         case INSN_GP_SHARE:           /* 90 */
            {
                svindex arg;
                BGET_svindex(arg);
                BSET_gp_share(bstate->bs_sv, arg);
                break;
            }
-         case INSN_XGV_FLAGS:          /* 92 */
+         case INSN_XGV_FLAGS:          /* 91 */
            {
                U8 arg;
                BGET_U8(arg);
                GvFLAGS(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_OP_NEXT:            /* 93 */
+         case INSN_OP_NEXT:            /* 92 */
            {
                opindex arg;
                BGET_opindex(arg);
                PL_op->op_next = arg;
                break;
            }
-         case INSN_OP_SIBLING:         /* 94 */
+         case INSN_OP_SIBLING:         /* 93 */
            {
                opindex arg;
                BGET_opindex(arg);
                PL_op->op_sibling = arg;
                break;
            }
-         case INSN_OP_PPADDR:          /* 95 */
+         case INSN_OP_PPADDR:          /* 94 */
            {
                strconst arg;
                BGET_strconst(arg);
                BSET_op_ppaddr(PL_op->op_ppaddr, arg);
                break;
            }
-         case INSN_OP_TARG:            /* 96 */
+         case INSN_OP_TARG:            /* 95 */
            {
                PADOFFSET arg;
                BGET_PADOFFSET(arg);
                PL_op->op_targ = arg;
                break;
            }
-         case INSN_OP_TYPE:            /* 97 */
+         case INSN_OP_TYPE:            /* 96 */
            {
                OPCODE arg;
                BGET_U16(arg);
                BSET_op_type(PL_op, arg);
                break;
            }
-         case INSN_OP_OPT:             /* 98 */
+         case INSN_OP_OPT:             /* 97 */
            {
                U8 arg;
                BGET_U8(arg);
                PL_op->op_opt = arg;
                break;
            }
-         case INSN_OP_STATIC:          /* 99 */
+         case INSN_OP_STATIC:          /* 98 */
            {
                U8 arg;
                BGET_U8(arg);
                PL_op->op_static = arg;
                break;
            }
-         case INSN_OP_FLAGS:           /* 100 */
+         case INSN_OP_FLAGS:           /* 99 */
            {
                U8 arg;
                BGET_U8(arg);
                PL_op->op_flags = arg;
                break;
            }
-         case INSN_OP_PRIVATE:         /* 101 */
+         case INSN_OP_PRIVATE:         /* 100 */
            {
                U8 arg;
                BGET_U8(arg);
                PL_op->op_private = arg;
                break;
            }
-         case INSN_OP_FIRST:           /* 102 */
+         case INSN_OP_FIRST:           /* 101 */
            {
                opindex arg;
                BGET_opindex(arg);
                cUNOP->op_first = arg;
                break;
            }
-         case INSN_OP_LAST:            /* 103 */
+         case INSN_OP_LAST:            /* 102 */
            {
                opindex arg;
                BGET_opindex(arg);
                cBINOP->op_last = arg;
                break;
            }
-         case INSN_OP_OTHER:           /* 104 */
+         case INSN_OP_OTHER:           /* 103 */
            {
                opindex arg;
                BGET_opindex(arg);
                cLOGOP->op_other = arg;
                break;
            }
-         case INSN_OP_PMREPLROOT:              /* 105 */
+         case INSN_OP_PMREPLROOT:              /* 104 */
            {
                opindex arg;
                BGET_opindex(arg);
                cPMOP->op_pmreplroot = arg;
                break;
            }
-         case INSN_OP_PMREPLSTART:             /* 106 */
+         case INSN_OP_PMREPLSTART:             /* 105 */
            {
                opindex arg;
                BGET_opindex(arg);
                cPMOP->op_pmreplstart = arg;
                break;
            }
-         case INSN_OP_PMNEXT:          /* 107 */
+         case INSN_OP_PMNEXT:          /* 106 */
            {
                opindex arg;
                BGET_opindex(arg);
@@ -815,14 +808,14 @@ byterun(pTHX_ register struct byteloader_state *bstate)
                break;
            }
 #ifdef USE_ITHREADS
-         case INSN_OP_PMSTASHPV:               /* 108 */
+         case INSN_OP_PMSTASHPV:               /* 107 */
            {
                pvindex arg;
                BGET_pvindex(arg);
                BSET_op_pmstashpv(cPMOP, arg);
                break;
            }
-         case INSN_OP_PMREPLROOTPO:            /* 109 */
+         case INSN_OP_PMREPLROOTPO:            /* 108 */
            {
                PADOFFSET arg;
                BGET_PADOFFSET(arg);
@@ -830,14 +823,14 @@ byterun(pTHX_ register struct byteloader_state *bstate)
                break;
            }
 #else
-         case INSN_OP_PMSTASH:         /* 110 */
+         case INSN_OP_PMSTASH:         /* 109 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&cPMOP->op_pmstash = arg;
                break;
            }
-         case INSN_OP_PMREPLROOTGV:            /* 111 */
+         case INSN_OP_PMREPLROOTGV:            /* 110 */
            {
                svindex arg;
                BGET_svindex(arg);
@@ -845,84 +838,84 @@ byterun(pTHX_ register struct byteloader_state *bstate)
                break;
            }
 #endif
-         case INSN_PREGCOMP:           /* 112 */
+         case INSN_PREGCOMP:           /* 111 */
            {
                pvcontents arg;
                BGET_pvcontents(arg);
                BSET_pregcomp(PL_op, arg);
                break;
            }
-         case INSN_OP_PMFLAGS:         /* 113 */
+         case INSN_OP_PMFLAGS:         /* 112 */
            {
                U16 arg;
                BGET_U16(arg);
                cPMOP->op_pmflags = arg;
                break;
            }
-         case INSN_OP_PMPERMFLAGS:             /* 114 */
+         case INSN_OP_PMPERMFLAGS:             /* 113 */
            {
                U16 arg;
                BGET_U16(arg);
                cPMOP->op_pmpermflags = arg;
                break;
            }
-         case INSN_OP_PMDYNFLAGS:              /* 115 */
+         case INSN_OP_PMDYNFLAGS:              /* 114 */
            {
                U8 arg;
                BGET_U8(arg);
                cPMOP->op_pmdynflags = arg;
                break;
            }
-         case INSN_OP_SV:              /* 116 */
+         case INSN_OP_SV:              /* 115 */
            {
                svindex arg;
                BGET_svindex(arg);
                cSVOP->op_sv = arg;
                break;
            }
-         case INSN_OP_PADIX:           /* 117 */
+         case INSN_OP_PADIX:           /* 116 */
            {
                PADOFFSET arg;
                BGET_PADOFFSET(arg);
                cPADOP->op_padix = arg;
                break;
            }
-         case INSN_OP_PV:              /* 118 */
+         case INSN_OP_PV:              /* 117 */
            {
                pvcontents arg;
                BGET_pvcontents(arg);
                cPVOP->op_pv = arg;
                break;
            }
-         case INSN_OP_PV_TR:           /* 119 */
+         case INSN_OP_PV_TR:           /* 118 */
            {
                op_tr_array arg;
                BGET_op_tr_array(arg);
                cPVOP->op_pv = arg;
                break;
            }
-         case INSN_OP_REDOOP:          /* 120 */
+         case INSN_OP_REDOOP:          /* 119 */
            {
                opindex arg;
                BGET_opindex(arg);
                cLOOP->op_redoop = arg;
                break;
            }
-         case INSN_OP_NEXTOP:          /* 121 */
+         case INSN_OP_NEXTOP:          /* 120 */
            {
                opindex arg;
                BGET_opindex(arg);
                cLOOP->op_nextop = arg;
                break;
            }
-         case INSN_OP_LASTOP:          /* 122 */
+         case INSN_OP_LASTOP:          /* 121 */
            {
                opindex arg;
                BGET_opindex(arg);
                cLOOP->op_lastop = arg;
                break;
            }
-         case INSN_COP_LABEL:          /* 123 */
+         case INSN_COP_LABEL:          /* 122 */
            {
                pvindex arg;
                BGET_pvindex(arg);
@@ -930,14 +923,14 @@ byterun(pTHX_ register struct byteloader_state *bstate)
                break;
            }
 #ifdef USE_ITHREADS
-         case INSN_COP_STASHPV:                /* 124 */
+         case INSN_COP_STASHPV:                /* 123 */
            {
                pvindex arg;
                BGET_pvindex(arg);
                BSET_cop_stashpv(cCOP, arg);
                break;
            }
-         case INSN_COP_FILE:           /* 125 */
+         case INSN_COP_FILE:           /* 124 */
            {
                pvindex arg;
                BGET_pvindex(arg);
@@ -945,14 +938,14 @@ byterun(pTHX_ register struct byteloader_state *bstate)
                break;
            }
 #else
-         case INSN_COP_STASH:          /* 126 */
+         case INSN_COP_STASH:          /* 125 */
            {
                svindex arg;
                BGET_svindex(arg);
                BSET_cop_stash(cCOP, arg);
                break;
            }
-         case INSN_COP_FILEGV:         /* 127 */
+         case INSN_COP_FILEGV:         /* 126 */
            {
                svindex arg;
                BGET_svindex(arg);
@@ -960,119 +953,119 @@ byterun(pTHX_ register struct byteloader_state *bstate)
                break;
            }
 #endif
-         case INSN_COP_SEQ:            /* 128 */
+         case INSN_COP_SEQ:            /* 127 */
            {
                U32 arg;
                BGET_U32(arg);
                cCOP->cop_seq = arg;
                break;
            }
-         case INSN_COP_ARYBASE:                /* 129 */
+         case INSN_COP_ARYBASE:                /* 128 */
            {
                I32 arg;
                BGET_I32(arg);
                cCOP->cop_arybase = arg;
                break;
            }
-         case INSN_COP_LINE:           /* 130 */
+         case INSN_COP_LINE:           /* 129 */
            {
                line_t arg;
                BGET_U32(arg);
                cCOP->cop_line = arg;
                break;
            }
-         case INSN_COP_IO:             /* 131 */
+         case INSN_COP_IO:             /* 130 */
            {
                svindex arg;
                BGET_svindex(arg);
                cCOP->cop_io = arg;
                break;
            }
-         case INSN_COP_WARNINGS:               /* 132 */
+         case INSN_COP_WARNINGS:               /* 131 */
            {
                svindex arg;
                BGET_svindex(arg);
                cCOP->cop_warnings = arg;
                break;
            }
-         case INSN_MAIN_START:         /* 133 */
+         case INSN_MAIN_START:         /* 132 */
            {
                opindex arg;
                BGET_opindex(arg);
                PL_main_start = arg;
                break;
            }
-         case INSN_MAIN_ROOT:          /* 134 */
+         case INSN_MAIN_ROOT:          /* 133 */
            {
                opindex arg;
                BGET_opindex(arg);
                PL_main_root = arg;
                break;
            }
-         case INSN_MAIN_CV:            /* 135 */
+         case INSN_MAIN_CV:            /* 134 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&PL_main_cv = arg;
                break;
            }
-         case INSN_CURPAD:             /* 136 */
+         case INSN_CURPAD:             /* 135 */
            {
                svindex arg;
                BGET_svindex(arg);
                BSET_curpad(PL_curpad, arg);
                break;
            }
-         case INSN_PUSH_BEGIN:         /* 137 */
+         case INSN_PUSH_BEGIN:         /* 136 */
            {
                svindex arg;
                BGET_svindex(arg);
                BSET_push_begin(PL_beginav, arg);
                break;
            }
-         case INSN_PUSH_INIT:          /* 138 */
+         case INSN_PUSH_INIT:          /* 137 */
            {
                svindex arg;
                BGET_svindex(arg);
                BSET_push_init(PL_initav, arg);
                break;
            }
-         case INSN_PUSH_END:           /* 139 */
+         case INSN_PUSH_END:           /* 138 */
            {
                svindex arg;
                BGET_svindex(arg);
                BSET_push_end(PL_endav, arg);
                break;
            }
-         case INSN_CURSTASH:           /* 140 */
+         case INSN_CURSTASH:           /* 139 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&PL_curstash = arg;
                break;
            }
-         case INSN_DEFSTASH:           /* 141 */
+         case INSN_DEFSTASH:           /* 140 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&PL_defstash = arg;
                break;
            }
-         case INSN_DATA:               /* 142 */
+         case INSN_DATA:               /* 141 */
            {
                U8 arg;
                BGET_U8(arg);
                BSET_data(none, arg);
                break;
            }
-         case INSN_INCAV:              /* 143 */
+         case INSN_INCAV:              /* 142 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&GvAV(PL_incgv) = arg;
                break;
            }
-         case INSN_LOAD_GLOB:          /* 144 */
+         case INSN_LOAD_GLOB:          /* 143 */
            {
                svindex arg;
                BGET_svindex(arg);
@@ -1080,7 +1073,7 @@ byterun(pTHX_ register struct byteloader_state *bstate)
                break;
            }
 #ifdef USE_ITHREADS
-         case INSN_REGEX_PADAV:                /* 145 */
+         case INSN_REGEX_PADAV:                /* 144 */
            {
                svindex arg;
                BGET_svindex(arg);
@@ -1088,35 +1081,35 @@ byterun(pTHX_ register struct byteloader_state *bstate)
                break;
            }
 #endif
-         case INSN_DOWARN:             /* 146 */
+         case INSN_DOWARN:             /* 145 */
            {
                U8 arg;
                BGET_U8(arg);
                PL_dowarn = arg;
                break;
            }
-         case INSN_COMPPAD_NAME:               /* 147 */
+         case INSN_COMPPAD_NAME:               /* 146 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&PL_comppad_name = arg;
                break;
            }
-         case INSN_XGV_STASH:          /* 148 */
+         case INSN_XGV_STASH:          /* 147 */
            {
                svindex arg;
                BGET_svindex(arg);
                *(SV**)&GvSTASH(bstate->bs_sv) = arg;
                break;
            }
-         case INSN_SIGNAL:             /* 149 */
+         case INSN_SIGNAL:             /* 148 */
            {
                strconst arg;
                BGET_strconst(arg);
                BSET_signal(bstate->bs_sv, arg);
                break;
            }
-         case INSN_FORMFEED:           /* 150 */
+         case INSN_FORMFEED:           /* 149 */
            {
                svindex arg;
                BGET_svindex(arg);
index 215cf35..dcd3374 100644 (file)
@@ -97,91 +97,90 @@ enum {
     INSN_XAV_MAX,                      /* 64 */
     INSN_XHV_RITER,                    /* 65 */
     INSN_XHV_NAME,                     /* 66 */
-    INSN_XHV_PMROOT,                   /* 67 */
-    INSN_HV_STORE,                     /* 68 */
-    INSN_SV_MAGIC,                     /* 69 */
-    INSN_MG_OBJ,                       /* 70 */
-    INSN_MG_PRIVATE,                   /* 71 */
-    INSN_MG_FLAGS,                     /* 72 */
-    INSN_MG_NAME,                      /* 73 */
-    INSN_MG_NAMEX,                     /* 74 */
-    INSN_XMG_STASH,                    /* 75 */
-    INSN_GV_FETCHPV,                   /* 76 */
-    INSN_GV_FETCHPVX,                  /* 77 */
-    INSN_GV_STASHPV,                   /* 78 */
-    INSN_GV_STASHPVX,                  /* 79 */
-    INSN_GP_SV,                        /* 80 */
-    INSN_GP_REFCNT,                    /* 81 */
-    INSN_GP_REFCNT_ADD,                        /* 82 */
-    INSN_GP_AV,                        /* 83 */
-    INSN_GP_HV,                        /* 84 */
-    INSN_GP_CV,                        /* 85 */
-    INSN_GP_FILE,                      /* 86 */
-    INSN_GP_IO,                        /* 87 */
-    INSN_GP_FORM,                      /* 88 */
-    INSN_GP_CVGEN,                     /* 89 */
-    INSN_GP_LINE,                      /* 90 */
-    INSN_GP_SHARE,                     /* 91 */
-    INSN_XGV_FLAGS,                    /* 92 */
-    INSN_OP_NEXT,                      /* 93 */
-    INSN_OP_SIBLING,                   /* 94 */
-    INSN_OP_PPADDR,                    /* 95 */
-    INSN_OP_TARG,                      /* 96 */
-    INSN_OP_TYPE,                      /* 97 */
-    INSN_OP_OPT,                       /* 98 */
-    INSN_OP_STATIC,                    /* 99 */
-    INSN_OP_FLAGS,                     /* 100 */
-    INSN_OP_PRIVATE,                   /* 101 */
-    INSN_OP_FIRST,                     /* 102 */
-    INSN_OP_LAST,                      /* 103 */
-    INSN_OP_OTHER,                     /* 104 */
-    INSN_OP_PMREPLROOT,                        /* 105 */
-    INSN_OP_PMREPLSTART,                       /* 106 */
-    INSN_OP_PMNEXT,                    /* 107 */
-    INSN_OP_PMSTASHPV,                 /* 108 */
-    INSN_OP_PMREPLROOTPO,                      /* 109 */
-    INSN_OP_PMSTASH,                   /* 110 */
-    INSN_OP_PMREPLROOTGV,                      /* 111 */
-    INSN_PREGCOMP,                     /* 112 */
-    INSN_OP_PMFLAGS,                   /* 113 */
-    INSN_OP_PMPERMFLAGS,                       /* 114 */
-    INSN_OP_PMDYNFLAGS,                        /* 115 */
-    INSN_OP_SV,                        /* 116 */
-    INSN_OP_PADIX,                     /* 117 */
-    INSN_OP_PV,                        /* 118 */
-    INSN_OP_PV_TR,                     /* 119 */
-    INSN_OP_REDOOP,                    /* 120 */
-    INSN_OP_NEXTOP,                    /* 121 */
-    INSN_OP_LASTOP,                    /* 122 */
-    INSN_COP_LABEL,                    /* 123 */
-    INSN_COP_STASHPV,                  /* 124 */
-    INSN_COP_FILE,                     /* 125 */
-    INSN_COP_STASH,                    /* 126 */
-    INSN_COP_FILEGV,                   /* 127 */
-    INSN_COP_SEQ,                      /* 128 */
-    INSN_COP_ARYBASE,                  /* 129 */
-    INSN_COP_LINE,                     /* 130 */
-    INSN_COP_IO,                       /* 131 */
-    INSN_COP_WARNINGS,                 /* 132 */
-    INSN_MAIN_START,                   /* 133 */
-    INSN_MAIN_ROOT,                    /* 134 */
-    INSN_MAIN_CV,                      /* 135 */
-    INSN_CURPAD,                       /* 136 */
-    INSN_PUSH_BEGIN,                   /* 137 */
-    INSN_PUSH_INIT,                    /* 138 */
-    INSN_PUSH_END,                     /* 139 */
-    INSN_CURSTASH,                     /* 140 */
-    INSN_DEFSTASH,                     /* 141 */
-    INSN_DATA,                 /* 142 */
-    INSN_INCAV,                        /* 143 */
-    INSN_LOAD_GLOB,                    /* 144 */
-    INSN_REGEX_PADAV,                  /* 145 */
-    INSN_DOWARN,                       /* 146 */
-    INSN_COMPPAD_NAME,                 /* 147 */
-    INSN_XGV_STASH,                    /* 148 */
-    INSN_SIGNAL,                       /* 149 */
-    INSN_FORMFEED,                     /* 150 */
-    MAX_INSN = 150
+    INSN_HV_STORE,                     /* 67 */
+    INSN_SV_MAGIC,                     /* 68 */
+    INSN_MG_OBJ,                       /* 69 */
+    INSN_MG_PRIVATE,                   /* 70 */
+    INSN_MG_FLAGS,                     /* 71 */
+    INSN_MG_NAME,                      /* 72 */
+    INSN_MG_NAMEX,                     /* 73 */
+    INSN_XMG_STASH,                    /* 74 */
+    INSN_GV_FETCHPV,                   /* 75 */
+    INSN_GV_FETCHPVX,                  /* 76 */
+    INSN_GV_STASHPV,                   /* 77 */
+    INSN_GV_STASHPVX,                  /* 78 */
+    INSN_GP_SV,                        /* 79 */
+    INSN_GP_REFCNT,                    /* 80 */
+    INSN_GP_REFCNT_ADD,                        /* 81 */
+    INSN_GP_AV,                        /* 82 */
+    INSN_GP_HV,                        /* 83 */
+    INSN_GP_CV,                        /* 84 */
+    INSN_GP_FILE,                      /* 85 */
+    INSN_GP_IO,                        /* 86 */
+    INSN_GP_FORM,                      /* 87 */
+    INSN_GP_CVGEN,                     /* 88 */
+    INSN_GP_LINE,                      /* 89 */
+    INSN_GP_SHARE,                     /* 90 */
+    INSN_XGV_FLAGS,                    /* 91 */
+    INSN_OP_NEXT,                      /* 92 */
+    INSN_OP_SIBLING,                   /* 93 */
+    INSN_OP_PPADDR,                    /* 94 */
+    INSN_OP_TARG,                      /* 95 */
+    INSN_OP_TYPE,                      /* 96 */
+    INSN_OP_OPT,                       /* 97 */
+    INSN_OP_STATIC,                    /* 98 */
+    INSN_OP_FLAGS,                     /* 99 */
+    INSN_OP_PRIVATE,                   /* 100 */
+    INSN_OP_FIRST,                     /* 101 */
+    INSN_OP_LAST,                      /* 102 */
+    INSN_OP_OTHER,                     /* 103 */
+    INSN_OP_PMREPLROOT,                        /* 104 */
+    INSN_OP_PMREPLSTART,                       /* 105 */
+    INSN_OP_PMNEXT,                    /* 106 */
+    INSN_OP_PMSTASHPV,                 /* 107 */
+    INSN_OP_PMREPLROOTPO,                      /* 108 */
+    INSN_OP_PMSTASH,                   /* 109 */
+    INSN_OP_PMREPLROOTGV,                      /* 110 */
+    INSN_PREGCOMP,                     /* 111 */
+    INSN_OP_PMFLAGS,                   /* 112 */
+    INSN_OP_PMPERMFLAGS,                       /* 113 */
+    INSN_OP_PMDYNFLAGS,                        /* 114 */
+    INSN_OP_SV,                        /* 115 */
+    INSN_OP_PADIX,                     /* 116 */
+    INSN_OP_PV,                        /* 117 */
+    INSN_OP_PV_TR,                     /* 118 */
+    INSN_OP_REDOOP,                    /* 119 */
+    INSN_OP_NEXTOP,                    /* 120 */
+    INSN_OP_LASTOP,                    /* 121 */
+    INSN_COP_LABEL,                    /* 122 */
+    INSN_COP_STASHPV,                  /* 123 */
+    INSN_COP_FILE,                     /* 124 */
+    INSN_COP_STASH,                    /* 125 */
+    INSN_COP_FILEGV,                   /* 126 */
+    INSN_COP_SEQ,                      /* 127 */
+    INSN_COP_ARYBASE,                  /* 128 */
+    INSN_COP_LINE,                     /* 129 */
+    INSN_COP_IO,                       /* 130 */
+    INSN_COP_WARNINGS,                 /* 131 */
+    INSN_MAIN_START,                   /* 132 */
+    INSN_MAIN_ROOT,                    /* 133 */
+    INSN_MAIN_CV,                      /* 134 */
+    INSN_CURPAD,                       /* 135 */
+    INSN_PUSH_BEGIN,                   /* 136 */
+    INSN_PUSH_INIT,                    /* 137 */
+    INSN_PUSH_END,                     /* 138 */
+    INSN_CURSTASH,                     /* 139 */
+    INSN_DEFSTASH,                     /* 140 */
+    INSN_DATA,                 /* 141 */
+    INSN_INCAV,                        /* 142 */
+    INSN_LOAD_GLOB,                    /* 143 */
+    INSN_REGEX_PADAV,                  /* 144 */
+    INSN_DOWARN,                       /* 145 */
+    INSN_COMPPAD_NAME,                 /* 146 */
+    INSN_XGV_STASH,                    /* 147 */
+    INSN_SIGNAL,                       /* 148 */
+    INSN_FORMFEED,                     /* 149 */
+    MAX_INSN = 149
 };
 
 enum {
diff --git a/hv.c b/hv.c
index cafad72..3f100e6 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -1307,7 +1307,6 @@ Perl_newHV(pTHX)
 
     xhv->xhv_max    = 7;       /* HvMAX(hv) = 7 (start with 8 buckets) */
     xhv->xhv_fill   = 0;       /* HvFILL(hv) = 0 */
-    xhv->xhv_pmroot = 0;       /* HvPMROOT(hv) = 0 */
     (void)hv_iterinit(hv);     /* so each() will start off right */
     return hv;
 }
diff --git a/hv.h b/hv.h
index 8186f26..7a6009b 100644 (file)
--- a/hv.h
+++ b/hv.h
@@ -43,7 +43,7 @@ struct xpvhv {
 
     I32                xhv_riter;      /* current root of iterator */
     HE         *xhv_eiter;     /* current entry of iterator */
-    PMOP       *xhv_pmroot;    /* list of pm's for this package */
+    /* list of pm's for this package is now stored in symtab magic.  */
     char       *xhv_name;      /* name, if a symbol table */
 };
 
@@ -181,7 +181,6 @@ C<SV*>.
 #define HvMAX(hv)      ((XPVHV*)  SvANY(hv))->xhv_max
 #define HvRITER(hv)    ((XPVHV*)  SvANY(hv))->xhv_riter
 #define HvEITER(hv)    ((XPVHV*)  SvANY(hv))->xhv_eiter
-#define HvPMROOT(hv)   ((XPVHV*)  SvANY(hv))->xhv_pmroot
 #define HvNAME(hv)     ((XPVHV*)  SvANY(hv))->xhv_name
 
 /* the number of keys (including any placeholers) */
diff --git a/op.c b/op.c
index dc70613..c8eff92 100644 (file)
--- a/op.c
+++ b/op.c
@@ -407,18 +407,21 @@ clear_pmop:
        {
            HV *pmstash = PmopSTASH(cPMOPo);
            if (pmstash && SvREFCNT(pmstash)) {
-               PMOP *pmop = HvPMROOT(pmstash);
-               PMOP *lastpmop = NULL;
-               while (pmop) {
-                   if (cPMOPo == pmop) {
-                       if (lastpmop)
-                           lastpmop->op_pmnext = pmop->op_pmnext;
-                       else
-                           HvPMROOT(pmstash) = pmop->op_pmnext;
-                       break;
+               MAGIC *mg = mg_find((SV*)pmstash, PERL_MAGIC_symtab);
+               if (mg) {
+                   PMOP *pmop = (PMOP*) mg->mg_obj;
+                   PMOP *lastpmop = NULL;
+                   while (pmop) {
+                       if (cPMOPo == pmop) {
+                           if (lastpmop)
+                               lastpmop->op_pmnext = pmop->op_pmnext;
+                           else
+                               mg->mg_obj = (SV*) pmop->op_pmnext;
+                           break;
+                       }
+                       lastpmop = pmop;
+                       pmop = pmop->op_pmnext;
                    }
-                   lastpmop = pmop;
-                   pmop = pmop->op_pmnext;
                }
            }
            PmopSTASH_free(cPMOPo);
@@ -2724,8 +2727,13 @@ Perl_newPMOP(pTHX_ I32 type, I32 flags)
 
         /* link into pm list */
     if (type != OP_TRANS && PL_curstash) {
-       pmop->op_pmnext = HvPMROOT(PL_curstash);
-       HvPMROOT(PL_curstash) = pmop;
+       MAGIC *mg = mg_find((SV*)PL_curstash, PERL_MAGIC_symtab);
+
+       if (!mg) {
+           mg = sv_magicext((SV*)PL_curstash, 0, PERL_MAGIC_symtab, 0, 0, 0);
+       }
+       pmop->op_pmnext = (PMOP*)mg->mg_obj;
+       mg->mg_obj = (SV*)pmop;
        PmopSTASH_set(pmop,PL_curstash);
     }
 
diff --git a/perl.h b/perl.h
index 54a6d3e..d8d3878 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -3169,6 +3169,7 @@ Gid_t getegid (void);
 #define PERL_MAGIC_arylen        '#' /* Array length ($#ary) */
 #define PERL_MAGIC_pos           '.' /* pos() lvalue */
 #define PERL_MAGIC_backref       '<' /* for weak ref data */
+#define PERL_MAGIC_symtab        ':' /* extra data for symbol tables */
 #define PERL_MAGIC_ext           '~' /* Available for use by extensions */
 
 
@@ -3768,7 +3769,8 @@ enum {            /* pass one of these to get_vtbl */
     want_vtbl_regdata,
     want_vtbl_regdatum,
     want_vtbl_backref,
-    want_vtbl_utf8
+    want_vtbl_utf8,
+    want_vtbl_symtab
 };
 
                                /* Note: the lowest 8 bits are reserved for
diff --git a/sv.c b/sv.c
index bdc2e99..af471fb 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -1972,7 +1972,6 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
        SvANY(sv) = new_XPVHV();
        HvRITER(sv)     = 0;
        HvEITER(sv)     = 0;
-       HvPMROOT(sv)    = 0;
        HvNAME(sv)      = 0;
        HvFILL(sv)      = 0;
        HvMAX(sv)       = 0;
@@ -5391,6 +5390,7 @@ Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, const MGVTBL *vtable,
     if (!obj || obj == sv ||
        how == PERL_MAGIC_arylen ||
        how == PERL_MAGIC_qr ||
+       how == PERL_MAGIC_symtab ||
        (SvTYPE(obj) == SVt_PVGV &&
            (GvSV(obj) == sv || GvHV(obj) == (HV*)sv || GvAV(obj) == (AV*)sv ||
            GvCV(obj) == (CV*)sv || GvIOp(obj) == (IO*)sv ||
@@ -5562,6 +5562,7 @@ Perl_sv_magic(pTHX_ register SV *sv, SV *obj, int how, const char *name, I32 nam
     case PERL_MAGIC_vec:
        vtable = &PL_vtbl_vec;
        break;
+    case PERL_MAGIC_symtab:
     case PERL_MAGIC_vstring:
        vtable = 0;
        break;
@@ -7926,7 +7927,6 @@ Perl_sv_reset(pTHX_ register const char *s, HV *stash)
     register GV *gv;
     register SV *sv;
     register I32 i;
-    register PMOP *pm;
     register I32 max;
     char todo[PERL_UCHAR_MAX+1];
 
@@ -7934,8 +7934,13 @@ Perl_sv_reset(pTHX_ register const char *s, HV *stash)
        return;
 
     if (!*s) {         /* reset ?? searches */
-       for (pm = HvPMROOT(stash); pm; pm = pm->op_pmnext) {
-           pm->op_pmdynflags &= ~PMdf_USED;
+       MAGIC *mg = mg_find((SV *)stash, PERL_MAGIC_symtab);
+       if (mg) {
+           PMOP *pm = (PMOP *) mg->mg_obj;
+           while (pm) {
+               pm->op_pmdynflags &= ~PMdf_USED;
+               pm = pm->op_pmnext;
+           }
        }
        return;
     }
@@ -10430,6 +10435,9 @@ Perl_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS* param)
                av_push((AV*)nmg->mg_obj,sv_dup(svp[i],param));
            }
        }
+       else if (mg->mg_type == PERL_MAGIC_symtab) {
+           nmg->mg_obj = mg->mg_obj;
+       }
        else {
            nmg->mg_obj = (mg->mg_flags & MGf_REFCOUNTED)
                              ? sv_dup_inc(mg->mg_obj, param)
@@ -11033,7 +11041,6 @@ Perl_sv_dup(pTHX_ SV *sstr, CLONE_PARAMS* param)
            SvPV_set(dstr, Nullch);
            HvEITER((HV*)dstr)  = (HE*)NULL;
        }
-       HvPMROOT((HV*)dstr)     = HvPMROOT((HV*)sstr);          /* XXX */
        HvNAME((HV*)dstr)       = SAVEPV(HvNAME((HV*)sstr));
     /* Record stashes for possible cloning in Perl_clone(). */
        if(HvNAME((HV*)dstr))