summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2005-06-27 08:06:59 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-06-27 18:26:15 +0000
commit9d4ba2ae61ff15b15f3e889810ff89dfb2ed1738 (patch)
tree7d9dddf90ece7fcf85fc729c006f4aee3f23ff67 /pp_ctl.c
parentc9797b8fcc214dc5b78e594b627aa6c921e4633a (diff)
downloadperl-9d4ba2ae61ff15b15f3e889810ff89dfb2ed1738.tar.gz
We're going round in circles with pp_sys.c
Message-ID: <20050627180659.GB29744@petdance.com> (edited) p4raw-id: //depot/perl@24997
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index d0e2ef619d..fbd533eac2 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2061,7 +2061,7 @@ PP(pp_last)
PMOP *newpm;
SV **mark;
SV *sv = Nullsv;
- PERL_UNUSED_VAR(optype);
+
if (PL_op->op_flags & OPf_SPECIAL) {
cxix = dopoptoloop(cxstack_ix);
@@ -2077,7 +2077,6 @@ PP(pp_last)
dounwind(cxix);
POPBLOCK(cx,newpm);
- PERL_UNUSED_VAR(optype);
cxstack_ix++; /* temporarily protect top context */
mark = newsp;
switch (CxTYPE(cx)) {
@@ -2135,6 +2134,8 @@ PP(pp_last)
PL_curpm = newpm; /* ... and pop $1 et al */
LEAVESUB(sv);
+ PERL_UNUSED_VAR(optype);
+ PERL_UNUSED_VAR(gimme);
return nextop;
}
@@ -2271,7 +2272,7 @@ PP(pp_goto)
static const char must_have_label[] = "goto must have label";
if (PL_op->op_flags & OPf_STACKED) {
- SV *sv = POPs;
+ SV * const sv = POPs;
/* This egregious kludge implements goto &subroutine */
if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVCV) {
@@ -2767,7 +2768,7 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, const char *code, PAD** padp)
dVAR; dSP; /* Make POPBLOCK work. */
PERL_CONTEXT *cx;
SV **newsp;
- I32 gimme = 0; /* SUSPECT - INITIALZE TO WHAT? NI-S */
+ I32 gimme;
I32 optype;
OP dummy;
OP *rop;
@@ -2787,7 +2788,7 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, const char *code, PAD** padp)
CopSTASH_set(&PL_compiling, PL_curstash);
}
if (PERLDB_NAMEEVAL && CopLINE(PL_curcop)) {
- SV *sv = sv_newmortal();
+ SV * const sv = sv_newmortal();
Perl_sv_setpvf(aTHX_ sv, "_<(%.10seval %lu)[%s:%"IVdf"]",
code, (unsigned long)++PL_evalseq,
CopFILE(PL_curcop), (IV)CopLINE(PL_curcop));
@@ -2842,6 +2843,9 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, const char *code, PAD** padp)
#ifdef OP_IN_REGISTER
op = PL_opsave;
#endif
+ PERL_UNUSED_VAR(newsp);
+ PERL_UNUSED_VAR(optype);
+
return rop;
}
@@ -2945,8 +2949,9 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq)
sv_setpvn(ERRSV,"",0);
if (yyparse() || PL_error_count || !PL_eval_root) {
SV **newsp; /* Used by POPBLOCK. */
- PERL_CONTEXT *cx = &cxstack[cxstack_ix];
+ PERL_CONTEXT *cx = &cxstack[cxstack_ix];
I32 optype = 0; /* Might be reset by POPEVAL. */
+ const char *msg;
PL_op = saveop;
if (PL_eval_root) {
@@ -2960,8 +2965,9 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq)
}
lex_end();
LEAVE;
+
+ msg = SvPVx_nolen_const(ERRSV);
if (optype == OP_REQUIRE) {
- const char* const msg = SvPVx_nolen_const(ERRSV);
const SV * const nsv = cx->blk_eval.old_namesv;
(void)hv_store(GvHVn(PL_incgv), SvPVX_const(nsv), SvCUR(nsv),
&PL_sv_undef, 0);
@@ -2969,19 +2975,17 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq)
*msg ? msg : "Unknown error\n");
}
else if (startop) {
- const char* msg = SvPVx_nolen_const(ERRSV);
-
POPBLOCK(cx,PL_curpm);
POPEVAL(cx);
Perl_croak(aTHX_ "%sCompilation failed in regexp",
(*msg ? msg : "Unknown error\n"));
}
else {
- const char* msg = SvPVx_nolen_const(ERRSV);
if (!*msg) {
sv_setpv(ERRSV, "Compilation error");
}
}
+ PERL_UNUSED_VAR(newsp);
RETPUSHUNDEF;
}
CopLINE_set(&PL_compiling, 0);
@@ -3037,14 +3041,14 @@ S_doopen_pm(pTHX_ const char *name, const char *mode)
PerlIO *fp;
if (namelen > 3 && strEQ(name + namelen - 3, ".pm")) {
- SV *pmcsv = Perl_newSVpvf(aTHX_ "%s%c", name, 'c');
+ SV * const pmcsv = Perl_newSVpvf(aTHX_ "%s%c", name, 'c');
const char * const pmc = SvPV_nolen_const(pmcsv);
- Stat_t pmstat;
Stat_t pmcstat;
if (PerlLIO_stat(pmc, &pmcstat) < 0) {
fp = PerlIO_open(name, mode);
}
else {
+ Stat_t pmstat;
if (PerlLIO_stat(name, &pmstat) < 0 ||
pmstat.st_mtime < pmcstat.st_mtime)
{
@@ -3589,6 +3593,7 @@ PP(pp_leavetry)
POPBLOCK(cx,newpm);
POPEVAL(cx);
+ PERL_UNUSED_VAR(optype);
TAINT_NOT;
if (gimme == G_VOID)