deadcode removal
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index d847e3d..e99ef60 100644 (file)
--- a/op.c
+++ b/op.c
 #define PERL_IN_OP_C
 #include "perl.h"
 
-#ifdef PERL_OBJECT
-#define CHECKCALL this->*PL_check
-#else
-#define CHECKCALL *PL_check
-#endif              
-
 /* #define PL_OP_SLAB_ALLOC */
                                                             
 #ifdef PL_OP_SLAB_ALLOC 
@@ -57,7 +51,7 @@ S_Slab_Alloc(pTHX_ int m, size_t sz)
      ? ( op_free((OP*)o),                                      \
         Perl_croak(aTHX_ "%s trapped by operation mask", PL_op_desc[type]),    \
         Nullop )                                               \
-     : (CHECKCALL[type])(aTHX_ (OP*)o))
+     : CALL_FPTR(PL_check[type])(aTHX_ (OP*)o))
 
 #define PAD_MAX 999999999
 
@@ -1890,7 +1884,8 @@ Perl_fold_constants(pTHX_ register OP *o)
        goto nope;              /* Don't try to run w/ errors */
 
     for (curop = LINKLIST(o); curop != o; curop = LINKLIST(curop)) {
-       if (curop->op_type != OP_CONST &&
+       if ((curop->op_type != OP_CONST ||
+            (curop->op_private & OPpCONST_BARE)) &&
            curop->op_type != OP_LIST &&
            curop->op_type != OP_SCALAR &&
            curop->op_type != OP_NULL &&
@@ -4798,12 +4793,13 @@ Perl_ck_fun(pTHX_ OP *o)
                    char *name = SvPVx(((SVOP*)kid)->op_sv, n_a);
                    OP *newop = newAVREF(newGVOP(OP_GV, 0,
                        gv_fetchpv(name, TRUE, SVt_PVAV) ));
-                   if (ckWARN(WARN_SYNTAX))
 #ifdef IV_IS_QUAD
+                   if (ckWARN(WARN_SYNTAX))
                        Perl_warner(aTHX_ WARN_SYNTAX,
                            "Array @%s missing the @ in argument %" PERL_PRId64 " of %s()",
                            name, (IV)numargs, PL_op_desc[type]);
 #else
+                   if (ckWARN(WARN_SYNTAX))
                        Perl_warner(aTHX_ WARN_SYNTAX,
                            "Array @%s missing the @ in argument %ld of %s()",
                            name, (long)numargs, PL_op_desc[type]);
@@ -4824,12 +4820,13 @@ Perl_ck_fun(pTHX_ OP *o)
                    char *name = SvPVx(((SVOP*)kid)->op_sv, n_a);
                    OP *newop = newHVREF(newGVOP(OP_GV, 0,
                        gv_fetchpv(name, TRUE, SVt_PVHV) ));
-                   if (ckWARN(WARN_SYNTAX))
 #ifdef IV_IS_QUAD
+                   if (ckWARN(WARN_SYNTAX))
                        Perl_warner(aTHX_ WARN_SYNTAX,
                            "Hash %%%s missing the %% in argument %" PERL_PRId64 " of %s()",
                            name, (IV)numargs, PL_op_desc[type]);
 #else
+                   if (ckWARN(WARN_SYNTAX))
                        Perl_warner(aTHX_ WARN_SYNTAX,
                            "Hash %%%s missing the %% in argument %ld of %s()",
                            name, (long)numargs, PL_op_desc[type]);
@@ -5043,6 +5040,7 @@ Perl_ck_defined(pTHX_ OP *o)              /* 19990527 MJD */
     if ((o->op_flags & OPf_KIDS) && ckWARN(WARN_DEPRECATED)) {
        switch (cUNOPo->op_first->op_type) {
        case OP_RV2AV:
+           break;                      /* Globals via GV can be undef */ 
        case OP_PADAV:
        case OP_AASSIGN:                /* Is this a good idea? */
            Perl_warner(aTHX_ WARN_DEPRECATED,
@@ -5051,6 +5049,7 @@ Perl_ck_defined(pTHX_ OP *o)              /* 19990527 MJD */
                        "(Maybe you should just omit the defined()?)\n");
        break;
        case OP_RV2HV:
+           break;                      /* Globals via GV can be undef */ 
        case OP_PADHV:
            Perl_warner(aTHX_ WARN_DEPRECATED,
                        "defined(%hash) is deprecated");