summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-10-16 12:19:44 +0100
committerDavid Mitchell <davem@iabyn.com>2016-02-03 08:59:45 +0000
commitfc69996cc42063c74cbeea44eba0c7f4ec7a301e (patch)
tree75965cbb96a213eedd06e8044e624e4c41c704ad /pp_ctl.c
parente17c1e7c6fc06dc65cd8688cf73effdd65b1e9ba (diff)
downloadperl-fc69996cc42063c74cbeea44eba0c7f4ec7a301e.tar.gz
S_doeval(): tidy up comments
Also, replace if (...) { ... return; } else B with if (...) { ... return; } B
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 93404d4ab5..a443bdf588 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3429,6 +3429,8 @@ S_doeval(pTHX_ int gimme, CV* outside, U32 seq, HV *hh)
/* note that yyparse() may raise an exception, e.g. C<BEGIN{die}>,
* so honour CATCH_GET and trap it here if necessary */
+
+ /* compile the code */
yystatus = (!in_require && CATCH_GET) ? S_try_yyparse(aTHX_ GRAMPROG) : yyparse(GRAMPROG);
if (yystatus || PL_parser->error_count || !PL_eval_root) {
@@ -3436,8 +3438,9 @@ S_doeval(pTHX_ int gimme, CV* outside, U32 seq, HV *hh)
SV *errsv;
PL_op = saveop;
- /* note that if yystatus == 3, then the EVAL CX block has already
- * been popped, and various vars restored */
+ /* note that if yystatus == 3, then the require/eval died during
+ * compilation, so the EVAL CX block has already been popped, and
+ * various vars restored */
if (yystatus != 3) {
if (PL_eval_root) {
op_free(PL_eval_root);
@@ -3471,8 +3474,10 @@ S_doeval(pTHX_ int gimme, CV* outside, U32 seq, HV *hh)
PUTBACK;
return FALSE;
}
- else
- LEAVE_with_name("evalcomp");
+
+ /* Compilation successful. Now clean up */
+
+ LEAVE_with_name("evalcomp");
CopLINE_set(&PL_compiling, 0);
SAVEFREEOP(PL_eval_root);
@@ -3498,8 +3503,6 @@ S_doeval(pTHX_ int gimme, CV* outside, U32 seq, HV *hh)
PL_eval_start = es;
}
- /* compiled okay, so do it */
-
CvDEPTH(evalcv) = 1;
SP = PL_stack_base + POPMARK; /* pop original mark */
PL_op = saveop; /* The caller may need it. */
@@ -3509,6 +3512,7 @@ S_doeval(pTHX_ int gimme, CV* outside, U32 seq, HV *hh)
return TRUE;
}
+
STATIC PerlIO *
S_check_type_and_open(pTHX_ SV *name)
{