This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Inline S_procself_val() into S_set_caret_x().
[perl5.git] / pp_hot.c
index 6a22452..ca6b195 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -125,8 +125,6 @@ PP(pp_sassign)
        const U32 cv_type = SvTYPE(cv);
        const bool is_gv = isGV_with_GP(right);
        const bool got_coderef = cv_type == SVt_PVCV || cv_type == SVt_PVFM;
-       STRLEN len = 0;
-       const char *nambeg = is_gv ? NULL : SvPV_nomg_const(right, len);
 
        if (!got_coderef) {
            assert(SvROK(cv));
@@ -137,9 +135,7 @@ PP(pp_sassign)
           context. */
        if (!got_coderef && !is_gv && GIMME_V == G_VOID) {
            /* Is the target symbol table currently empty?  */
-           GV * const gv = gv_fetchpvn_flags(
-               nambeg, len, SvUTF8(right)|GV_NOINIT, SVt_PVGV
-           );
+           GV * const gv = gv_fetchsv_nomg(right, GV_NOINIT, SVt_PVGV);
            if (SvTYPE(gv) != SVt_PVGV && !SvOK(gv)) {
                /* Good. Create a new proxy constant subroutine in the target.
                   The gv becomes a(nother) reference to the constant.  */
@@ -157,9 +153,7 @@ PP(pp_sassign)
        /* Need to fix things up.  */
        if (!is_gv) {
            /* Need to fix GV.  */
-           right = MUTABLE_SV(gv_fetchpvn_flags(
-               nambeg, len, SvUTF8(right)|GV_ADD, SVt_PVGV
-           ));
+           right = MUTABLE_SV(gv_fetchsv_nomg(right,GV_ADD, SVt_PVGV));
        }
 
        if (!got_coderef) {
@@ -2806,8 +2800,6 @@ PP(pp_aelem)
        Perl_warner(aTHX_ packWARN(WARN_MISC),
                    "Use of reference \"%"SVf"\" as array index",
                    SVfARG(elemsv));
-    if (elem > 0)
-       elem -= CopARYBASE_get(PL_curcop);
     if (SvTYPE(av) != SVt_PVAV)
        RETPUSHUNDEF;